forked from OSchip/llvm-project
[mlir] Add ComplexDialect to SCF->GPU pass.
This commit is contained in:
parent
866cb26039
commit
b1e1bbae0e
|
@ -11,6 +11,7 @@ add_mlir_conversion_library(MLIRSCFToGPU
|
|||
LINK_LIBS PUBLIC
|
||||
MLIRAffine
|
||||
MLIRAffineToStandard
|
||||
MLIRComplex
|
||||
MLIRGPU
|
||||
MLIRIR
|
||||
MLIRLinalg
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../PassDetail.h"
|
||||
#include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
|
||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||
#include "mlir/Dialect/Complex/IR/Complex.h"
|
||||
#include "mlir/Dialect/GPU/GPUDialect.h"
|
||||
#include "mlir/Dialect/SCF/SCF.h"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
|
@ -49,10 +50,9 @@ struct ParallelLoopToGpuPass
|
|||
OwningRewritePatternList patterns;
|
||||
populateParallelLoopToGPUPatterns(patterns, &getContext());
|
||||
ConversionTarget target(getContext());
|
||||
target.addLegalDialect<StandardOpsDialect>();
|
||||
target.addLegalDialect<AffineDialect>();
|
||||
target.addLegalDialect<gpu::GPUDialect>();
|
||||
target.addLegalDialect<scf::SCFDialect>();
|
||||
target.addLegalDialect<AffineDialect, complex::ComplexDialect,
|
||||
gpu::GPUDialect, scf::SCFDialect,
|
||||
StandardOpsDialect>();
|
||||
configureParallelLoopToGPULegality(target);
|
||||
if (failed(applyPartialConversion(getOperation(), target,
|
||||
std::move(patterns))))
|
||||
|
|
Loading…
Reference in New Issue