[mlir][sparse] Mark convert op as noSideEffect

Differential Revision: https://reviews.llvm.org/D109543
This commit is contained in:
thomasraoux 2021-09-09 13:29:18 -07:00
parent eede4846a9
commit 2a69790bad
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ def SparseTensor_NewOp : SparseTensor_Op<"new", []>,
let assemblyFormat = "$source attr-dict `:` type($source) `to` type($result)";
}
def SparseTensor_ConvertOp : SparseTensor_Op<"convert", [SameOperandsAndResultType]>,
def SparseTensor_ConvertOp : SparseTensor_Op<"convert",
[NoSideEffect, SameOperandsAndResultType]>,
Arguments<(ins AnyTensor:$source)>,
Results<(outs AnyTensor:$dest)> {
string summary = "Converts between different tensor types";