[mlir][sparse] Add codegen for expand op.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133454
This commit is contained in:
bixia1
2022-09-07 14:34:04 -07:00
parent 0f2f1c2be1
commit 8a583bd53d
4 changed files with 112 additions and 5 deletions

View File

@@ -175,7 +175,9 @@ struct SparseTensorCodegenPass
[&](bufferization::DeallocTensorOp op) {
return converter.isLegal(op.getTensor().getType());
});
// Legal dialects may occur in generated code.
// The following operations and dialects may be introduced by the
// codegen rules, and are therefore marked as legal.
target.addLegalOp<linalg::FillOp>();
target.addLegalDialect<arith::ArithmeticDialect,
bufferization::BufferizationDialect,
memref::MemRefDialect, scf::SCFDialect>();