[Mlir-commits] [mlir] 33a58c1 - [mlir][gpu] Allow all dialects in SCF to GPU conversion.
Stephan Herhut
llvmlistbot at llvm.org
Thu Feb 11 01:03:17 PST 2021
Author: Stephan Herhut
Date: 2021-02-11T10:02:26+01:00
New Revision: 33a58c1c5ced2daec879671e0d3efb3e2f021bbb
URL: https://github.com/llvm/llvm-project/commit/33a58c1c5ced2daec879671e0d3efb3e2f021bbb
DIFF: https://github.com/llvm/llvm-project/commit/33a58c1c5ced2daec879671e0d3efb3e2f021bbb.diff
LOG: [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
Added:
Modified:
mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
Removed:
################################################################################
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<AffineDialect, complex::ComplexDialect,
- gpu::GPUDialect, scf::SCFDialect,
- StandardOpsDialect>();
+ target.markUnknownOpDynamicallyLegal([](Operation *) { return true; });
configureParallelLoopToGPULegality(target);
if (failed(applyPartialConversion(getOperation(), target,
std::move(patterns))))
More information about the Mlir-commits
mailing list