mirror of https://github.com/llvm/torch-mlir
[torch-mlir][sparse] sparse tensor dialect is a legal dialect (#3227)
parent
b0ba3def93
commit
2eac8a992f
|
@ -18,6 +18,7 @@
|
|||
#include "mlir/Dialect/MLProgram/IR/MLProgram.h"
|
||||
#include "mlir/Dialect/Math/IR/Math.h"
|
||||
#include "mlir/Dialect/SCF/IR/SCF.h"
|
||||
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
|
||||
#include "mlir/Dialect/Tensor/IR/Tensor.h"
|
||||
#include "mlir/IR/OpDefinition.h"
|
||||
#include "mlir/Transforms/DialectConversion.h"
|
||||
|
@ -78,6 +79,8 @@ class VerifyLinalgOnTensorsBackendContractPass
|
|||
|
||||
// Tensor operations should go through linalg and the tensor dialect.
|
||||
target.addDynamicallyLegalDialect<linalg::LinalgDialect>(opHasLegalTypes);
|
||||
target.addDynamicallyLegalDialect<sparse_tensor::SparseTensorDialect>(
|
||||
opHasLegalTypes);
|
||||
target.addDynamicallyLegalDialect<tensor::TensorDialect>(opHasLegalTypes);
|
||||
target.addDynamicallyLegalDialect<affine::AffineDialect>(opHasLegalTypes);
|
||||
target.addDynamicallyLegalDialect<cf::ControlFlowDialect>(opHasLegalTypes);
|
||||
|
|
Loading…
Reference in New Issue