fix(compiler): predicate OpenMP loop parallelization of Linalg on the --parallelize flag.

This commit is contained in:
Antoniu Pop
2022-01-31 09:07:03 +00:00
committed by Antoniu Pop
parent f52965e22f
commit ec633d57f6
3 changed files with 16 additions and 8 deletions

View File

@@ -296,8 +296,9 @@ CompilerEngine::compile(llvm::SourceMgr &sm, Target target, OptionalLib lib) {
}
// MLIR canonical dialects -> LLVM Dialect
if (mlir::concretelang::pipeline::lowerStdToLLVMDialect(mlirContext, module,
enablePass)
if (mlir::concretelang::pipeline::lowerStdToLLVMDialect(
mlirContext, module, enablePass,
/*parallelizeLoops =*/this->autoParallelize)
.failed()) {
return errorDiag("Failed to lower to LLVM dialect");
}