diff --git a/compiler/tests/TestLib/CMakeLists.txt b/compiler/tests/TestLib/CMakeLists.txt index 7631912b3..bf0141967 100644 --- a/compiler/tests/TestLib/CMakeLists.txt +++ b/compiler/tests/TestLib/CMakeLists.txt @@ -17,6 +17,7 @@ target_link_libraries( testlib_unit_test ConcretelangRuntime ConcretelangSupport + DFRuntime gtest_main ) diff --git a/compiler/tests/unittest/end_to_end_jit_test.h b/compiler/tests/unittest/end_to_end_jit_test.h index bb3bec6bc..bbc26aca8 100644 --- a/compiler/tests/unittest/end_to_end_jit_test.h +++ b/compiler/tests/unittest/end_to_end_jit_test.h @@ -131,17 +131,25 @@ inline llvm::Expected< mlir::concretelang::ClientServer> internalCheckedJit(llvm::StringRef src, llvm::StringRef func = "main", bool useDefaultFHEConstraints = false, - bool autoParallelize = false) { + bool dataflowParallelize = false, + bool loopParallelize = false) { auto options = mlir::concretelang::CompilationOptions(std::string(func.data())); if (useDefaultFHEConstraints) options.v0FHEConstraints = defaultV0Constraints; + + // Allow loop parallelism in all cases + options.loopParallelize = loopParallelize; +#ifdef CONCRETELANG_PARALLEL_EXECUTION_ENABLED #ifdef CONCRETELANG_PARALLEL_TESTING_ENABLED - options.autoParallelize = true; + options.dataflowParallelize = true; + options.loopParallelize = true; #else - options.autoParallelize = autoParallelize; + options.dataflowParallelize = dataflowParallelize; #endif +#endif + auto lambdaOrErr = mlir::concretelang::ClientServer:: create(src, options, getTestKeySetCache(),