[Mlir-commits] [mlir] [mlir][sparse] Change sparse_tensor.print format (PR #91528)
Yinying Li
llvmlistbot at llvm.org
Wed May 8 16:41:21 PDT 2024
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/91528
>From 0f112161fed1d6f9182596ad1e8620143b033753 Mon Sep 17 00:00:00 2001
From: Yinying Li <yinyingli at google.com>
Date: Wed, 8 May 2024 16:51:50 +0000
Subject: [PATCH 1/3] [mlir][sparse] Change sparse_tensor.print format
---
.../Transforms/SparseTensorRewriting.cpp | 33 +++-
.../Dialect/SparseTensor/CPU/block.mlir | 18 +-
.../SparseTensor/CPU/block_majors.mlir | 24 +--
.../SparseTensor/CPU/concatenate_dim_0.mlir | 20 +--
.../CPU/concatenate_dim_0_permute.mlir | 20 +--
.../SparseTensor/CPU/concatenate_dim_1.mlir | 20 +--
.../CPU/concatenate_dim_1_permute.mlir | 20 +--
.../SparseTensor/CPU/dense_output.mlir | 2 +-
.../SparseTensor/CPU/dense_output_bf16.mlir | 2 +-
.../SparseTensor/CPU/dense_output_f16.mlir | 2 +-
.../SparseTensor/CPU/dual_sparse_conv_2d.mlir | 28 +--
.../Dialect/SparseTensor/CPU/sparse_abs.mlir | 12 +-
.../SparseTensor/CPU/sparse_binary.mlir | 106 +++++------
.../SparseTensor/CPU/sparse_block3d.mlir | 24 +--
.../Dialect/SparseTensor/CPU/sparse_cmp.mlir | 20 +--
.../CPU/sparse_collapse_shape.mlir | 52 +++---
.../SparseTensor/CPU/sparse_complex32.mlir | 12 +-
.../SparseTensor/CPU/sparse_complex64.mlir | 12 +-
.../SparseTensor/CPU/sparse_complex_ops.mlir | 42 ++---
.../CPU/sparse_constant_to_sparse_tensor.mlir | 10 +-
.../CPU/sparse_conv_1d_nwc_wcf.mlir | 24 +--
.../SparseTensor/CPU/sparse_conv_2d.mlir | 38 ++--
.../CPU/sparse_conv_2d_nhwc_hwcf.mlir | 38 ++--
.../SparseTensor/CPU/sparse_conv_3d.mlir | 40 ++---
.../CPU/sparse_conv_3d_ndhwc_dhwcf.mlir | 36 ++--
.../SparseTensor/CPU/sparse_conversion.mlir | 168 +++++++++---------
.../CPU/sparse_conversion_block.mlir | 24 +--
.../CPU/sparse_conversion_dyn.mlir | 60 +++----
.../CPU/sparse_conversion_ptr.mlir | 56 +++---
.../SparseTensor/CPU/sparse_coo_test.mlir | 8 +-
.../Dialect/SparseTensor/CPU/sparse_dot.mlir | 12 +-
.../Dialect/SparseTensor/CPU/sparse_ds.mlir | 20 +--
.../SparseTensor/CPU/sparse_empty.mlir | 24 +--
.../SparseTensor/CPU/sparse_expand.mlir | 6 +-
.../SparseTensor/CPU/sparse_expand_shape.mlir | 76 ++++----
.../CPU/sparse_filter_conv2d.mlir | 10 +-
.../SparseTensor/CPU/sparse_index.mlir | 74 ++++----
.../SparseTensor/CPU/sparse_insert_1d.mlir | 12 +-
.../SparseTensor/CPU/sparse_insert_2d.mlir | 32 ++--
.../SparseTensor/CPU/sparse_insert_3d.mlir | 36 ++--
.../SparseTensor/CPU/sparse_loose.mlir | 6 +-
.../SparseTensor/CPU/sparse_matmul.mlir | 112 ++++++------
.../SparseTensor/CPU/sparse_matmul_slice.mlir | 34 ++--
.../SparseTensor/CPU/sparse_matrix_ops.mlir | 60 +++----
.../SparseTensor/CPU/sparse_out_mult_elt.mlir | 10 +-
.../CPU/sparse_out_reduction.mlir | 10 +-
.../SparseTensor/CPU/sparse_out_simple.mlir | 10 +-
.../SparseTensor/CPU/sparse_pack_d.mlir | 26 +--
.../SparseTensor/CPU/sparse_pooling_nhwc.mlir | 18 +-
.../SparseTensor/CPU/sparse_print.mlir | 102 +++++------
.../SparseTensor/CPU/sparse_print_3d.mlir | 10 +-
.../SparseTensor/CPU/sparse_re_im.mlir | 12 +-
.../CPU/sparse_reduce_custom.mlir | 24 +--
.../CPU/sparse_reduce_custom_prod.mlir | 24 +--
.../SparseTensor/CPU/sparse_reshape.mlir | 30 ++--
.../CPU/sparse_sampled_mm_fusion.mlir | 20 +--
.../SparseTensor/CPU/sparse_scale.mlir | 6 +-
.../SparseTensor/CPU/sparse_scf_nested.mlir | 28 +--
.../SparseTensor/CPU/sparse_select.mlir | 24 +--
.../CPU/sparse_semiring_select.mlir | 10 +-
.../Dialect/SparseTensor/CPU/sparse_sign.mlir | 6 +-
.../SparseTensor/CPU/sparse_sorted_coo.mlir | 52 +++---
.../SparseTensor/CPU/sparse_storage.mlir | 46 ++---
.../Dialect/SparseTensor/CPU/sparse_tanh.mlir | 6 +-
.../SparseTensor/CPU/sparse_tensor_mul.mlir | 14 +-
.../SparseTensor/CPU/sparse_tensor_ops.mlir | 24 +--
.../SparseTensor/CPU/sparse_transpose.mlir | 20 +--
.../CPU/sparse_transpose_coo.mlir | 16 +-
.../SparseTensor/CPU/sparse_unary.mlir | 44 ++---
.../SparseTensor/CPU/sparse_vector_ops.mlir | 38 ++--
.../GPU/CUDA/sparse-gemm-lib.mlir | 6 +-
.../GPU/CUDA/sparse-sampled-matmul-lib.mlir | 12 +-
.../GPU/CUDA/sparse-sddmm-lib.mlir | 12 +-
73 files changed, 1086 insertions(+), 1059 deletions(-)
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
index 025fd3331ba89..d2cdca41cf4a1 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
@@ -830,10 +830,12 @@ struct PrintRewriter : public OpRewritePattern<PrintOp> {
vector::PrintPunctuation::Comma);
rewriter.create<vector::PrintOp>(loc, imag,
vector::PrintPunctuation::Close);
- rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Comma);
+ printEnding(rewriter, loc, forOp.getInductionVar(), step,
+ forOp.getUpperBound(), /*isComplex*/ true, val);
+
} else {
- rewriter.create<vector::PrintOp>(loc, val,
- vector::PrintPunctuation::Comma);
+ printEnding(rewriter, loc, forOp.getInductionVar(), step,
+ forOp.getUpperBound(), /*isComplex*/ false, val);
}
}
idxs.pop_back();
@@ -842,6 +844,31 @@ struct PrintRewriter : public OpRewritePattern<PrintOp> {
rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Close);
}
+ // Helper method to print the ending of memref (no punctuation after the last
+ // element).
+ static void printEnding(PatternRewriter &rewriter, Location loc, Value indVar,
+ Value step, Value upperBound, bool isComplex,
+ Value val) {
+ auto bound = rewriter.create<arith::AddIOp>(loc, indVar, step);
+ Value cond = rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::eq,
+ bound, upperBound);
+ scf::IfOp ifOp = rewriter.create<scf::IfOp>(loc, cond, /*else*/ true);
+ if (isComplex) {
+ rewriter.setInsertionPointToStart(&ifOp.getThenRegion().front());
+ rewriter.create<vector::PrintOp>(loc,
+ vector::PrintPunctuation::NoPunctuation);
+ rewriter.setInsertionPointToStart(&ifOp.getElseRegion().front());
+ rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Comma);
+ } else {
+ rewriter.setInsertionPointToStart(&ifOp.getThenRegion().front());
+ rewriter.create<vector::PrintOp>(loc, val,
+ vector::PrintPunctuation::NoPunctuation);
+ rewriter.setInsertionPointToStart(&ifOp.getElseRegion().front());
+ rewriter.create<vector::PrintOp>(loc, val,
+ vector::PrintPunctuation::Comma);
+ }
+ }
+
// Helper method to print run-time lvl/dim sizes.
static void printSizes(PatternRewriter &rewriter, Location loc, Value tensor,
unsigned size, bool isDim) {
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/block.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/block.mlir
index f79e7e68f382d..ab4fd0e30d654 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/block.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/block.mlir
@@ -93,9 +93,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 6 )
// CHECK-NEXT: lvl = ( 2, 3, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1,
- // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 0, 5, 6, 7, 8, 0,
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 0, 5, 6, 7, 8, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %A : tensor<?x?xf64, #BSR>
@@ -103,9 +103,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 2, 3, 2, 2 )
// CHECK-NEXT: lvl = ( 2, 3, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1
- // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 0, 5, 6, 7, 8, 0,
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 0, 5, 6, 7, 8, 0 )
// CHECK-NEXT: ----
%t1 = sparse_tensor.reinterpret_map %A : tensor<?x?xf64, #BSR>
to tensor<?x?x2x2xf64, #DSDD>
@@ -115,9 +115,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 6 )
// CHECK-NEXT: lvl = ( 2, 3, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1,
- // CHECK-NEXT: values : ( 3, 6, 0, 9, 12, 0, 0, 15, 18, 21, 24, 0,
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1 )
+ // CHECK-NEXT: values : ( 3, 6, 0, 9, 12, 0, 0, 15, 18, 21, 24, 0 )
// CHECK-NEXT: ----
%As = call @scale(%A) : (tensor<?x?xf64, #BSR>) -> (tensor<?x?xf64, #BSR>)
sparse_tensor.print %As : tensor<?x?xf64, #BSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/block_majors.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/block_majors.mlir
index 3534e7d15207c..caa0d6a71ed37 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/block_majors.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/block_majors.mlir
@@ -108,9 +108,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 6, 16 )
// CHECK-NEXT: lvl = ( 2, 4, 3, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2,
- // CHECK-NEXT: crd[1] : ( 0, 2,
- // CHECK-NEXT: values : ( 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7,
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 )
// CHECK-NEXT: ----
//
func.func @foo1() {
@@ -134,9 +134,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 6, 16 )
// CHECK-NEXT: lvl = ( 2, 4, 4, 3 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2,
- // CHECK-NEXT: crd[1] : ( 0, 2,
- // CHECK-NEXT: values : ( 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 7,
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 2 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 7 )
// CHECK-NEXT: ----
//
func.func @foo2() {
@@ -160,9 +160,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 6, 16 )
// CHECK-NEXT: lvl = ( 4, 2, 3, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 2,
- // CHECK-NEXT: crd[1] : ( 0, 1,
- // CHECK-NEXT: values : ( 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7,
+ // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7 )
// CHECK-NEXT: ----
//
func.func @foo3() {
@@ -186,9 +186,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 6, 16 )
// CHECK-NEXT: lvl = ( 4, 2, 4, 3 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 2,
- // CHECK-NEXT: crd[1] : ( 0, 1,
- // CHECK-NEXT: values : ( 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 7,
+ // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 7 )
// CHECK-NEXT: ----
//
func.func @foo4() {
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0.mlir
index 6a4902057362f..7edb76cc8045d 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0.mlir
@@ -111,11 +111,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 9, 4 )
// CHECK-NEXT: lvl = ( 9, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8,
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1,
- // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%0 = call @concat_sparse_sparse(%sm24cc, %sm34cd, %sm44dc)
@@ -142,11 +142,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 9, 4 )
// CHECK-NEXT: lvl = ( 9, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8,
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1,
- // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%2 = call @concat_mix_sparse(%m24, %sm34cd, %sm44dc)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0_permute.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0_permute.mlir
index 9c9b0e3330c9c..d17e110e2c2d9 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0_permute.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_0_permute.mlir
@@ -144,11 +144,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 9, 4 )
// CHECK-NEXT: lvl = ( 4, 9 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 5, 11, 16, 18
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 1, 3, 4, 6, 7, 8, 0, 2, 4, 5, 7, 2, 5
- // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 2, 0.5, 5, 3.5, 5, 0.5, 3, 1, 2, 1.5, 2, 1, 1
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 11, 16, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 1, 3, 4, 6, 7, 8, 0, 2, 4, 5, 7, 2, 5 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 2, 0.5, 5, 3.5, 5, 0.5, 3, 1, 2, 1.5, 2, 1, 1 )
// CHECK-NEXT: ----
//
%4 = call @concat_sparse_sparse_perm(%sm24ccp, %sm34cd, %sm44dc)
@@ -173,11 +173,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 9, 4 )
// CHECK-NEXT: lvl = ( 9, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18
- // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1
- // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 13, 16, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0, 2, 3, 1, 0, 1, 2, 2, 3, 1, 0, 1, 2, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 3, 2, 1, 1, 1, 0.5, 1, 5, 2, 1.5, 1, 3.5, 1, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%6 = call @concat_mix_sparse_perm(%m24, %sm34cdp, %sm44dc)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1.mlir
index ae067bf18527b..c2a4e95e7922e 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1.mlir
@@ -116,11 +116,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 4, 9 )
// CHECK-NEXT: lvl = ( 4, 9 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6
- // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%8 = call @concat_sparse_sparse_dim1(%sm42cc, %sm43cd, %sm44dc)
@@ -140,11 +140,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 4, 9 )
// CHECK-NEXT: lvl = ( 4, 9 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6
- // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%10 = call @concat_mix_sparse_dim1(%m42, %sm43cd, %sm44dc)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1_permute.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1_permute.mlir
index ce746f27c4d88..8fe7e08a66d38 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1_permute.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/concatenate_dim_1_permute.mlir
@@ -130,11 +130,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 4, 9 )
// CHECK-NEXT: lvl = ( 9, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 15, 17, 18
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 3, 3, 0, 1, 2, 2, 3, 1, 2, 3, 0, 2, 0
- // CHECK-NEXT: values : ( 1, 3.1, 2, 1, 1, 5, 2, 1, 0.5, 1, 1, 1, 3.5, 5, 0.5, 1.5, 2, 1
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 7, 10, 12, 15, 17, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 3, 3, 0, 1, 2, 2, 3, 1, 2, 3, 0, 2, 0 )
+ // CHECK-NEXT: values : ( 1, 3.1, 2, 1, 1, 5, 2, 1, 0.5, 1, 1, 1, 3.5, 5, 0.5, 1.5, 2, 1 )
// CHECK-NEXT: ----
//
%12 = call @concat_sparse_sparse_perm_dim1(%sm42ccp, %sm43cd, %sm44dc)
@@ -154,11 +154,11 @@ module {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 4, 9 )
// CHECK-NEXT: lvl = ( 4, 9 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6
- // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 9, 14, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 7, 8, 0, 2, 4, 6, 1, 4, 5, 6, 7, 2, 3, 5, 6 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1.5, 1, 3.1, 1, 0.5, 3.5, 2, 1, 1, 5, 2, 5, 2, 1, 0.5 )
// CHECK-NEXT: ----
//
%14 = call @concat_mix_sparse_perm_dim1(%m42, %sm43cdp, %sm44dc)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir
index b2bbc64f1688e..d00d4c87f9bd4 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir
@@ -108,7 +108,7 @@ module {
// CHECK-NEXT: nse = 25
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: values : ( 2, 0, 0, 2.8, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 8.2, 0, 0, 8, 0, 0, 10.4, 0, 0, 10,
+ // CHECK-NEXT: values : ( 2, 0, 0, 2.8, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 8.2, 0, 0, 8, 0, 0, 10.4, 0, 0, 10 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xf64, #DenseMatrix>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir
index ca9df03c69eed..49f182ddb1d44 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_bf16.mlir
@@ -95,7 +95,7 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: values : ( 1, 11, 0, 2, 13, 0, 0, 0, 0, 0, 14, 3, 0, 0, 0, 0, 15, 4, 16, 0, 5, 6, 0, 0, 0, 0, 0, 0, 7, 8, 0, 9,
+ // CHECK-NEXT: values : ( 1, 11, 0, 2, 13, 0, 0, 0, 0, 0, 14, 3, 0, 0, 0, 0, 15, 4, 16, 0, 5, 6, 0, 0, 0, 0, 0, 0, 7, 8, 0, 9 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xbf16, #DenseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir
index 4f5e6ddd48d8e..cc2a3733c8633 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output_f16.mlir
@@ -96,7 +96,7 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: values : ( 1, 11, 0, 2, 13, 0, 0, 0, 0, 0, 14, 3, 0, 0, 0, 0, 15, 4, 16, 0, 5, 6, 0, 0, 0, 0, 0, 0, 7, 8, 0, 9,
+ // CHECK-NEXT: values : ( 1, 11, 0, 2, 13, 0, 0, 0, 0, 0, 14, 3, 0, 0, 0, 0, 15, 4, 16, 0, 5, 6, 0, 0, 0, 0, 0, 0, 7, 8, 0, 9 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xf16, #DenseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/dual_sparse_conv_2d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/dual_sparse_conv_2d.mlir
index c645ca6567209..f33a3abc7a5f7 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/dual_sparse_conv_2d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/dual_sparse_conv_2d.mlir
@@ -161,11 +161,11 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<6x6xi32, #DCSR>
@@ -177,9 +177,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<6x6xi32, #CSR>
@@ -191,9 +191,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %4 : tensor<6x6xi32, #CDR>
@@ -205,9 +205,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, -1, 0, -1, 0, 2, 0, 0, -1, 0, 0, -1, -1, 1, 1, 0, 3, 3, -6, 0, 0, 0, 6, 0, -1, 1, 0, 0, -3, -3, 6, 0, 0, 0, -6, 0
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, -1, 0, -1, 0, 2, 0, 0, -1, 0, 0, -1, -1, 1, 1, 0, 3, 3, -6, 0, 0, 0, 6, 0, -1, 1, 0, 0, -3, -3, 6, 0, 0, 0, -6, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %5 : tensor<6x6xi32, #CSC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_abs.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_abs.mlir
index 4228bcdb1c0d7..707c6c34d8dce 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_abs.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_abs.mlir
@@ -120,18 +120,18 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 12,
- // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 20, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 1.5, 1.5, 10.2, 11.3, 1, 1, nan, nan, inf, inf, 0, 0,
+ // CHECK-NEXT: pos[0] : ( 0, 12 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 1.5, 1.5, 10.2, 11.3, 1, 1, nan, nan, inf, inf, 0, 0 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 21, 31,
- // CHECK-NEXT: values : ( -2147483648, 2147483647, 1000, 1, 0, 1, 1000, 2147483646, 2147483647,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 21, 31 )
+ // CHECK-NEXT: values : ( -2147483648, 2147483647, 1000, 1, 0, 1, 1000, 2147483646, 2147483647 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xf64, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir
index 36701b4385a2a..69be2ee752216 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir
@@ -453,131 +453,131 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 10,
- // CHECK-NEXT: crd[0] : ( 1, 3, 4, 10, 16, 18, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ // CHECK-NEXT: pos[0] : ( 0, 10 )
+ // CHECK-NEXT: crd[0] : ( 1, 3, 4, 10, 16, 18, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 14
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 14,
- // CHECK-NEXT: crd[0] : ( 0, 1, 3, 4, 10, 11, 16, 17, 18, 20, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 1, 11, 2, 13, 14, 3, 15, 4, 16, 5, 6, 7, 8, 9,
+ // CHECK-NEXT: pos[0] : ( 0, 14 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 3, 4, 10, 11, 16, 17, 18, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 1, 11, 2, 13, 14, 3, 15, 4, 16, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 0, 6, 3, 28, 0, 6, 56, 72, 9,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 0, 6, 3, 28, 0, 6, 56, 72, 9 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 11, 17, 20,
- // CHECK-NEXT: values : ( 1, 3, 4, 5,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 11, 17, 20 )
+ // CHECK-NEXT: values : ( 1, 3, 4, 5 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9,
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31,
- // CHECK-NEXT: values : ( 0, 3, 11, 17, 20, 21, 28, 29, 31,
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2,
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6,
- // CHECK-NEXT: crd[1] : ( 0, 7, 0, 6, 1, 7,
- // CHECK-NEXT: values : ( 7, -5, -4, -3, -2, 7,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 7, 0, 6, 1, 7 )
+ // CHECK-NEXT: values : ( 7, -5, -4, -3, -2, 7 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10,
- // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1,
- // CHECK-NEXT: values : ( 2, 4, 1, 2.5, 1, 5, 2, 4, 5, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1 )
+ // CHECK-NEXT: values : ( 2, 4, 1, 2.5, 1, 5, 2, 4, 5, 4 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10,
- // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1,
- // CHECK-NEXT: values : ( 2, 4, 1, 2.5, 1, 5, 2, 4, 5, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1 )
+ // CHECK-NEXT: values : ( 2, 4, 1, 2.5, 1, 5, 2, 4, 5, 4 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10,
- // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1,
- // CHECK-NEXT: values : ( 2, 4, 1, 2.5, -1, -5, 2, 4, 1, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1 )
+ // CHECK-NEXT: values : ( 2, 4, 1, 2.5, -1, -5, 2, 4, 1, 4 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10,
- // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1,
- // CHECK-NEXT: values : ( 0, 1, -1, 1, -1, -2, -2, 2, 1, 2,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 8, 10 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 3, 1, 0, 1, 2, 3, 0, 1 )
+ // CHECK-NEXT: values : ( 0, 1, -1, 1, -1, -2, -2, 2, 1, 2 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 1, 3,
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4,
- // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0,
- // CHECK-NEXT: values : ( 1, 0, 0, 0,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1, 0 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 1, 5, 6,
- // CHECK-NEXT: crd[1] : ( 3, 0, 1, 2, 3, 1,
- // CHECK-NEXT: values : ( -1, -1, -5, -2, 4, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 5, 6 )
+ // CHECK-NEXT: crd[1] : ( 3, 0, 1, 2, 3, 1 )
+ // CHECK-NEXT: values : ( -1, -1, -5, -2, 4, 4 )
//
sparse_tensor.print %sv1 : tensor<?xf64, #SparseVector>
sparse_tensor.print %sv2 : tensor<?xf64, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
index 467b671500e17..ac5f773d67182 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_block3d.mlir
@@ -98,11 +98,11 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 4, 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 3
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 0, 2
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %a : tensor<4x4x4xi32, #Sparse1>
@@ -116,13 +116,13 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 4, 4, 4 )
// CHECK-NEXT: lvl = ( 2, 2, 2, 2, 2, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 2, 4
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 6, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 0
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 6, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %b : tensor<4x4x4xi32, #Sparse2>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cmp.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cmp.mlir
index 732bde55be91f..edeffea211717 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cmp.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cmp.mlir
@@ -132,22 +132,22 @@ module {
// CHECK-NEXT: nse = 16
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 11
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 9, 11
- // CHECK-NEXT: crd[1] : ( 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1
- // CHECK-NEXT: values : ( 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 9, 11 )
+ // CHECK-NEXT: crd[1] : ( 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 )
// CHECK-NEXT: ----
//
%v = vector.transfer_read %all_dn_out[%c0, %c0], %d0
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_collapse_shape.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_collapse_shape.mlir
index cae599fa30ae2..12132155e7cb3 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_collapse_shape.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_collapse_shape.mlir
@@ -162,18 +162,18 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 12 )
// CHECK-NEXT: lvl = ( 12 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10
- // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10 )
+ // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 12 )
// CHECK-NEXT: lvl = ( 12 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10
- // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10 )
+ // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3 )
// CHECK-NEXT: ----
//
// CHECK: ( ( 1, 0, 3, 0, 5, 0, 7, 0, 9, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), ( 21, 0, 23, 0, 25, 0, 27, 0, 29, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), ( 41, 0, 43, 0, 45, 0, 47, 0, 49, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) )
@@ -183,22 +183,22 @@ module {
// CHECK-NEXT: nse = 15
// CHECK-NEXT: dim = ( 6, 10 )
// CHECK-NEXT: lvl = ( 6, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 4
- // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 15
// CHECK-NEXT: dim = ( 6, 10 )
// CHECK-NEXT: lvl = ( 6, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 4
- // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49 )
// CHECK-NEXT: ----
//
// CHECK: ( ( 1, 0, 3, 0, 5, 0, 7, 0, 9, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), ( 21, 0, 23, 0, 25, 0, 27, 0, 29, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), ( 41, 0, 43, 0, 45, 0, 47, 0, 49, 0 ), ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) )
@@ -208,22 +208,22 @@ module {
// CHECK-NEXT: nse = 15
// CHECK-NEXT: dim = ( 6, 10 )
// CHECK-NEXT: lvl = ( 6, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 4
- // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 15
// CHECK-NEXT: dim = ( 6, 10 )
// CHECK-NEXT: lvl = ( 6, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 4
- // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 10, 15 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 6, 8, 0, 2, 4, 6, 8, 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 21, 23, 25, 27, 29, 41, 43, 45, 47, 49 )
// CHECK-NEXT: ----
//
%v0 = vector.transfer_read %collapse0[%c0], %df: tensor<12xf64>, vector<12xf64>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex32.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex32.mlir
index 9747da27f9e97..087360f7a1ceb 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex32.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex32.mlir
@@ -104,18 +104,18 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31,
- // CHECK-NEXT: values : ( ( 511.13, 2 ), ( 1, 0 ), ( 5, 4 ), ( 8, 6 ),
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31 )
+ // CHECK-NEXT: values : ( ( 511.13, 2 ), ( 1, 0 ), ( 5, 4 ), ( 8, 6 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 2,
- // CHECK-NEXT: crd[0] : ( 28, 31,
- // CHECK-NEXT: values : ( ( 6, 8 ), ( 15, 18 ),
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 28, 31 )
+ // CHECK-NEXT: values : ( ( 6, 8 ), ( 15, 18 ) )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xcomplex<f32>, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex64.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex64.mlir
index d4b43eb576762..3f748015c9580 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex64.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex64.mlir
@@ -101,18 +101,18 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31,
- // CHECK-NEXT: values : ( ( 511.13, 2 ), ( 1, 0 ), ( 5, 4 ), ( 8, 6 ),
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31 )
+ // CHECK-NEXT: values : ( ( 511.13, 2 ), ( 1, 0 ), ( 5, 4 ), ( 8, 6 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 2,
- // CHECK-NEXT: crd[0] : ( 28, 31,
- // CHECK-NEXT: values : ( ( 6, 8 ), ( 15, 18 ),
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 28, 31 )
+ // CHECK-NEXT: values : ( ( 6, 8 ), ( 15, 18 ) )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xcomplex<f64>, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex_ops.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex_ops.mlir
index c4fc8b0807877..2326234bc06cc 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex_ops.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex_ops.mlir
@@ -198,63 +198,63 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31,
- // CHECK-NEXT: values : ( ( -5.13, 2 ), ( 1, 0 ), ( 1, 4 ), ( 8, 6 ),
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 28, 31 )
+ // CHECK-NEXT: values : ( ( -5.13, 2 ), ( 1, 0 ), ( 1, 4 ), ( 8, 6 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 28, 31,
- // CHECK-NEXT: values : ( ( 3.43887, 1.47097 ), ( 3.85374, -27.0168 ), ( -193.43, 57.2184 ),
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 28, 31 )
+ // CHECK-NEXT: values : ( ( 3.43887, 1.47097 ), ( 3.85374, -27.0168 ), ( -193.43, 57.2184 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 28, 31,
- // CHECK-NEXT: values : ( ( 0.433635, 2.30609 ), ( 2, 1 ), ( 2.53083, 1.18538 ),
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 28, 31 )
+ // CHECK-NEXT: values : ( ( 0.433635, 2.30609 ), ( 2, 1 ), ( 2.53083, 1.18538 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 1, 28, 31,
- // CHECK-NEXT: values : ( ( 0.761594, 0 ), ( -0.964028, 0 ), ( 0.995055, 0 ),
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 1, 28, 31 )
+ // CHECK-NEXT: values : ( ( 0.761594, 0 ), ( -0.964028, 0 ), ( 0.995055, 0 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 28, 31,
- // CHECK-NEXT: values : ( ( -5.13, 2 ), ( 3, 4 ), ( 5, 6 ),
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 28, 31 )
+ // CHECK-NEXT: values : ( ( -5.13, 2 ), ( 3, 4 ), ( 5, 6 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 28, 31,
- // CHECK-NEXT: values : ( ( -2.565, 1 ), ( 1.5, 2 ), ( 2.5, 3 ),
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 28, 31 )
+ // CHECK-NEXT: values : ( ( -2.565, 1 ), ( 1.5, 2 ), ( 2.5, 3 ) )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 28, 31,
- // CHECK-NEXT: values : ( 5.50608, 5, 7.81025,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 28, 31 )
+ // CHECK-NEXT: values : ( 5.50608, 5, 7.81025 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xcomplex<f64>, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_constant_to_sparse_tensor.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_constant_to_sparse_tensor.mlir
index abdbf80d0bc41..51c13085cf3e9 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_constant_to_sparse_tensor.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_constant_to_sparse_tensor.mlir
@@ -56,11 +56,11 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 10, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 4, 5, 6, 9
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 5, 7, 8
- // CHECK-NEXT: crd[1] : ( 0, 7, 2, 2, 3, 4, 6, 7
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 4, 5, 6, 9 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 5, 7, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 7, 2, 2, 3, 4, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %ts : tensor<10x8xf64, #Tensor1>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_1d_nwc_wcf.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_1d_nwc_wcf.mlir
index 612e62bd34d28..3e46b6d65112f 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_1d_nwc_wcf.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_1d_nwc_wcf.mlir
@@ -116,13 +116,13 @@ func.func @main() {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 3, 6, 1 )
// CHECK-NEXT: lvl = ( 3, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
- // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- // CHECK-NEXT: values : ( 12, 28, 28, 28, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 )
+ // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
+ // CHECK-NEXT: values : ( 12, 28, 28, 28, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CCC_ret : tensor<?x?x?xf32, #CCC>
@@ -132,11 +132,11 @@ func.func @main() {
// CHECK-NEXT: nse = 18
// CHECK-NEXT: dim = ( 3, 6, 1 )
// CHECK-NEXT: lvl = ( 3, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
- // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- // CHECK-NEXT: values : ( 12, 28, 28, 28, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 )
+ // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
+ // CHECK-NEXT: values : ( 12, 28, 28, 28, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CDC_ret : tensor<?x?x?xf32, #CDC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d.mlir
index 55d4caeb7eb30..97e9d1783f67f 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d.mlir
@@ -187,11 +187,11 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<6x6xi32, #DCSR>
@@ -203,11 +203,11 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<6x6xi32, #DCSR>
@@ -219,9 +219,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<6x6xi32, #CSR>
@@ -233,9 +233,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %4 : tensor<6x6xi32, #CDR>
@@ -247,9 +247,9 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: values : ( 0, -1, 0, -1, 0, 2, 0, 0, -1, 0, 0, -1, -1, 1, 1, 0, 3, 3, -6, 0, 0, 0, 6, 0, -1, 1, 0, 0, -3, -3, 6, 0, 0, 0, -6, 0
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: values : ( 0, -1, 0, -1, 0, 2, 0, 0, -1, 0, 0, -1, -1, 1, 1, 0, 3, 3, -6, 0, 0, 0, 6, 0, -1, 1, 0, 0, -3, -3, 6, 0, 0, 0, -6, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %5 : tensor<6x6xi32, #CSC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nhwc_hwcf.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nhwc_hwcf.mlir
index d04311e59bafa..429175c1a1645 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nhwc_hwcf.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_2d_nhwc_hwcf.mlir
@@ -147,27 +147,27 @@ func.func @main() {
// CHECK-NEXT: nse = 108
// CHECK-NEXT: dim = ( 3, 6, 6, 1 )
// CHECK-NEXT: lvl = ( 3, 6, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0,
// CHECK-SAME: 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
// CHECK-SAME: 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[3] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
// CHECK-SAME: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
// CHECK-SAME: 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
// CHECK-SAME: 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
// CHECK-SAME: 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- // CHECK-SAME: 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
+ // CHECK-SAME: 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108 )
// CHECK-NEXT: crd[3] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0
+ // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0 )
// CHECK-NEXT: values : ( 108, 124, 124, 124, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -175,7 +175,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108
+ // CHECK-SAME: 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CCCC_ret : tensor<?x?x?x?xf32, #CCCC>
@@ -185,14 +185,14 @@ func.func @main() {
// CHECK-NEXT: nse = 108
// CHECK-NEXT: dim = ( 3, 6, 6, 1 )
// CHECK-NEXT: lvl = ( 3, 6, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0,
// CHECK-SAME: 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
// CHECK-SAME: 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 124, 124, 124, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -200,7 +200,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108
+ // CHECK-SAME: 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CDCD_ret : tensor<?x?x?x?xf32, #CDCD>
@@ -210,14 +210,14 @@ func.func @main() {
// CHECK-NEXT: nse = 108
// CHECK-NEXT: dim = ( 3, 6, 6, 1 )
// CHECK-NEXT: lvl = ( 3, 6, 6, 1 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0,
// CHECK-SAME: 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
// CHECK-SAME: 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 124, 124, 124, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -225,7 +225,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108
+ // CHECK-SAME: 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %DCCD_ret : tensor<?x?x?x?xf32, #DCCD>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d.mlir
index 5e2d1707a2495..b23b2dcc173d9 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d.mlir
@@ -171,14 +171,14 @@ func.func @main() {
// CHECK-NEXT: nse = 216
// CHECK-NEXT: dim = ( 6, 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
// CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
- // CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78,
// CHECK-SAME: 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150,
- // CHECK-SAME: 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216
+ // CHECK-SAME: 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0,
// CHECK-SAME: 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
@@ -190,7 +190,7 @@ func.func @main() {
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
// CHECK-SAME: 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4,
- // CHECK-SAME: 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 124, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -208,7 +208,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CCC_ret : tensor<?x?x?xf32, #CCC>
@@ -218,11 +218,11 @@ func.func @main() {
// CHECK-NEXT: nse = 216
// CHECK-NEXT: dim = ( 6, 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84,
// CHECK-SAME: 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156,
- // CHECK-SAME: 162, 168, 174, 180, 186, 192, 198, 204, 210, 216
+ // CHECK-SAME: 162, 168, 174, 180, 186, 192, 198, 204, 210, 216 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
@@ -233,7 +233,7 @@ func.func @main() {
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
// CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
- // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 124, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -251,7 +251,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CDC_ret : tensor<?x?x?xf32, #CDC>
@@ -263,7 +263,7 @@ func.func @main() {
// CHECK-NEXT: lvl = ( 6, 6, 6 )
// CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90,
// CHECK-SAME: 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162,
- // CHECK-SAME: 168, 174, 180, 186, 192, 198, 204, 210, 216
+ // CHECK-SAME: 168, 174, 180, 186, 192, 198, 204, 210, 216 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
@@ -274,7 +274,7 @@ func.func @main() {
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
// CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
- // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 124, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -292,7 +292,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %DDC_ret : tensor<?x?x?xf32, #DDC>
@@ -302,12 +302,12 @@ func.func @main() {
// CHECK-NEXT: nse = 216
// CHECK-NEXT: dim = ( 6, 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
// CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
- // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90,
// CHECK-SAME: 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162,
- // CHECK-SAME: 168, 174, 180, 186, 192, 198, 204, 210, 216
+ // CHECK-SAME: 168, 174, 180, 186, 192, 198, 204, 210, 216 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
@@ -318,7 +318,7 @@ func.func @main() {
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
// CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
- // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 108, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 124, 108, 108, 108, 108, 108, 124, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -336,7 +336,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %DCC_ret : tensor<?x?x?xf32, #DCC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d_ndhwc_dhwcf.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d_ndhwc_dhwcf.mlir
index f68e429a3c821..8fb6704c7f509 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d_ndhwc_dhwcf.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conv_3d_ndhwc_dhwcf.mlir
@@ -155,16 +155,16 @@ func.func @main() {
// CHECK-NEXT: nse = 216
// CHECK-NEXT: dim = ( 1, 6, 6, 6, 1 )
// CHECK-NEXT: lvl = ( 1, 6, 6, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 1
- // CHECK-NEXT: crd[0] : ( 0
- // CHECK-NEXT: pos[1] : ( 0, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36
+ // CHECK-NEXT: pos[0] : ( 0, 1 )
+ // CHECK-NEXT: crd[0] : ( 0 )
+ // CHECK-NEXT: pos[1] : ( 0, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[3] : ( 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96,
// CHECK-SAME: 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174,
- // CHECK-SAME: 180, 186, 192, 198, 204, 210, 216
+ // CHECK-SAME: 180, 186, 192, 198, 204, 210, 216 )
// CHECK-NEXT: crd[3] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
@@ -174,7 +174,7 @@ func.func @main() {
// CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
// CHECK-SAME: 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
- // CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[4] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
// CHECK-SAME: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
// CHECK-SAME: 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
@@ -189,7 +189,7 @@ func.func @main() {
// CHECK-SAME: 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
// CHECK-SAME: 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
// CHECK-SAME: 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
- // CHECK-SAME: 215, 216
+ // CHECK-SAME: 215, 216 )
// CHECK-NEXT: crd[4] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -199,7 +199,7 @@ func.func @main() {
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0
+ // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0 )
// CHECK-NEXT: values : ( 108, 124, 124, 124, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -215,7 +215,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CCCCC_ret : tensor<?x?x?x?x?xf32, #CCCCC>
@@ -229,11 +229,11 @@ func.func @main() {
// CHECK-NEXT: nse = 216
// CHECK-NEXT: dim = ( 1, 6, 6, 6, 1 )
// CHECK-NEXT: lvl = ( 1, 6, 6, 6, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 1
- // CHECK-NEXT: crd[0] : ( 0
- // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36
+ // CHECK-NEXT: pos[0] : ( 0, 1 )
+ // CHECK-NEXT: crd[0] : ( 0 )
+ // CHECK-NEXT: pos[2] : ( 0, 6, 12, 18, 24, 30, 36 )
// CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: pos[4] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
// CHECK-SAME: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
// CHECK-SAME: 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
@@ -248,7 +248,7 @@ func.func @main() {
// CHECK-SAME: 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
// CHECK-SAME: 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
// CHECK-SAME: 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
- // CHECK-SAME: 215, 216
+ // CHECK-SAME: 215, 216 )
// CHECK-NEXT: crd[4] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -258,7 +258,7 @@ func.func @main() {
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0
+ // CHECK-SAME: 0, 0, 0, 0, 0, 0, 0, 0, 0 )
// CHECK-NEXT: values : ( 108, 124, 124, 124, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
@@ -274,7 +274,7 @@ func.func @main() {
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
// CHECK-SAME: 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
- // CHECK-SAME: 108, 108, 108, 108, 108, 108
+ // CHECK-SAME: 108, 108, 108, 108, 108, 108 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CDCDC_ret : tensor<?x?x?x?x?xf32, #CDCDC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
index 8024c12818959..5de3aa0a2e971 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
@@ -98,156 +98,156 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 4, 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 4, 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 4, 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 4, 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9, 12, 15, 18, 21, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 1, 5, 9, 13, 17, 21, 2, 6, 10, 14, 18, 22, 3, 7, 11, 15, 19, 23, 4, 8, 12, 16, 20, 24 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<2x3x4xf64, #Tensor1>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_block.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_block.mlir
index ff22283f43a79..66215a340a0b6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_block.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_block.mlir
@@ -82,36 +82,36 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 2, 4 )
// CHECK-NEXT: lvl = ( 1, 2, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2
- // CHECK-NEXT: crd[1] : ( 0, 1
- // CHECK-NEXT: values : ( 1, 2, 5, 6, 3, 4, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 5, 6, 3, 4, 7, 8 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 2, 4 )
// CHECK-NEXT: lvl = ( 1, 2, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2
- // CHECK-NEXT: crd[1] : ( 0, 1
- // CHECK-NEXT: values : ( 1, 2, 5, 6, 3, 4, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 5, 6, 3, 4, 7, 8 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 2, 4 )
// CHECK-NEXT: lvl = ( 2, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 2, 4 )
// CHECK-NEXT: lvl = ( 4, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1, 5, 2, 6, 3, 7, 4, 8
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 5, 2, 6, 3, 7, 4, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<2x4xf64, #BSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_dyn.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_dyn.mlir
index 11baf65e63509..0d9722cd37e65 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_dyn.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_dyn.mlir
@@ -67,66 +67,66 @@ module {
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 63
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 63 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 63
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 63 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 63
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 63 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<?x?xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_ptr.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_ptr.mlir
index 6005aa6cfeaed..531efb4f7f37f 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_ptr.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_ptr.mlir
@@ -78,64 +78,64 @@ module {
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 63
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 63 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 64, 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 63
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31
- // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 63 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 31, 0, 1, 0, 31 )
+ // CHECK-NEXT: values : ( 1, 4, 6, 2, 5, 3, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 32, 64 )
// CHECK-NEXT: lvl = ( 32, 64 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 31
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7
- // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 63, 0, 1, 0, 63 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<32x64xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_coo_test.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_coo_test.mlir
index 16813e0aa707b..c16ae0de18203 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_coo_test.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_coo_test.mlir
@@ -209,21 +209,21 @@ module {
// CHECK-NEXT: nse = 64
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 64
+ // CHECK-NEXT: pos[0] : ( 0, 64 )
// CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
// CHECK-SAME: 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
// CHECK-SAME: 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7,
- // CHECK-SAME: 7, 7, 7, 7
+ // CHECK-SAME: 7, 7, 7, 7 )
// CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3,
// CHECK-SAME: 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
// CHECK-SAME: 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3,
- // CHECK-SAME: 4, 5, 6, 7
+ // CHECK-SAME: 4, 5, 6, 7 )
// CHECK-NEXT: values : ( 8.8, 4.8, 6.8, 4.8, 8.8, 6.1, 14.8, 16.8, 4.4, 4.4, 4.4, 8.4,
// CHECK-SAME: 8.4, 12.4, 16.4, 16.4, 8.8, 4.8, 6.8, 8.8, 8.8, 12.8, 14.8,
// CHECK-SAME: 15.8, 4.3, 5.3, 6.3, 8.3, 8.3, 12.3, 14.3, 16.3, 4.5, 4.5,
// CHECK-SAME: 6.5, 8.5, 8.5, 12.5, 14.5, 16.5, 9.9, 4.9, 6.9, 8.9, 8.9,
// CHECK-SAME: 12.9, 15.9, 16.9, 12.1, 6.1, 5.1, 9.1, 9.1, 13.1, 15.1, 17.1,
- // CHECK-SAME: 15.4, 5.4, 7.4, 5.4, 11.4, 10.4, 11.4, 9.4
+ // CHECK-SAME: 15.4, 5.4, 7.4, 5.4, 11.4, 10.4, 11.4, 9.4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %COO_RET : tensor<8x8xf32, #SortedCOOSoA>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_dot.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_dot.mlir
index 5451f2d957ad3..b41fda19459e6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_dot.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_dot.mlir
@@ -67,18 +67,18 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 1024 )
// CHECK-NEXT: lvl = ( 1024 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 0, 1, 22, 23, 1022
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 22, 23, 1022 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 1024 )
// CHECK-NEXT: lvl = ( 1024 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 22, 1022, 1023
- // CHECK-NEXT: values : ( 6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 22, 1022, 1023 )
+ // CHECK-NEXT: values : ( 6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %s1 : tensor<1024xf32, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_ds.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_ds.mlir
index f4ae33a42d06a..17fab93b9b217 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_ds.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_ds.mlir
@@ -79,9 +79,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 8 )
// CHECK-NEXT: lvl = ( 3, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, )
- // CHECK-NEXT: crd[1] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %A1 : tensor<?x?xf64, #CSR>
@@ -93,9 +93,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 8 )
// CHECK-NEXT: lvl = ( 3, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 8, 12,
- // CHECK-NEXT: crd[1] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 8, 12, {{.*}} )
+ // CHECK-NEXT: crd[1] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %A2 : tensor<?x?xf64, #CSR_hi>
@@ -107,8 +107,8 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 8 )
// CHECK-NEXT: lvl = ( 3, 2, 4 )
- // CHECK-NEXT: crd[2] : ( 2, 3, 1, 3, 1, 2, 0, 3, 0, 2, 0, 1, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ // CHECK-NEXT: crd[2] : ( 2, 3, 1, 3, 1, 2, 0, 3, 0, 2, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 )
// CHECK-NEXT: ----
// CHECK-NEXT: ---- Sparse Tensor ----
//
@@ -120,8 +120,8 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 8 )
// CHECK-NEXT: lvl = ( 3, 1, 8 )
- // CHECK-NEXT: crd[2] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ // CHECK-NEXT: crd[2] : ( 2, 3, 5, 7, 1, 2, 4, 7, 0, 2, 4, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %A4 : tensor<?x?xf64, #NV_58>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_empty.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_empty.mlir
index 7fc37eade720d..7255649ccd424 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_empty.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_empty.mlir
@@ -98,36 +98,36 @@ module {
// CHECK-NEXT: nse = 0
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 0, )
- // CHECK-NEXT: crd[0] : ( )
- // CHECK-NEXT: values : ( )
+ // CHECK-NEXT: pos[0] : ( 0, 0 )
+ // CHECK-NEXT: crd[0] : ( )
+ // CHECK-NEXT: values : ( )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 0
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 0,
- // CHECK-NEXT: crd[0] : ( )
- // CHECK-NEXT: values : ( )
+ // CHECK-NEXT: pos[0] : ( 0, 0 )
+ // CHECK-NEXT: crd[0] : ( )
+ // CHECK-NEXT: values : ( )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 0
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 0, )
- // CHECK-NEXT: crd[0] : ( )
- // CHECK-NEXT: values : ( )
+ // CHECK-NEXT: pos[0] : ( 0, 0 )
+ // CHECK-NEXT: crd[0] : ( )
+ // CHECK-NEXT: values : ( )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 10, )
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
- // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, )
+ // CHECK-NEXT: pos[0] : ( 0, 10 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<10xf32, #SV>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand.mlir
index 451195b2185b7..6e875de7481ec 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand.mlir
@@ -86,13 +86,13 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 8, 4 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32
+ // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32 )
// CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0,
- // CHECK-SAME: 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7
+ // CHECK-SAME: 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: values : ( 32.53, 34.56, 36.59, 38.62, 40.65, 42.68, 44.71, 46.74,
// CHECK-SAME: 35.73, 37.96, 40.19, 42.42, 44.65, 46.88, 49.11, 51.34,
// CHECK-SAME: 38.93, 41.36, 43.79, 46.22, 48.65, 51.08, 53.51, 55.94,
- // CHECK-SAME: 42.13, 44.76, 47.39, 50.02, 52.65, 55.28, 57.91, 60.54
+ // CHECK-SAME: 42.13, 44.76, 47.39, 50.02, 52.65, 55.28, 57.91, 60.54 )
// CHECK-NEXT: ----
//
sparse_tensor.print %x3 : tensor<8x4xf64, #CSC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand_shape.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand_shape.mlir
index 3932424845763..5e021596efea6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand_shape.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_expand_shape.mlir
@@ -200,74 +200,74 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 11
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 11 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2
- // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 11
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1, 3, 5, 7, 9, 11 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 2, 2 )
// CHECK-NEXT: lvl = ( 3, 2, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 2, 2 )
// CHECK-NEXT: lvl = ( 3, 2, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 2, 2 )
// CHECK-NEXT: lvl = ( 3, 2, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 2, 2 )
// CHECK-NEXT: lvl = ( 3, 2, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
- // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 6, 8, 10, 12 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 )
+ // CHECK-NEXT: values : ( 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4, 3.1, 3.2, 3.3, 3.4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %expand2 : tensor<3x4xf64, #SparseMatrix>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir
index 37ff2e3ffd3f4..93b8eda2c2aec 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir
@@ -106,13 +106,13 @@ module {
// CHECK-NEXT: nse = 36
// CHECK-NEXT: dim = ( 6, 6 )
// CHECK-NEXT: lvl = ( 6, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5
- // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 6, 12, 18, 24, 30, 36 )
// CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4,
- // CHECK-SAME: 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
+ // CHECK-SAME: 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5 )
// CHECK-NEXT: values : ( 0, 0, -1, -6, -1, 6, -1, 0, 1, 0, 1, 0, 0, -1, 1,
- // CHECK-SAME: 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0
+ // CHECK-SAME: 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 3, 6, -3, -6, 2, -1, 3, 0, -3, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<6x6xi32, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_index.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_index.mlir
index 3ce45e5fd971f..0053984458281 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_index.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_index.mlir
@@ -212,80 +212,80 @@ module {
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 8 )
// CHECK-NEXT: lvl = ( 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 2, 4
- // CHECK-NEXT: values : ( 20, 80
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 2, 4 )
+ // CHECK-NEXT: values : ( 20, 80 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 8 )
// CHECK-NEXT: lvl = ( 8 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: values : ( 0, 1, 12, 3, 24, 5, 6, 7
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 0, 1, 12, 3, 24, 5, 6, 7 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 8 )
// CHECK-NEXT: lvl = ( 8 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: values : ( 0, 2, 8, 24, 64, 160, 384, 896
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 0, 2, 8, 24, 64, 160, 384, 896 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 8 )
// CHECK-NEXT: lvl = ( 8 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: values : ( 1, 3, 6, 11, 20, 37, 70, 135
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 3, 6, 11, 20, 37, 70, 135 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 1, 3
- // CHECK-NEXT: values : ( 10, 120
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 1, 3 )
+ // CHECK-NEXT: values : ( 10, 120 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 0, 1, 2, 3, 1, 12, 3, 4, 2, 3, 4, 25
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 0, 1, 2, 3, 1, 12, 3, 4, 2, 3, 4, 25 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 0, 0, 0, 0, 0, 2, 2, 3, 0, 2, 12, 24
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 0, 0, 0, 0, 0, 2, 2, 3, 0, 2, 12, 24 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 3, 4 )
// CHECK-NEXT: lvl = ( 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 2, 4, 4, 5, 3, 4, 7, 9
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 2, 4, 4, 5, 3, 4, 7, 9 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<8xi64, #SparseVector>
@@ -304,11 +304,11 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 2, 3 )
// CHECK-NEXT: lvl = ( 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 0, 10, 0, 1, 1, 42
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 0, 10, 0, 1, 1, 42 )
// CHECK-NEXT: ----
//
%100 = call @add_outer_2d(%sf32) : (tensor<2x3xf32, #SparseMatrix>)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_1d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_1d.mlir
index 12e0d2267a265..a81ec172f599d 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_1d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_1d.mlir
@@ -65,9 +65,9 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 1024 )
// CHECK-NEXT: lvl = ( 1024 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 1, 3, 1023,
- // CHECK-NEXT: values : ( 1, 2, 3, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 3, 1023 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %5 : tensor<1024xf32, #SparseVector>
@@ -86,9 +86,9 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 1024 )
// CHECK-NEXT: lvl = ( 1024 )
- // CHECK-NEXT: pos[0] : ( 0, 8,
- // CHECK-NEXT: crd[0] : ( 0, 3, 6, 9, 12, 15, 18, 21,
- // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1,
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 6, 9, 12, 15, 18, 21 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %8 : tensor<1024xf32, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_2d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_2d.mlir
index 8831091506533..baab6e7598868 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_2d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_2d.mlir
@@ -68,7 +68,7 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 4,
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 4 )
// CHECK-NEXT: ----
//
%densea = tensor.empty() : tensor<4x3xf64, #Dense>
@@ -86,10 +86,10 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4,
- // CHECK-NEXT: crd[0] : ( 0, 2, 3, 3,
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2,
- // CHECK-NEXT: values : ( 1, 2, 3, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4 )
// CHECK-NEXT: ----
//
%cooa = tensor.empty() : tensor<4x3xf64, #SortedCOO>
@@ -107,9 +107,9 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 4,
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2,
- // CHECK-NEXT: values : ( 1, 2, 3, 4,
+ // CHECK-NEXT: pos[1] : ( 0, 1, 1, 2, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4 )
// CHECK-NEXT: ----
//
%csra = tensor.empty() : tensor<4x3xf64, #CSR>
@@ -127,11 +127,11 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 2, 3,
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4,
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2,
- // CHECK-NEXT: values : ( 1, 2, 3, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4 )
// CHECK-NEXT: ----
//
%dcsra = tensor.empty() : tensor<4x3xf64, #DCSR>
@@ -149,9 +149,9 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 2, 3,
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 2, 3, 0, 4,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 2, 3, 0, 4 )
// CHECK-NEXT: ----
//
%rowa = tensor.empty() : tensor<4x3xf64, #Row>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_3d.mlir
index db6612402357e..12ef94fc2baa2 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_insert_3d.mlir
@@ -64,11 +64,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 5, 4, 3 )
// CHECK-NEXT: lvl = ( 5, 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 3, 4
- // CHECK-NEXT: pos[2] : ( 0, 2, 2, 2, 3, 3, 3, 4, 5
- // CHECK-NEXT: crd[2] : ( 1, 2, 1, 2, 2
- // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 3, 4 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 2, 2, 3, 3, 3, 4, 5 )
+ // CHECK-NEXT: crd[2] : ( 1, 2, 1, 2, 2 )
+ // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5 )
// CHECK-NEXT: ----
%tensora = tensor.empty() : tensor<5x4x3xf64, #TensorCSR>
%tensor1 = tensor.insert %f1 into %tensora[%c3, %c0, %c1] : tensor<5x4x3xf64, #TensorCSR>
@@ -83,11 +83,11 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 5, 4, 3 )
// CHECK-NEXT: lvl = ( 5, 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 3, 4
- // CHECK-NEXT: pos[1] : ( 0, 2, 4
- // CHECK-NEXT: crd[1] : ( 0, 3, 2, 3
- // CHECK-NEXT: values : ( 0, 1.1, 2.2, 0, 3.3, 0, 0, 0, 4.4, 0, 0, 5.5
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 3, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 2, 3 )
+ // CHECK-NEXT: values : ( 0, 1.1, 2.2, 0, 3.3, 0, 0, 0, 4.4, 0, 0, 5.5 )
// CHECK-NEXT: ----
%rowa = tensor.empty() : tensor<5x4x3xf64, #TensorRow>
%row1 = tensor.insert %f1 into %rowa[%c3, %c0, %c1] : tensor<5x4x3xf64, #TensorRow>
@@ -102,11 +102,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 5, 4, 3 )
// CHECK-NEXT: lvl = ( 5, 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 3, 4
- // CHECK-NEXT: pos[1] : ( 0, 3, 5
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 1, 2, 2, 3, 2
- // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 3, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 1, 2, 2, 3, 2 )
+ // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5 )
// CHECK-NEXT: ----
%ccoo = tensor.empty() : tensor<5x4x3xf64, #CCoo>
%ccoo1 = tensor.insert %f1 into %ccoo[%c3, %c0, %c1] : tensor<5x4x3xf64, #CCoo>
@@ -121,9 +121,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 5, 4, 3 )
// CHECK-NEXT: lvl = ( 5, 4, 3 )
- // CHECK-NEXT: pos[1] : ( 0, 0, 0, 0, 3, 5
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 1, 2, 2, 3, 2
- // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5
+ // CHECK-NEXT: pos[1] : ( 0, 0, 0, 0, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 1, 2, 2, 3, 2 )
+ // CHECK-NEXT: values : ( 1.1, 2.2, 3.3, 4.4, 5.5 )
// CHECK-NEXT: ----
%dcoo = tensor.empty() : tensor<5x4x3xf64, #DCoo>
%dcoo1 = tensor.insert %f1 into %dcoo[%c3, %c0, %c1] : tensor<5x4x3xf64, #DCoo>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
index c05a9f5742690..cfaf4b9754232 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
@@ -43,9 +43,9 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 5, 4 )
// CHECK-NEXT: lvl = ( 5, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 8, 9, 9, 13
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 2, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 5.5, 9, 10, 11, 12, 13, 14, 15, 16
+ // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 8, 9, 9, 13, {{.*}} )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 2, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 5.5, 9, 10, 11, 12, 13, 14, 15, 16 )
// CHECK-NEXT: ----
//
sparse_tensor.print %s : tensor<5x4xf64, #CSR_hi>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul.mlir
index e505559037a99..14fa22a701347 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul.mlir
@@ -146,9 +146,9 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: values : ( 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2, 1.3, 2.3, 3.3, 4.3, 5.3, 6.3, 7.3, 8.3, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4, 8.4
+ // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2, 1.3, 2.3, 3.3, 4.3, 5.3, 6.3, 7.3, 8.3, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4, 8.4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %a1 : tensor<4x8xf64, #CSR>
@@ -158,11 +158,11 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: values : ( 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2, 1.3, 2.3, 3.3, 4.3, 5.3, 6.3, 7.3, 8.3, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4, 8.4
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 8, 16, 24, 32 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2, 1.3, 2.3, 3.3, 4.3, 5.3, 6.3, 7.3, 8.3, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4, 8.4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %a2 : tensor<4x8xf64, #DCSR>
@@ -172,9 +172,9 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 4
- // CHECK-NEXT: crd[1] : ( 1, 5, 1, 7
- // CHECK-NEXT: values : ( 2.1, 6.1, 2.3, 1
+ // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 4 )
+ // CHECK-NEXT: crd[1] : ( 1, 5, 1, 7 )
+ // CHECK-NEXT: values : ( 2.1, 6.1, 2.3, 1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %a3 : tensor<4x8xf64, #CSR>
@@ -184,11 +184,11 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4
- // CHECK-NEXT: crd[1] : ( 1, 5, 1, 7
- // CHECK-NEXT: values : ( 2.1, 6.1, 2.3, 1
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4 )
+ // CHECK-NEXT: crd[1] : ( 1, 5, 1, 7 )
+ // CHECK-NEXT: values : ( 2.1, 6.1, 2.3, 1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %a4 : tensor<4x8xf64, #DCSR>
@@ -198,9 +198,9 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 8, 4 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16, 20, 24, 28, 32
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 10.1, 11.1, 12.1, 13.1, 10.2, 11.2, 12.2, 13.2, 10.3, 11.3, 12.3, 13.3, 10.4, 11.4, 12.4, 13.4, 10.5, 11.5, 12.5, 13.5, 10.6, 11.6, 12.6, 13.6, 10.7, 11.7, 12.7, 13.7, 10.8, 11.8, 12.8, 13.8
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16, 20, 24, 28, 32 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 10.1, 11.1, 12.1, 13.1, 10.2, 11.2, 12.2, 13.2, 10.3, 11.3, 12.3, 13.3, 10.4, 11.4, 12.4, 13.4, 10.5, 11.5, 12.5, 13.5, 10.6, 11.6, 12.6, 13.6, 10.7, 11.7, 12.7, 13.7, 10.8, 11.8, 12.8, 13.8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %b1 : tensor<8x4xf64, #CSR>
@@ -210,11 +210,11 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 8, 4 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16, 20, 24, 28, 32
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 10.1, 11.1, 12.1, 13.1, 10.2, 11.2, 12.2, 13.2, 10.3, 11.3, 12.3, 13.3, 10.4, 11.4, 12.4, 13.4, 10.5, 11.5, 12.5, 13.5, 10.6, 11.6, 12.6, 13.6, 10.7, 11.7, 12.7, 13.7, 10.8, 11.8, 12.8, 13.8
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16, 20, 24, 28, 32 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 10.1, 11.1, 12.1, 13.1, 10.2, 11.2, 12.2, 13.2, 10.3, 11.3, 12.3, 13.3, 10.4, 11.4, 12.4, 13.4, 10.5, 11.5, 12.5, 13.5, 10.6, 11.6, 12.6, 13.6, 10.7, 11.7, 12.7, 13.7, 10.8, 11.8, 12.8, 13.8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %b2 : tensor<8x4xf64, #DCSR>
@@ -224,9 +224,9 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 8, 4 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 4, 5, 6, 8
- // CHECK-NEXT: crd[1] : ( 3, 2, 1, 0, 1, 2, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 4, 5, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 3, 2, 1, 0, 1, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %b3 : tensor<8x4xf64, #CSR>
@@ -236,11 +236,11 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 8, 4 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 7
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 5, 6, 7
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 5, 6, 8
- // CHECK-NEXT: crd[1] : ( 3, 2, 1, 0, 1, 2, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 7 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 5, 6, 7 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 5, 6, 8 )
+ // CHECK-NEXT: crd[1] : ( 3, 2, 1, 0, 1, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %b4 : tensor<8x4xf64, #DCSR>
@@ -289,9 +289,9 @@ module {
// CHECK-NEXT: nse = 16
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 388.76, 425.56, 462.36, 499.16, 397.12, 434.72, 472.32, 509.92, 405.48, 443.88, 482.28, 520.68, 413.84, 453.04, 492.24, 531.44
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 388.76, 425.56, 462.36, 499.16, 397.12, 434.72, 472.32, 509.92, 405.48, 443.88, 482.28, 520.68, 413.84, 453.04, 492.24, 531.44 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<4x4xf64, #CSR>
@@ -301,11 +301,11 @@ module {
// CHECK-NEXT: nse = 16
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 388.76, 425.56, 462.36, 499.16, 397.12, 434.72, 472.32, 509.92, 405.48, 443.88, 482.28, 520.68, 413.84, 453.04, 492.24, 531.44
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12, 16 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 388.76, 425.56, 462.36, 499.16, 397.12, 434.72, 472.32, 509.92, 405.48, 443.88, 482.28, 520.68, 413.84, 453.04, 492.24, 531.44 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<4x4xf64, #DCSR>
@@ -324,9 +324,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 86.08, 94.28, 102.48, 110.68, 23.46, 25.76, 28.06, 30.36, 10.8, 11.8, 12.8, 13.8
+ // CHECK-NEXT: pos[1] : ( 0, 4, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 86.08, 94.28, 102.48, 110.68, 23.46, 25.76, 28.06, 30.36, 10.8, 11.8, 12.8, 13.8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %4 : tensor<4x4xf64, #CSR>
@@ -336,11 +336,11 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 86.08, 94.28, 102.48, 110.68, 23.46, 25.76, 28.06, 30.36, 10.8, 11.8, 12.8, 13.8
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 4, 8, 12 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 86.08, 94.28, 102.48, 110.68, 23.46, 25.76, 28.06, 30.36, 10.8, 11.8, 12.8, 13.8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %5 : tensor<4x4xf64, #DCSR>
@@ -359,9 +359,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 5
- // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3
- // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %7 : tensor<4x4xf64, #CSR>
@@ -371,11 +371,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 5
- // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3
- // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %8 : tensor<4x4xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul_slice.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul_slice.mlir
index 58e96d1fa51fa..c76bf2ccfe35e 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul_slice.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul_slice.mlir
@@ -174,11 +174,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 5
- // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3
- // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<4x4xf64, #DCSR>
@@ -196,9 +196,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 5
- // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3
- // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8
+ // CHECK-NEXT: pos[1] : ( 0, 2, 2, 3, 5 )
+ // CHECK-NEXT: crd[1] : ( 1, 2, 2, 2, 3 )
+ // CHECK-NEXT: values : ( 30.5, 4.2, 4.6, 7, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<4x4xf64, #CSR>
@@ -210,9 +210,9 @@ module {
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 2, 3
- // CHECK-NEXT: crd[1] : ( 0, 0, 0
- // CHECK-NEXT: values : ( 2.3, 6.9, 12.6
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 0 )
+ // CHECK-NEXT: values : ( 2.3, 6.9, 12.6 )
// CHECK-NEXT: ----
//
%s1 = tensor.extract_slice %tmp[0, 1][4, 4][2, 1] : tensor<8x8xf64, #DCSR> to tensor<4x4xf64, #DCSR_SLICE_1>
@@ -228,9 +228,9 @@ module {
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 0, 1, 0, 3, 0
- // CHECK-NEXT: values : ( 2.3, 6.9, 12.6
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 1, 0, 3, 0 )
+ // CHECK-NEXT: values : ( 2.3, 6.9, 12.6 )
// CHECK-NEXT: ----
//
%t1_coo = sparse_tensor.convert %sa : tensor<8x8xf64> to tensor<8x8xf64, #COO>
@@ -246,9 +246,9 @@ module {
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 2, 3
- // CHECK-NEXT: crd[1] : ( 0, 0, 0
- // CHECK-NEXT: values : ( 2.3, 6.9, 12.6
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 0 )
+ // CHECK-NEXT: values : ( 2.3, 6.9, 12.6 )
// CHECK-NEXT: ----
//
%s1_dyn = tensor.extract_slice %tmp[%c_0, %c_1][4, 4][%c_2, %c_1] : tensor<8x8xf64, #DCSR> to tensor<4x4xf64, #DCSR_SLICE_dyn>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matrix_ops.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matrix_ops.mlir
index 8ea26fa3efdf5..770c4f55a2806 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matrix_ops.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matrix_ops.mlir
@@ -163,11 +163,11 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sm1 : tensor<?x?xf64, #DCSR>
@@ -177,11 +177,11 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 7, 0, 6, 1, 7
- // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 1
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 7, 0, 6, 1, 7 )
+ // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sm2 : tensor<?x?xf64, #DCSR>
@@ -191,11 +191,11 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xf64, #DCSR>
@@ -205,11 +205,11 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<?x?xf64, #DCSR>
@@ -219,11 +219,11 @@ module {
// CHECK-NEXT: nse = 13
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 3, 6, 10, 13
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 0, 6, 7, 1, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 8, 4, 5, 4, 3, 6, 2, 8, 10, 13, 14, 16, 18
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6, 10, 13 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 0, 6, 7, 1, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 8, 4, 5, 4, 3, 6, 2, 8, 10, 13, 14, 16, 18 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<?x?xf64, #DCSR>
@@ -233,11 +233,11 @@ module {
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 2
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 0, 7
- // CHECK-NEXT: values : ( 12, 12
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 7 )
+ // CHECK-NEXT: values : ( 12, 12 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<?x?xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_mult_elt.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_mult_elt.mlir
index c30c6b9b5cc2f..683be61be2a20 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_mult_elt.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_mult_elt.mlir
@@ -88,11 +88,11 @@ module {
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 32, 16 )
// CHECK-NEXT: lvl = ( 32, 16 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 2, 31
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 2, 0
- // CHECK-NEXT: values : ( 14, 20
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 2, 31 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 2, 0 )
+ // CHECK-NEXT: values : ( 14, 20 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<32x16xf32, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_reduction.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_reduction.mlir
index 74f0e7698bc14..8eadc348020f9 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_reduction.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_reduction.mlir
@@ -95,11 +95,11 @@ module {
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 3, 3 )
// CHECK-NEXT: lvl = ( 3, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 1, 2
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 1, 2
- // CHECK-NEXT: values : ( 7, 69
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 1, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 1, 2 )
+ // CHECK-NEXT: values : ( 7, 69 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xi32, #SparseMatrix>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_simple.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_simple.mlir
index 88513c80219a8..334ffe492952e 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_simple.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_simple.mlir
@@ -87,11 +87,11 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5, 7, 9
- // CHECK-NEXT: crd[1] : ( 0, 3, 1, 4, 2, 0, 3, 1, 4
- // CHECK-NEXT: values : ( 1, 1.96, 4, 6.25, 9, 16.81, 16, 27.04, 25
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5, 7, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 1, 4, 2, 0, 3, 1, 4 )
+ // CHECK-NEXT: values : ( 1, 1.96, 4, 6.25, 9, 16.81, 16, 27.04, 25 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack_d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack_d.mlir
index 467a77f30777a..b48ff9c9df748 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack_d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pack_d.mlir
@@ -111,29 +111,29 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 4, 3, 2 )
// CHECK-NEXT: lvl = ( 4, 3, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 0, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, 2, 1
- // CHECK-NEXT: pos[2] : ( 0, 2, 4, 5, 7, 8
- // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 0, 1, 0
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1, 2, 1 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 4, 5, 7, 8 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 0, 1, 0, 0, 1, 0 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 16
// CHECK-NEXT: dim = ( 4, 3, 2 )
// CHECK-NEXT: lvl = ( 4, 3, 2 )
- // CHECK-NEXT: pos[2] : ( 0, 2, 3, 4, 6, 6, 7, 9, 11, 13, 14, 15, 16
- // CHECK-NEXT: crd[2] : ( 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
+ // CHECK-NEXT: pos[2] : ( 0, 2, 3, 4, 6, 6, 7, 9, 11, 13, 14, 15, 16 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 22
// CHECK-NEXT: dim = ( 4, 3, 2 )
// CHECK-NEXT: lvl = ( 4, 3, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 8, 11
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 5, 6, 0, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 15, 0, 16
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 8, 11 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 0, 3, 4, 0, 5, 6, 0, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 15, 0, 16 )
// CHECK-NEXT: ----
//
sparse_tensor.print %s0 : tensor<4x3x2xf32, #CCC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
index 39699fbdb14e5..7c78bfc362007 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
@@ -80,15 +80,15 @@ func.func @main() {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 1, 3, 3, 1 )
// CHECK-NEXT: lvl = ( 1, 3, 3, 1 )
- // CHECK-NEXT: pos[0] : ( 0, 1
- // CHECK-NEXT: crd[0] : ( 0
- // CHECK-NEXT: pos[1] : ( 0, 3
- // CHECK-NEXT: crd[1] : ( 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[3] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- // CHECK-NEXT: crd[3] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0
- // CHECK-NEXT: values : ( 6, 6, 6, 6, 6, 6, 6, 6, 6
+ // CHECK-NEXT: pos[0] : ( 0, 1 )
+ // CHECK-NEXT: crd[0] : ( 0 )
+ // CHECK-NEXT: pos[1] : ( 0, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 3, 6, 9 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[3] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 )
+ // CHECK-NEXT: crd[3] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0 )
+ // CHECK-NEXT: values : ( 6, 6, 6, 6, 6, 6, 6, 6, 6 )
// CHECK-NEXT: ----
//
sparse_tensor.print %CCCC_ret : tensor<1x3x3x1xf32, #CCCC>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print.mlir
index b664b7f99944e..f3c721535e75c 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print.mlir
@@ -147,7 +147,7 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 5, 0, 0, )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 5, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %XO : tensor<4x8xi32, #AllDense>
@@ -155,7 +155,7 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %XT : tensor<4x8xi32, #AllDenseT>
@@ -176,9 +176,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 2, 2, 5, )
- // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 2, 2, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %a : tensor<4x8xi32, #CSR>
@@ -186,11 +186,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2, )
- // CHECK-NEXT: crd[0] : ( 0, 3, )
- // CHECK-NEXT: pos[1] : ( 0, 2, 5, )
- // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %b : tensor<4x8xi32, #DCSR>
@@ -198,9 +198,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 1, 3, 4, 4, 5, 5, 5, )
- // CHECK-NEXT: crd[1] : ( 0, 0, 3, 3, 3, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 1, 3, 4, 4, 5, 5, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 3, 3, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %c : tensor<4x8xi32, #CSC>
@@ -208,11 +208,11 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 8, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4, )
- // CHECK-NEXT: crd[0] : ( 0, 2, 3, 5, )
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, 4, 5, )
- // CHECK-NEXT: crd[1] : ( 0, 0, 3, 3, 3, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3, 5 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3, 4, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 3, 3, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %d : tensor<4x8xi32, #DCSC>
@@ -220,11 +220,11 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 2, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2, )
- // CHECK-NEXT: crd[0] : ( 0, 1, )
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 0, 1, )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0, )
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %e : tensor<4x8xi32, #BSR>
@@ -232,11 +232,11 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 2, )
- // CHECK-NEXT: crd[0] : ( 0, 1, )
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 0, 1, )
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, )
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %f : tensor<4x8xi32, #BSRC>
@@ -244,11 +244,11 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 2, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2, )
- // CHECK-NEXT: crd[0] : ( 0, 1, )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0, )
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %g : tensor<4x8xi32, #BSC>
@@ -256,11 +256,11 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 4, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 2, )
- // CHECK-NEXT: crd[0] : ( 0, 1, )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, )
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, )
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %h : tensor<4x8xi32, #BSCC>
@@ -268,9 +268,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 2, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 0, 1, )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0, )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %i : tensor<4x8xi32, #BSR0>
@@ -278,9 +278,9 @@ module {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 2, 2, 2, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0, )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1 )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 5, 0, 0 )
// CHECK-NEXT: ----
sparse_tensor.print %j : tensor<4x8xi32, #BSC0>
@@ -288,9 +288,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 5, )
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 2, 3, 2, 3, 3, 3, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 2, 3, 2, 3, 3, 3, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %AoS : tensor<4x8xi32, #COOAoS>
@@ -298,10 +298,10 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 5, )
- // CHECK-NEXT: crd[0] : ( 0, 0, 3, 3, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5, )
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, )
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 3, 3, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 2, 3, 5 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
sparse_tensor.print %SoA : tensor<4x8xi32, #COOSoA>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print_3d.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print_3d.mlir
index 98dee304fa511..4f1e4312d7bc3 100755
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print_3d.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_print_3d.mlir
@@ -61,11 +61,11 @@ module {
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 2, 4, 8 )
// CHECK-NEXT: lvl = ( 2, 4, 8 )
- // CHECK-NEXT: pos[2] : ( ( 0, 8, 16, 24, 32, )( 0, 8, 16, 24, 32, ) )
- // CHECK-NEXT: crd[2] : ( ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, )
- // CHECK-SAME: ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, ) )
- // CHECK-NEXT: values : ( ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, )
- // CHECK-SAME: ( 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, ) )
+ // CHECK-NEXT: pos[2] : ( ( 0, 8, 16, 24, 32 )( 0, 8, 16, 24, 32 ) )
+ // CHECK-NEXT: crd[2] : ( ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 )
+ // CHECK-SAME: ( 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 ) )
+ // CHECK-NEXT: values : ( ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 )
+ // CHECK-SAME: ( 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ) )
// CHECK-NEXT: ----
sparse_tensor.print %X : tensor<2x4x8xf64, #BatchedCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_re_im.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_re_im.mlir
index 7bacbe3b87e42..fc23fe501fcf1 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_re_im.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_re_im.mlir
@@ -93,18 +93,18 @@ module {
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 20, 31,
- // CHECK-NEXT: values : ( 5.13, 3, 5,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 20, 31 )
+ // CHECK-NEXT: values : ( 5.13, 3, 5 )
// CHECK-NEXT: ----
//
// CHECK-NEXT: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 3,
- // CHECK-NEXT: crd[0] : ( 0, 20, 31,
- // CHECK-NEXT: values : ( 2, 4, 6,
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 0, 20, 31 )
+ // CHECK-NEXT: values : ( 2, 4, 6 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xf32, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir
index a927a5dfb94bc..5da028c3685c4 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom.mlir
@@ -144,33 +144,33 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 5 )
// CHECK-NEXT: lvl = ( 4, 5 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 4, 0, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 4, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 5, 4 )
// CHECK-NEXT: lvl = ( 5, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 5, 6
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1
- // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 5, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1 )
+ // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 0, 1, 3, 0, 1, 3
- // CHECK-NEXT: values : ( 7, 7, 9, 8, 7, 7, 12, 11, 11
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 0, 1, 3, 0, 1, 3 )
+ // CHECK-NEXT: values : ( 7, 7, 9, 8, 7, 7, 12, 11, 11 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 4 )
// CHECK-NEXT: lvl = ( 4, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 0, 1, 3, 0, 1, 3
- // CHECK-NEXT: values : ( 7, 7, 9, 8, 7, 7, 12, 11, 11
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 0, 1, 3, 0, 1, 3 )
+ // CHECK-NEXT: values : ( 7, 7, 9, 8, 7, 7, 12, 11, 11 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sm1 : tensor<?x?xf64, #CSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom_prod.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom_prod.mlir
index 18bf6a71c5305..d32a92e337ba7 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom_prod.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reduce_custom_prod.mlir
@@ -118,33 +118,33 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 5 )
// CHECK-NEXT: lvl = ( 4, 5 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 4, 0, 2, 3
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 2, 3, 4, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 5, 4 )
// CHECK-NEXT: lvl = ( 5, 4 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 5, 6
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1
- // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 5, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1 )
+ // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 4 )
// CHECK-NEXT: lvl = ( 4 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: values : ( 2, 3, 120, 504
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 2, 3, 120, 504 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 5 )
// CHECK-NEXT: lvl = ( 5 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4
- // CHECK-NEXT: values : ( 6, 5, 12, 2, 11
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4 )
+ // CHECK-NEXT: values : ( 6, 5, 12, 2, 11 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sm1 : tensor<?x?xf64, #CSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reshape.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reshape.mlir
index 4c26ebe6e401b..317fe0f225ee6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reshape.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reshape.mlir
@@ -81,31 +81,31 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 2, 6 )
// CHECK-NEXT: lvl = ( 2, 6 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 2, 4, 0, 2, 4
- // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 4, 0, 2, 4 )
+ // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 12 )
// CHECK-NEXT: lvl = ( 12 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10
- // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 4, 6, 8, 10 )
+ // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 2, 3, 2 )
// CHECK-NEXT: lvl = ( 2, 3, 2 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6
- // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0
- // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 1, 2, 3, 4, 5, 6 )
+ // CHECK-NEXT: crd[2] : ( 0, 0, 0, 0, 0, 0 )
+ // CHECK-NEXT: values : ( 1.1, 1.3, 2.1, 2.3, 3.1, 3.3 )
// CHECK-NEXT: ----
//
sparse_tensor.print %reshaped0: tensor<2x6xf64, #SparseMatrix>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_mm_fusion.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_mm_fusion.mlir
index 20a8c5f812de9..eecd970e01ac9 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_mm_fusion.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_mm_fusion.mlir
@@ -211,22 +211,22 @@ module {
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 7
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 0, 7
- // CHECK-NEXT: values : ( 96, 192
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 7 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 7 )
+ // CHECK-NEXT: values : ( 96, 192 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 2
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 7
- // CHECK-NEXT: pos[1] : ( 0, 1, 2
- // CHECK-NEXT: crd[1] : ( 0, 7
- // CHECK-NEXT: values : ( 96, 192
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 7 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2 )
+ // CHECK-NEXT: crd[1] : ( 0, 7 )
+ // CHECK-NEXT: values : ( 96, 192 )
// CHECK-NEXT: ----
//
%v0 = vector.transfer_read %0[%c0, %c0], %d0
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scale.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scale.mlir
index 4e9090ae201d0..c62cdc900b83d 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scale.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scale.mlir
@@ -92,9 +92,9 @@ module {
// CHECK-NEXT: nse = 16
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 5, 6, 8, 11, 14, 16
- // CHECK-NEXT: crd[1] : ( 0, 2, 7, 1, 2, 3, 1, 4, 1, 2, 5, 2, 6, 7, 2, 7
- // CHECK-NEXT: values : ( 2, 2, 2, 4, 6, 8, 2, 10, 2, 2, 12, 2, 14, 2, 2, 16
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 5, 6, 8, 11, 14, 16 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 7, 1, 2, 3, 1, 4, 1, 2, 5, 2, 6, 7, 2, 7 )
+ // CHECK-NEXT: values : ( 2, 2, 2, 4, 6, 8, 2, 10, 2, 2, 12, 2, 14, 2, 2, 16 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<8x8xf32, #CSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scf_nested.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scf_nested.mlir
index dd8396dc23b03..3f0cf70675ba0 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scf_nested.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scf_nested.mlir
@@ -91,25 +91,25 @@ module @func_sparse.2 {
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 1
- // CHECK-NEXT: pos[1] : ( 0, 3, 6
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2
- // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24
- // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
- // CHECK-NEXT: values : ( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 1 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 0, 1, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 4, 8, 12, 16, 20, 24 )
+ // CHECK-NEXT: crd[2] : ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 )
+ // CHECK-NEXT: values : ( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sm_t : tensor<2x3x4xf64, #SparseMatrix>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_select.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_select.mlir
index 68bc17175e3b4..bd61563b4b2dd 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_select.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_select.mlir
@@ -124,33 +124,33 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 1, 3, 5, 7, 9
- // CHECK-NEXT: values : ( 1, 2, -4, 0, 5
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 1, 3, 5, 7, 9 )
+ // CHECK-NEXT: values : ( 1, 2, -4, 0, 5 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 7
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 6, 7
- // CHECK-NEXT: crd[1] : ( 3, 4, 1, 3, 3, 4, 2
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 4, 6, 7 )
+ // CHECK-NEXT: crd[1] : ( 3, 4, 1, 3, 3, 4, 2 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 3
// CHECK-NEXT: dim = ( 10 )
// CHECK-NEXT: lvl = ( 10 )
- // CHECK-NEXT: pos[0] : ( 0, 3
- // CHECK-NEXT: crd[0] : ( 1, 3, 9
- // CHECK-NEXT: values : ( 1, 2, 5
+ // CHECK-NEXT: pos[0] : ( 0, 3 )
+ // CHECK-NEXT: crd[0] : ( 1, 3, 9 )
+ // CHECK-NEXT: values : ( 1, 2, 5 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 4
- // CHECK-NEXT: crd[1] : ( 3, 4, 3, 4
- // CHECK-NEXT: values : ( 1, 2, 4, 6
+ // CHECK-NEXT: pos[1] : ( 0, 1, 2, 3, 4, 4 )
+ // CHECK-NEXT: crd[1] : ( 3, 4, 3, 4 )
+ // CHECK-NEXT: values : ( 1, 2, 4, 6 )
// CHECK-NEXT: ----
//
sparse_tensor.print %sv1 : tensor<?xf64, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_semiring_select.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_semiring_select.mlir
index f4435c81117b2..d96b07a0db331 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_semiring_select.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_semiring_select.mlir
@@ -91,11 +91,11 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, 2, 2, 3, 3, 4, 4
- // CHECK-NEXT: values : ( 0.1, 1.1, 1.1, 2.2, 2.1, 3.3, 3.1, 4.4, 4.1
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 6, 8, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1, 2, 2, 3, 3, 4, 4 )
+ // CHECK-NEXT: values : ( 0.1, 1.1, 1.1, 2.2, 2.1, 3.3, 3.1, 4.4, 4.1 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<5x5xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir
index c09374918b7d6..11d23d681c828 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sign.mlir
@@ -114,9 +114,9 @@ module {
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 12
- // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( -1, 1, -1, 1, 1, -1, nan, -nan, 1, -1, -0, 0
+ // CHECK-NEXT: pos[0] : ( 0, 12 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 5, 11, 13, 17, 18, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( -1, 1, -1, 1, 1, -1, nan, -nan, 1, -1, -0, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xf64, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir
index 7b3f9a2ce0e01..3117d2539f17f 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir
@@ -107,10 +107,10 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 4, 256 )
// CHECK-NEXT: lvl = ( 4, 256 )
- // CHECK-NEXT: pos[0] : ( 0, 17
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
- // CHECK-NEXT: crd[1] : ( 0, 126, 127, 254, 1, 253, 2, 0, 1, 3, 98, 126, 127, 128, 249, 253, 255
- // CHECK-NEXT: values : ( -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17
+ // CHECK-NEXT: pos[0] : ( 0, 17 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 126, 127, 254, 1, 253, 2, 0, 1, 3, 98, 126, 127, 128, 249, 253, 255 )
+ // CHECK-NEXT: values : ( -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xf64, #SortedCOO>
@@ -120,10 +120,10 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 4, 256 )
// CHECK-NEXT: lvl = ( 256, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 17
- // CHECK-NEXT: crd[0] : ( 0, 0, 1, 1, 2, 3, 98, 126, 126, 127, 127, 128, 249, 253, 253, 254, 255
- // CHECK-NEXT: crd[1] : ( 0, 3, 1, 3, 2, 3, 3, 0, 3, 0, 3, 3, 3, 1, 3, 0, 3
- // CHECK-NEXT: values : ( -1, 8, -5, -9, -7, 10, -11, 2, 12, -3, -13, 14, -15, 6, 16, 4, -17
+ // CHECK-NEXT: pos[0] : ( 0, 17 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 1, 1, 2, 3, 98, 126, 126, 127, 127, 128, 249, 253, 253, 254, 255 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 1, 3, 2, 3, 3, 0, 3, 0, 3, 3, 3, 1, 3, 0, 3 )
+ // CHECK-NEXT: values : ( -1, 8, -5, -9, -7, 10, -11, 2, 12, -3, -13, 14, -15, 6, 16, 4, -17 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<?x?xf64, #SortedCOOPermuted>
@@ -133,11 +133,11 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 2, 3, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 17
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1
- // CHECK-NEXT: crd[1] : ( 0, 0, 1, 1, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 2, 2
- // CHECK-NEXT: crd[2] : ( 2, 3, 1, 2, 0, 1, 2, 3, 0, 2, 3, 0, 1, 2, 3, 1, 2
- // CHECK-NEXT: values : ( 3, 63, 11, 100, 66, 61, 13, 43, 77, 10, 46, 61, 53, 3, 75, 22, 18
+ // CHECK-NEXT: pos[0] : ( 0, 17 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 )
+ // CHECK-NEXT: crd[1] : ( 0, 0, 1, 1, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 2, 2 )
+ // CHECK-NEXT: crd[2] : ( 2, 3, 1, 2, 0, 1, 2, 3, 0, 2, 3, 0, 1, 2, 3, 1, 2 )
+ // CHECK-NEXT: values : ( 3, 63, 11, 100, 66, 61, 13, 43, 77, 10, 46, 61, 53, 3, 75, 22, 18 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<?x?x?xf64, #SortedCOO3D>
@@ -147,11 +147,11 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 2, 3, 4 )
// CHECK-NEXT: lvl = ( 4, 2, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 17
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3
- // CHECK-NEXT: crd[1] : ( 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1
- // CHECK-NEXT: crd[2] : ( 2, 0, 1, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 0, 2, 0, 1
- // CHECK-NEXT: values : ( 66, 77, 61, 11, 61, 53, 22, 3, 100, 13, 10, 3, 18, 63, 43, 46, 75
+ // CHECK-NEXT: pos[0] : ( 0, 17 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1 )
+ // CHECK-NEXT: crd[2] : ( 2, 0, 1, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 0, 2, 0, 1 )
+ // CHECK-NEXT: values : ( 66, 77, 61, 11, 61, 53, 22, 3, 100, 13, 10, 3, 18, 63, 43, 46, 75 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<?x?x?xf64, #SortedCOO3DPermuted>
@@ -161,10 +161,10 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 5, 4 )
// CHECK-NEXT: lvl = ( 5, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 2, 3, 4
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1
- // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 2, 3, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1 )
+ // CHECK-NEXT: values : ( 6, 5, 4, 3, 2, 11 )
// CHECK-NEXT: ----
//
sparse_tensor.print %4 : tensor<?x?xf64, #SortedCOO>
@@ -178,10 +178,10 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 5, 4 )
// CHECK-NEXT: lvl = ( 5, 4 )
- // CHECK-NEXT: pos[0] : ( 0, 6
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 2, 3, 4
- // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1
- // CHECK-NEXT: values : ( 12, 10, 8, 6, 4, 22
+ // CHECK-NEXT: pos[0] : ( 0, 6 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 2, 3, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 0, 3, 1, 1 )
+ // CHECK-NEXT: values : ( 12, 10, 8, 6, 4, 22 )
// CHECK-NEXT: ----
//
sparse_tensor.print %5 : tensor<?x?xf64, #SortedCOO>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_storage.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_storage.mlir
index 2ee189de7906c..da87b5cc3c6da 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_storage.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_storage.mlir
@@ -111,7 +111,7 @@ module {
// CHECK-NEXT: nse = 80
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 10, 8 )
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 9, 0, 0, 10, 0, 0, 0, 11, 12, 0, 13, 14, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 9, 0, 0, 10, 0, 0, 0, 11, 12, 0, 13, 14, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<10x8xf64, #Dense>
@@ -124,9 +124,9 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 10, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 3, 3, 4, 5, 6, 9, 12, 16, 16, 17
- // CHECK-NEXT: crd[1] : ( 0, 2, 7, 2, 3, 4, 1, 2, 7, 2, 6, 7, 1, 2, 6, 7, 6
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
+ // CHECK-NEXT: pos[1] : ( 0, 3, 3, 4, 5, 6, 9, 12, 16, 16, 17 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 7, 2, 3, 4, 1, 2, 7, 2, 6, 7, 1, 2, 6, 7, 6 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<10x8xf64, #CSR>
@@ -138,11 +138,11 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 10, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 2, 3, 4, 5, 6, 7, 9
- // CHECK-NEXT: pos[1] : ( 0, 3, 4, 5, 6, 9, 12, 16, 17
- // CHECK-NEXT: crd[1] : ( 0, 2, 7, 2, 3, 4, 1, 2, 7, 2, 6, 7, 1, 2, 6, 7, 6
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3, 4, 5, 6, 7, 9 )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 4, 5, 6, 9, 12, 16, 17 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 7, 2, 3, 4, 1, 2, 7, 2, 6, 7, 1, 2, 6, 7, 6 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 )
// CHECK-NEXT: ----
//
sparse_tensor.print %2 : tensor<10x8xf64, #DCSR>
@@ -154,9 +154,9 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 8, 10 )
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, 8, 9, 10, 10, 13, 17
- // CHECK-NEXT: crd[1] : ( 0, 5, 7, 0, 2, 5, 6, 7, 3, 4, 6, 7, 9, 0, 5, 6, 7
- // CHECK-NEXT: values : ( 1, 7, 13, 2, 4, 8, 10, 14, 5, 6, 11, 15, 17, 3, 9, 12, 16
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3, 8, 9, 10, 10, 13, 17 )
+ // CHECK-NEXT: crd[1] : ( 0, 5, 7, 0, 2, 5, 6, 7, 3, 4, 6, 7, 9, 0, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 7, 13, 2, 4, 8, 10, 14, 5, 6, 11, 15, 17, 3, 9, 12, 16 )
// CHECK-NEXT: ----
//
sparse_tensor.print %3 : tensor<10x8xf64, #CSC>
@@ -168,11 +168,11 @@ module {
// CHECK-NEXT: nse = 17
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 8, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 7
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 6, 7
- // CHECK-NEXT: pos[1] : ( 0, 1, 3, 8, 9, 10, 13, 17
- // CHECK-NEXT: crd[1] : ( 0, 5, 7, 0, 2, 5, 6, 7, 3, 4, 6, 7, 9, 0, 5, 6, 7
- // CHECK-NEXT: values : ( 1, 7, 13, 2, 4, 8, 10, 14, 5, 6, 11, 15, 17, 3, 9, 12, 16
+ // CHECK-NEXT: pos[0] : ( 0, 7 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 6, 7 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3, 8, 9, 10, 13, 17 )
+ // CHECK-NEXT: crd[1] : ( 0, 5, 7, 0, 2, 5, 6, 7, 3, 4, 6, 7, 9, 0, 5, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 7, 13, 2, 4, 8, 10, 14, 5, 6, 11, 15, 17, 3, 9, 12, 16 )
// CHECK-NEXT: ----
//
sparse_tensor.print %4 : tensor<10x8xf64, #DCSC>
@@ -184,9 +184,9 @@ module {
// CHECK-NEXT: nse = 64
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 10, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 8
- // CHECK-NEXT: crd[0] : ( 0, 2, 3, 4, 5, 6, 7, 9
- // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 9, 0, 0, 10, 0, 0, 0, 11, 12, 0, 13, 14, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 17, 0
+ // CHECK-NEXT: pos[0] : ( 0, 8 )
+ // CHECK-NEXT: crd[0] : ( 0, 2, 3, 4, 5, 6, 7, 9 )
+ // CHECK-NEXT: values : ( 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 9, 0, 0, 10, 0, 0, 0, 11, 12, 0, 13, 14, 0, 0, 0, 15, 16, 0, 0, 0, 0, 0, 0, 17, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %x : tensor<10x8xf64, #BlockRow>
@@ -198,9 +198,9 @@ module {
// CHECK-NEXT: nse = 70
// CHECK-NEXT: dim = ( 10, 8 )
// CHECK-NEXT: lvl = ( 8, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 7
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 6, 7
- // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 13, 0, 0, 2, 0, 4, 0, 0, 8, 10, 14, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 15, 0, 17, 3, 0, 0, 0, 0, 9, 12, 16, 0, 0
+ // CHECK-NEXT: pos[0] : ( 0, 7 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 13, 0, 0, 2, 0, 4, 0, 0, 8, 10, 14, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 15, 0, 17, 3, 0, 0, 0, 0, 9, 12, 16, 0, 0 )
// CHECK-NEXT: ----
//
sparse_tensor.print %y : tensor<10x8xf64, #BlockCol>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tanh.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tanh.mlir
index 29bc744c99203..748fffc1e6371 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tanh.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tanh.mlir
@@ -77,9 +77,9 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ({{ -0.761[0-9]*, 0.761[0-9]*, 0.96[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 1}}
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ({{ -0.761[0-9]*, 0.761[0-9]*, 0.96[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 0.99[0-9]*, 1}} )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?xf64, #SparseVector>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_mul.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_mul.mlir
index 67155201c5844..fe2f2690e860d 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_mul.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_mul.mlir
@@ -110,13 +110,13 @@ module {
// CHECK-NEXT: nse = 4
// CHECK-NEXT: dim = ( 3, 3, 5 )
// CHECK-NEXT: lvl = ( 3, 3, 5 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 2
- // CHECK-NEXT: pos[1] : ( 0, 1, 3
- // CHECK-NEXT: crd[1] : ( 2, 0, 2
- // CHECK-NEXT: pos[2] : ( 0, 2, 3, 4
- // CHECK-NEXT: crd[2] : ( 0, 2, 0, 2
- // CHECK-NEXT: values : ( 2.4, 3.5, 2, 8
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 1, 3 )
+ // CHECK-NEXT: crd[1] : ( 2, 0, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 2, 3, 4 )
+ // CHECK-NEXT: crd[2] : ( 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 2.4, 3.5, 2, 8 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?x?xf64, #ST>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_ops.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_ops.mlir
index 356808ebee3f7..a46c3a8d5ef6c 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_ops.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_tensor_ops.mlir
@@ -97,23 +97,23 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 3, 4, 8 )
// CHECK-NEXT: lvl = ( 3, 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 3
- // CHECK-NEXT: crd[1] : ( 0, 3, 2
- // CHECK-NEXT: pos[2] : ( 0, 1, 2, 5
- // CHECK-NEXT: crd[2] : ( 0, 7, 1, 2, 7
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 2 )
+ // CHECK-NEXT: pos[2] : ( 0, 1, 2, 5 )
+ // CHECK-NEXT: crd[2] : ( 0, 7, 1, 2, 7 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 24
// CHECK-NEXT: dim = ( 3, 4, 8 )
// CHECK-NEXT: lvl = ( 3, 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 2
- // CHECK-NEXT: crd[0] : ( 0, 2
- // CHECK-NEXT: pos[1] : ( 0, 2, 3
- // CHECK-NEXT: crd[1] : ( 0, 3, 2
- // CHECK-NEXT: values : ( 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 8, 0, 0, 0, 0, 10
+ // CHECK-NEXT: pos[0] : ( 0, 2 )
+ // CHECK-NEXT: crd[0] : ( 0, 2 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 2 )
+ // CHECK-NEXT: values : ( 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 8, 0, 0, 0, 0, 10 )
// CHECK-NEXT: ----
//
sparse_tensor.print %st : tensor<?x?x?xf64, #ST1>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose.mlir
index 549c2082fcb3a..434cc95094645 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose.mlir
@@ -119,21 +119,21 @@ module {
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2
- // CHECK-NEXT: values : ( 1.1, 3.1, 1.2, 3.3, 1.4, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1.1, 3.1, 1.2, 3.3, 1.4, 3.4 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 6
// CHECK-NEXT: dim = ( 4, 3 )
// CHECK-NEXT: lvl = ( 4, 3 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 6
- // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2
- // CHECK-NEXT: values : ( 1.1, 3.1, 1.2, 3.3, 1.4, 3.4
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 4, 6 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 0, 2, 0, 2 )
+ // CHECK-NEXT: values : ( 1.1, 3.1, 1.2, 3.3, 1.4, 3.4 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<4x3xf64, #DCSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose_coo.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose_coo.mlir
index cc6f6a068746d..3b7760e5052c3 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose_coo.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_transpose_coo.mlir
@@ -83,19 +83,19 @@ module {
// CHECK-NEXT: nse = 50
// CHECK-NEXT: dim = ( 10, 5 )
// CHECK-NEXT: lvl = ( 10, 5 )
- // CHECK-NEXT: pos[0] : ( 0, 50
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4
- // CHECK-NEXT: values : ( 10, 20, 30, 40, 50, 11, 21, 31, 41, 51, 12, 22, 32, 42, 52, 13, 23, 33, 43, 53, 14, 24, 34, 44, 54, 15, 25, 35, 45, 55, 16, 26, 36, 46, 56, 17, 27, 37, 47, 57, 18, 28, 38, 48, 58, 19, 29, 39, 49, 59
+ // CHECK-NEXT: pos[0] : ( 0, 50 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 )
+ // CHECK-NEXT: values : ( 10, 20, 30, 40, 50, 11, 21, 31, 41, 51, 12, 22, 32, 42, 52, 13, 23, 33, 43, 53, 14, 24, 34, 44, 54, 15, 25, 35, 45, 55, 16, 26, 36, 46, 56, 17, 27, 37, 47, 57, 18, 28, 38, 48, 58, 19, 29, 39, 49, 59 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 50
// CHECK-NEXT: dim = ( 5, 10 )
// CHECK-NEXT: lvl = ( 5, 10 )
- // CHECK-NEXT: pos[0] : ( 0, 50
- // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- // CHECK-NEXT: values : ( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59
+ // CHECK-NEXT: pos[0] : ( 0, 50 )
+ // CHECK-NEXT: crd[0] : ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 )
+ // CHECK-NEXT: values : ( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 )
// CHECK-NEXT: ----
//
sparse_tensor.print %SA : tensor<10x5xf32, #SortedCOO>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
index 3da1e35818cfa..acb7a99a34180 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
@@ -247,53 +247,53 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 23
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 23
- // CHECK-NEXT: crd[0] : ( 1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 22, 23, 24, 25, 26, 27, 30
- // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+ // CHECK-NEXT: pos[0] : ( 0, 23 )
+ // CHECK-NEXT: crd[0] : ( 1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 22, 23, 24, 25, 26, 27, 30 )
+ // CHECK-NEXT: values : ( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 32
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
- // CHECK-NEXT: values : ( -1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, -3, 1, 1, 1, 1, 1, -4, 1, 1, -5, -6, 1, 1, 1, 1, 1, 1, -7, -8, 1, -9
+ // CHECK-NEXT: pos[0] : ( 0, 32 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 )
+ // CHECK-NEXT: values : ( -1, 1, 1, -2, 1, 1, 1, 1, 1, 1, 1, -3, 1, 1, 1, 1, 1, -4, 1, 1, -5, -6, 1, 1, 1, 1, 1, 1, -7, -8, 1, -9 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 0, 6, 33, 68, 100, 126, 196, 232, 279
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 0, 6, 33, 68, 100, 126, 196, 232, 279 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 3, 3, 3, 4, 5, 6, 7, 7, 7
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 3, 3, 3, 4, 5, 6, 7, 7, 7 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 4, 8 )
// CHECK-NEXT: lvl = ( 4, 8 )
- // CHECK-NEXT: pos[0] : ( 0, 4
- // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9
- // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3
- // CHECK-NEXT: values : ( 99, 99, 99, 99, 5, 6, 99, 99, 99
+ // CHECK-NEXT: pos[0] : ( 0, 4 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 2, 3 )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 6, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 7, 2, 4, 7, 0, 2, 3 )
+ // CHECK-NEXT: values : ( 99, 99, 99, 99, 5, 6, 99, 99, 99 )
// CHECK-NEXT: ----
// CHECK-NEXT: ( 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0 )
//
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_vector_ops.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_vector_ops.mlir
index 5533233316413..10ccf47c34083 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_vector_ops.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_vector_ops.mlir
@@ -209,55 +209,55 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 10
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 10
- // CHECK-NEXT: crd[0] : ( 1, 3, 4, 10, 16, 18, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
+ // CHECK-NEXT: pos[0] : ( 0, 10 )
+ // CHECK-NEXT: crd[0] : ( 1, 3, 4, 10, 16, 18, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 9
- // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18
+ // CHECK-NEXT: pos[0] : ( 0, 9 )
+ // CHECK-NEXT: crd[0] : ( 0, 3, 11, 17, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 2, 4, 6, 8, 10, 12, 14, 16, 18 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 14
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 14
- // CHECK-NEXT: crd[0] : ( 0, 1, 3, 4, 10, 11, 16, 17, 18, 20, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 2, 11, 16, 13, 14, 6, 15, 8, 16, 10, 29, 32, 35, 38
+ // CHECK-NEXT: pos[0] : ( 0, 14 )
+ // CHECK-NEXT: crd[0] : ( 0, 1, 3, 4, 10, 11, 16, 17, 18, 20, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 2, 11, 16, 13, 14, 6, 15, 8, 16, 10, 29, 32, 35, 38 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: pos[0] : ( 0, 5
- // CHECK-NEXT: crd[0] : ( 3, 21, 28, 29, 31
- // CHECK-NEXT: values : ( 48, 204, 252, 304, 360
+ // CHECK-NEXT: pos[0] : ( 0, 5 )
+ // CHECK-NEXT: crd[0] : ( 3, 21, 28, 29, 31 )
+ // CHECK-NEXT: values : ( 48, 204, 252, 304, 360 )
// CHECK-NEXT: ----
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 32
// CHECK-NEXT: dim = ( 32 )
// CHECK-NEXT: lvl = ( 32 )
- // CHECK-NEXT: values : ( 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 0, 0, 0, 0, 252, 304, 0, 360
+ // CHECK-NEXT: values : ( 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 0, 0, 0, 0, 252, 304, 0, 360 )
// CHECK-NEXT: ----
// CHECK-NEXT: 1169.1
//
diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-gemm-lib.mlir b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-gemm-lib.mlir
index 9413119509c67..bd71409892f43 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-gemm-lib.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-gemm-lib.mlir
@@ -68,9 +68,9 @@ module {
// CHECK-NEXT: nse = 20
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 5, 5, 6, 7, 8, 12, 16, 20, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 2, 6, 7, 2, 3, 4, 1, 2, 6, 7, 1, 2, 6, 7, 1, 2, 6, 7, )
- // CHECK-NEXT: values : ( 1, 39, 52, 45, 51, 16, 25, 36, 117, 158, 135, 144, 156, 318, 301, 324, 208, 430, 405, 436, )
+ // CHECK-NEXT: pos[1] : ( 0, 5, 5, 6, 7, 8, 12, 16, 20 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 2, 6, 7, 2, 3, 4, 1, 2, 6, 7, 1, 2, 6, 7, 1, 2, 6, 7 )
+ // CHECK-NEXT: values : ( 1, 39, 52, 45, 51, 16, 25, 36, 117, 158, 135, 144, 156, 318, 301, 324, 208, 430, 405, 436 )
// CHECK-NEXT: ----
sparse_tensor.print %Ccsr : tensor<8x8xf32, #CSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sampled-matmul-lib.mlir b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sampled-matmul-lib.mlir
index 3b3d074f7e2a8..64f289626c07b 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sampled-matmul-lib.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sampled-matmul-lib.mlir
@@ -117,9 +117,9 @@ module {
// CHECK-NEXT: nse = 9
// CHECK-NEXT: dim = ( 5, 5 )
// CHECK-NEXT: lvl = ( 5, 5 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5, 7, 9, )
- // CHECK-NEXT: crd[1] : ( 0, 3, 1, 4, 2, 0, 3, 1, 4, )
- // CHECK-NEXT: values : ( 11, 41.4, 42, 102.5, 93, 44.1, 164, 105.2, 255, )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 4, 5, 7, 9 )
+ // CHECK-NEXT: crd[1] : ( 0, 3, 1, 4, 2, 0, 3, 1, 4 )
+ // CHECK-NEXT: values : ( 11, 41.4, 42, 102.5, 93, 44.1, 164, 105.2, 255 )
// CHECK-NEXT: ----
sparse_tensor.print %0 : tensor<?x?xf32, #CSR>
@@ -145,9 +145,9 @@ module {
// CHECK-NEXT: nse = 5
// CHECK-NEXT: dim = ( 8, 8 )
// CHECK-NEXT: lvl = ( 8, 8 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, 3, 4, 4, 4, 4, 5, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 0, 4, 7, )
- // CHECK-NEXT: values : ( 17, 18, 19, 20, 21, )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3, 3, 4, 4, 4, 4, 5 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 0, 4, 7 )
+ // CHECK-NEXT: values : ( 17, 18, 19, 20, 21 )
// CHECK-NEXT: ----
//
sparse_tensor.print %1 : tensor<?x?xf32, #CSR>
diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sddmm-lib.mlir b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sddmm-lib.mlir
index 18f59f59a9f0b..4b503ae0d1105 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sddmm-lib.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sparse-sddmm-lib.mlir
@@ -170,18 +170,18 @@ module {
// CHECK-NEXT: nse = 8
// CHECK-NEXT: dim = ( 4, 6 )
// CHECK-NEXT: lvl = ( 4, 6 )
- // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7, 8, )
- // CHECK-NEXT: crd[1] : ( 0, 1, 4, 1, 5, 2, 3, 2, )
- // CHECK-NEXT: values : ( 5, 10, 24, 19, 53, 42, 55, 56, )
+ // CHECK-NEXT: pos[1] : ( 0, 3, 5, 7, 8 )
+ // CHECK-NEXT: crd[1] : ( 0, 1, 4, 1, 5, 2, 3, 2 )
+ // CHECK-NEXT: values : ( 5, 10, 24, 19, 53, 42, 55, 56 )
// CHECK-NEXT: ----
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 12
// CHECK-NEXT: dim = ( 4, 6 )
// CHECK-NEXT: lvl = ( 2, 3, 2, 2 )
- // CHECK-NEXT: pos[1] : ( 0, 2, 3, )
- // CHECK-NEXT: crd[1] : ( 0, 2, 1, )
- // CHECK-NEXT: values : ( 5, 10, 8, 19, 24, 24, 40, 53, 42, 55, 56, 64, )
+ // CHECK-NEXT: pos[1] : ( 0, 2, 3 )
+ // CHECK-NEXT: crd[1] : ( 0, 2, 1 )
+ // CHECK-NEXT: values : ( 5, 10, 8, 19, 24, 24, 40, 53, 42, 55, 56, 64 )
// CHECK-NEXT: ----
//
sparse_tensor.print %0 : tensor<?x?xf32, #CSR>
>From de43a44d64b9a09e8b2de4c776d68a3f3a40ab89 Mon Sep 17 00:00:00 2001
From: Yinying Li <yinyingli at google.com>
Date: Wed, 8 May 2024 19:56:41 +0000
Subject: [PATCH 2/3] add comment
---
.../Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
index cfaf4b9754232..416c137a1dc3e 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_loose.mlir
@@ -38,6 +38,9 @@ module {
[13.0, 14.0, 15.0, 16.0 ]]> : tensor<5x4xf64>
%s = sparse_tensor.convert %d : tensor<5x4xf64> to tensor<5x4xf64, #CSR_hi>
+ //
+ // Note: position for loose_compressed level can vary in the end,
+ // therefore we loosly check it with {{.*}}.
//
// CHECK: ---- Sparse Tensor ----
// CHECK-NEXT: nse = 17
>From ccf7d899fd933c1eab66927b9d0a734ad05f75c7 Mon Sep 17 00:00:00 2001
From: Yinying Li <yinyingli at google.com>
Date: Wed, 8 May 2024 23:40:37 +0000
Subject: [PATCH 3/3] address comments
---
.../Transforms/SparseTensorRewriting.cpp | 39 +++++--------------
1 file changed, 9 insertions(+), 30 deletions(-)
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
index d2cdca41cf4a1..da635c2578885 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
@@ -830,13 +830,17 @@ struct PrintRewriter : public OpRewritePattern<PrintOp> {
vector::PrintPunctuation::Comma);
rewriter.create<vector::PrintOp>(loc, imag,
vector::PrintPunctuation::Close);
- printEnding(rewriter, loc, forOp.getInductionVar(), step,
- forOp.getUpperBound(), /*isComplex*/ true, val);
-
} else {
- printEnding(rewriter, loc, forOp.getInductionVar(), step,
- forOp.getUpperBound(), /*isComplex*/ false, val);
+ rewriter.create<vector::PrintOp>(
+ loc, val, vector::PrintPunctuation::NoPunctuation);
}
+ // Terminating comma (except at end).
+ auto bound = rewriter.create<arith::AddIOp>(loc, idxs.back(), step);
+ Value cond = rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::ne,
+ bound, size);
+ scf::IfOp ifOp = rewriter.create<scf::IfOp>(loc, cond, /*else*/ false);
+ rewriter.setInsertionPointToStart(&ifOp.getThenRegion().front());
+ rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Comma);
}
idxs.pop_back();
rewriter.setInsertionPointAfter(forOp);
@@ -844,31 +848,6 @@ struct PrintRewriter : public OpRewritePattern<PrintOp> {
rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Close);
}
- // Helper method to print the ending of memref (no punctuation after the last
- // element).
- static void printEnding(PatternRewriter &rewriter, Location loc, Value indVar,
- Value step, Value upperBound, bool isComplex,
- Value val) {
- auto bound = rewriter.create<arith::AddIOp>(loc, indVar, step);
- Value cond = rewriter.create<arith::CmpIOp>(loc, arith::CmpIPredicate::eq,
- bound, upperBound);
- scf::IfOp ifOp = rewriter.create<scf::IfOp>(loc, cond, /*else*/ true);
- if (isComplex) {
- rewriter.setInsertionPointToStart(&ifOp.getThenRegion().front());
- rewriter.create<vector::PrintOp>(loc,
- vector::PrintPunctuation::NoPunctuation);
- rewriter.setInsertionPointToStart(&ifOp.getElseRegion().front());
- rewriter.create<vector::PrintOp>(loc, vector::PrintPunctuation::Comma);
- } else {
- rewriter.setInsertionPointToStart(&ifOp.getThenRegion().front());
- rewriter.create<vector::PrintOp>(loc, val,
- vector::PrintPunctuation::NoPunctuation);
- rewriter.setInsertionPointToStart(&ifOp.getElseRegion().front());
- rewriter.create<vector::PrintOp>(loc, val,
- vector::PrintPunctuation::Comma);
- }
- }
-
// Helper method to print run-time lvl/dim sizes.
static void printSizes(PatternRewriter &rewriter, Location loc, Value tensor,
unsigned size, bool isDim) {
More information about the Mlir-commits
mailing list