[clang-tools-extra] [mlir][sparse] Change tests to use new syntax for ELL and slice (PR #67569)

Aart Bik via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 10:54:07 PDT 2023


================
@@ -240,8 +240,9 @@ def SparseTensorEncodingAttr : SparseTensor_Attr<"SparseTensorEncoding",
     // CSR slice (offset = 0, size = 4, stride = 1 on the first dimension;
     // offset = 0, size = 8, and a dynamic stride on the second dimension).
     #CSR_SLICE = #sparse_tensor.encoding<{
-      lvlTypes = [ "dense", "compressed" ],
-      dimSlices = [ (0, 4, 1), (0, 8, ?) ]
+      map = (d0 : #sparse_tensor<slice(0, 4, 1)>,
----------------
aartbik wrote:

so the elaborate syntax would be

 (i = ib * 2 + ii  : #sparse_tensor<slice(0, 4, 1)>, ....

if that ever makes sense?

https://github.com/llvm/llvm-project/pull/67569


More information about the cfe-commits mailing list