From 33a58c1c5ced2daec879671e0d3efb3e2f021bbb Mon Sep 17 00:00:00 2001 From: Stephan Herhut Date: Thu, 11 Feb 2021 09:41:47 +0100 Subject: [PATCH] [mlir][gpu] Allow all dialects in SCF to GPU conversion. With the standard dialect being split up, the set of dialects that are used when converting to GPU is growing. This change modifies the SCFToGpu pass to allow all operations inside launch bodies. Differential Revision: https://reviews.llvm.org/D96480 --- mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp index 66fbacf69d5b..15075b53ab90 100644 --- a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp +++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp @@ -50,9 +50,7 @@ struct ParallelLoopToGpuPass OwningRewritePatternList patterns; populateParallelLoopToGPUPatterns(patterns, &getContext()); ConversionTarget target(getContext()); - target.addLegalDialect(); + target.markUnknownOpDynamicallyLegal([](Operation *) { return true; }); configureParallelLoopToGPULegality(target); if (failed(applyPartialConversion(getOperation(), target, std::move(patterns))))