[Mlir-commits] [mlir] 2a69790 - [mlir][sparse] Mark convert op as noSideEffect

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Sep 9 14:39:26 PDT 2021


Author: thomasraoux
Date: 2021-09-09T14:39:09-07:00
New Revision: 2a69790bad1a081d6b89de65331006c674d8781e

URL: https://github.com/llvm/llvm-project/commit/2a69790bad1a081d6b89de65331006c674d8781e
DIFF: https://github.com/llvm/llvm-project/commit/2a69790bad1a081d6b89de65331006c674d8781e.diff

LOG: [mlir][sparse] Mark convert op as noSideEffect

Differential Revision: https://reviews.llvm.org/D109543

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
index 070bc1517dd9d..fb7494ce41d3d 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
@@ -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 
diff erent tensor types";


        


More information about the Mlir-commits mailing list