[Mlir-commits] [mlir] [mlir][sparse] adjust compression scheme for example (PR #79212)
Aart Bik
llvmlistbot at llvm.org
Tue Jan 23 14:46:34 PST 2024
https://github.com/aartbik updated https://github.com/llvm/llvm-project/pull/79212
>From 6249695b3360e9c44022ae1696bb33ce4a19918e Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Tue, 23 Jan 2024 13:29:11 -0800
Subject: [PATCH 1/2] [mlir][sparse] adjust compression scheme for example
---
.../Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
index df12a6e042dde0e..949b81284f39939 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
@@ -32,9 +32,9 @@
#Sparse1 = #sparse_tensor.encoding<{
map = (i, j, k) -> (
- i : compressed,
j : compressed,
- k : compressed
+ k : compressed,
+ i : dense
)
}>
>From eb8dbbbfe5da26d62b50465bf05968134968dd05 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Tue, 23 Jan 2024 14:45:04 -0800
Subject: [PATCH 2/2] data
---
.../Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
index 949b81284f39939..024e86b4f165bbd 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
@@ -91,7 +91,7 @@ module {
// dense “fibers” in the i-dim, we end up with 8 stored entries.
//
// CHECK: 8
- // CHECK-NEXT: ( 1, 5, 2, 6, 3, 7, 4, 8 )
+ // CHECK-NEXT: ( 1, 2, 3, 4, 5, 6, 7, 8 )
//
%na = sparse_tensor.number_of_entries %a : tensor<4x4x4xi32, #Sparse1>
vector.print %na : index
More information about the Mlir-commits
mailing list