From ff20f88c4473cf039a4e4d891eb0fa6a3661b5d4 Mon Sep 17 00:00:00 2001 From: Andi Drebes Date: Wed, 5 Apr 2023 16:30:21 +0200 Subject: [PATCH] feat(compiler): Run SCFForallToSCFFor pass before lowering to LLVM dialect This adds an invocation of the `SCFForallToSCFFor` pass to the compilation pipeline before lowering to the LLVM dialect as a sequential fallback path to future passes exploiting the parallelism of `scf.forall` further up in the pipeline. --- compilers/concrete-compiler/compiler/lib/Support/Pipeline.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compilers/concrete-compiler/compiler/lib/Support/Pipeline.cpp b/compilers/concrete-compiler/compiler/lib/Support/Pipeline.cpp index 1b3281a14..e7c15858d 100644 --- a/compilers/concrete-compiler/compiler/lib/Support/Pipeline.cpp +++ b/compilers/concrete-compiler/compiler/lib/Support/Pipeline.cpp @@ -479,6 +479,9 @@ mlir::LogicalResult lowerToStd(mlir::MLIRContext &context, pm, mlir::bufferization::createEmptyTensorToAllocTensorPass(), enablePass); + addPotentiallyNestedPass( + pm, mlir::concretelang::createSCFForallToSCFForPass(), enablePass); + // Bufferize mlir::bufferization::OneShotBufferizationOptions bufferizationOptions; bufferizationOptions.allowReturnAllocs = true;