[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
This commit is contained in:
Stephan Herhut 2021-02-11 09:41:47 +01:00
parent 9498315c9b
commit 33a58c1c5c
1 changed files with 1 additions and 3 deletions

View File

@ -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))))