diff --git a/compiler/tests/end_to_end_tests/end_to_end_jit_fhe.cc b/compiler/tests/end_to_end_tests/end_to_end_jit_fhe.cc index 67179b963..e59fc68ca 100644 --- a/compiler/tests/end_to_end_tests/end_to_end_jit_fhe.cc +++ b/compiler/tests/end_to_end_tests/end_to_end_jit_fhe.cc @@ -20,6 +20,12 @@ void compile_and_run(EndToEndDesc desc, LambdaSupport support) { options.v0Parameter = *desc.v0Parameter; } + /* 0 - Enable parallel testing where required */ +#ifdef CONCRETELANG_PARALLEL_TESTING_ENABLED + options.dataflowParallelize = true; + options.loopParallelize = true; +#endif + /* 1 - Compile the program */ auto compilationResult = support.compile(desc.program, options); ASSERT_EXPECTED_SUCCESS(compilationResult); diff --git a/compiler/tests/unit_tests/concretelang/TestLib/CMakeLists.txt b/compiler/tests/unit_tests/concretelang/TestLib/CMakeLists.txt index 24888c1bf..ce8ba2665 100644 --- a/compiler/tests/unit_tests/concretelang/TestLib/CMakeLists.txt +++ b/compiler/tests/unit_tests/concretelang/TestLib/CMakeLists.txt @@ -16,6 +16,12 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ) endif() +if(CONCRETELANG_PARALLEL_EXECUTION_ENABLED) + add_compile_options( + -DCONCRETELANG_PARALLEL_TESTING_ENABLED + ) +endif() + add_concretecompiler_lib_test( unit_tests_concretelang_testlib testlib_unit_test.cpp diff --git a/compiler/tests/unit_tests/concretelang/TestLib/testlib_unit_test.cpp b/compiler/tests/unit_tests/concretelang/TestLib/testlib_unit_test.cpp index 81afca2e0..ee0736269 100644 --- a/compiler/tests/unit_tests/concretelang/TestLib/testlib_unit_test.cpp +++ b/compiler/tests/unit_tests/concretelang/TestLib/testlib_unit_test.cpp @@ -40,6 +40,9 @@ compile(std::string outputLib, std::string source, mlir::concretelang::CompilationContext::createShared(); mlir::concretelang::CompilerEngine ce{ccx}; mlir::concretelang::CompilationOptions options(funcname); +#ifdef CONCRETELANG_PARALLEL_TESTING_ENABLED + options.autoParallelize = true; +#endif ce.setCompilationOptions(options); auto result = ce.compile(sources, outputLib); if (!result) {