[Mlir-commits] [mlir] 2505904 - [mlir][sparse] fix typo in sparse_tensor.unpack op (#66287)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Sep 13 14:51:07 PDT 2023


Author: Aart Bik
Date: 2023-09-13T14:51:03-07:00
New Revision: 2505904901be8e584f6f3c68d59b93de296e95a0

URL: https://github.com/llvm/llvm-project/commit/2505904901be8e584f6f3c68d59b93de296e95a0
DIFF: https://github.com/llvm/llvm-project/commit/2505904901be8e584f6f3c68d59b93de296e95a0.diff

LOG: [mlir][sparse] fix typo in sparse_tensor.unpack op (#66287)

SparseVector->COO

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 7430a3c6118cef4..94301dbcd9f7b42 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
@@ -131,9 +131,10 @@ def SparseTensor_UnpackOp : SparseTensor_Op<"unpack", [Pure, SameVariadicResultS
     // input COO format |1.1, 0.0, 0.0, 0.0|
     //    of 3x4 matrix |0.0, 0.0, 2.2, 3.3|
     //                  |0.0, 0.0, 0.0, 0.0|
-    %v, %p, %c, %v_len, %p_len, %c_len = sparse_tensor.unpack %sp : tensor<3x4xf64, #SparseVector>
-                                         outs(%od, %op, %oi : tensor<3xf64>, tensor<2xindex>, tensor<3x2xindex>)
-                                      -> tensor<3xf64>, (tensor<2xindex>, tensor<3x2xindex>), index, (index, index)
+    %v, %p, %c, %v_len, %p_len, %c_len =
+        sparse_tensor.unpack %sp : tensor<3x4xf64, #COO>
+          outs(%od, %op, %oi : tensor<3xf64>, tensor<2xindex>, tensor<3x2xindex>)
+                            -> tensor<3xf64>, (tensor<2xindex>, tensor<3x2xindex>), index, (index, index)
     // %v = arith.constant dense<[ 1.1,   2.2,   3.3 ]> : tensor<3xf64>
     // %p = arith.constant dense<[ 0,              3 ]> : tensor<2xindex>
     // %c = arith.constant dense<[[0,0], [1,2], [1,3]]> : tensor<3x2xindex>


        


More information about the Mlir-commits mailing list