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

Aart Bik llvmlistbot at llvm.org
Wed Sep 13 13:35:06 PDT 2023


https://github.com/aartbik created https://github.com/llvm/llvm-project/pull/66287:

SparseVector->COO

>From 7c556fc0f2d61ae504b9beacc7014706e64e6626 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Wed, 13 Sep 2023 13:32:50 -0700
Subject: [PATCH] [mlir][sparse] fix typo in sparse_tensor.unpack op

SparseVector->COO
---
 .../mlir/Dialect/SparseTensor/IR/SparseTensorOps.td        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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