[mlir] Add ComplexDialect to SCF->GPU pass.

This commit is contained in:
Alexander Belyaev 2021-01-20 21:11:49 +01:00
parent 866cb26039
commit b1e1bbae0e
2 changed files with 5 additions and 4 deletions

View File

@ -11,6 +11,7 @@ add_mlir_conversion_library(MLIRSCFToGPU
LINK_LIBS PUBLIC
MLIRAffine
MLIRAffineToStandard
MLIRComplex
MLIRGPU
MLIRIR
MLIRLinalg

View File

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