Skip to content

[mlir][sparse] Migrate more tests to new syntax #66309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mlir/test/Dialect/Bufferization/ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: mlir-opt %s --mlir-print-op-generic | mlir-opt | FileCheck %s

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

// CHECK-LABEL: func @test_clone
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ func.func @input_stays_same(%arg0 : memref<?x1x?xf32, strided<[?, 1, 1]>>, %arg1
iterator_types = ["parallel", "reduction"]
}

#CSR = #sparse_tensor.encoding<{ lvlTypes = ["dense", "compressed"] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

func.func @sparse_case(%arg0: tensor<8x8xf32, #CSR>, %arg1: tensor<8xf32>) -> tensor<8xf32> {
%0 = tensor.empty() : tensor<8xf32>
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/GPU/gpu_combi.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: --sparsification="parallelization-strategy=dense-outer-loop" \
// RUN: --sparse-gpu-codegen | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

//
// CHECK-LABEL: gpu.module @sparse_kernels
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/GPU/gpu_matmul.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: --sparsification="parallelization-strategy=dense-outer-loop" \
// RUN: --sparse-gpu-codegen | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

//
// Compute matrix matrix C = AB
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/GPU/gpu_matmul_lib.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: mlir-opt %s --linalg-generalize-named-ops \
// RUN: --sparsification="enable-gpu-libgen" | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

//
// Compute matrix matrix C = AB
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/GPU/gpu_matvec.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: --sparsification="parallelization-strategy=dense-outer-loop" \
// RUN: --sparse-gpu-codegen | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

//
// Compute matrix vector y = Ax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
iterator_types = ["parallel", "parallel"]
}

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

// CHECK-LABEL: func.func @sparse_sampled_dd(
// CHECK-SAME: %[[VAL_0:.*]]: tensor<8x8xf64, #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>>,
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/GPU/gpu_spgemm_lib.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: mlir-opt %s --linalg-generalize-named-ops \
// RUN: --sparsification="enable-gpu-libgen" | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

// CHECK-LABEL: func.func @matmulCSR(
// CHECK-SAME: %[[VAL_0:.*0]]: tensor<8x8xf32, #{{.*}}>,
Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/codegen.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}>

#CSR = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
map = (d0, d1) -> (d0 : dense, d1 : compressed),
crdWidth = 64,
posWidth = 32
}>
Expand All @@ -31,8 +31,7 @@
}>

#CSC = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i, j) -> (j, i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is where it gets interesting ;-)
Neat!

}>

#DCSR = #sparse_tensor.encoding<{
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/codegen_sparse_alloc.mlir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s --sparse-tensor-codegen --canonicalize --cse | FileCheck %s

#CSR = #sparse_tensor.encoding<{ lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
#COO = #sparse_tensor.encoding<{ lvlTypes = ["compressed_nu", "singleton"]}>

// CHECK-LABEL: func.func @sparse_alloc_copy_CSR(
Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/codegen_sparse_dealloc.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
// RUN: --sparse-tensor-codegen=create-sparse-deallocs=true \
// RUN: --canonicalize --cse | FileCheck %s -check-prefix=CHECK-DEALLOC

#CSR = #sparse_tensor.encoding<{ lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
#CSC = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"],
dimToLvl = affine_map<(i,j) -> (j,i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed),
}>

//
Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/conversion.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
}>

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#CSC = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"],
dimToLvl = affine_map<(i,j) -> (j,i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
}>

#SparseTensor = #sparse_tensor.encoding<{
Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/convert_dense2sparse.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
}>

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#CSC = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i, j) -> (j, i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
}>

#SparseTensor = #sparse_tensor.encoding<{
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/convert_sparse2dense.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}>

#SparseMatrix = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#SparseTensor = #sparse_tensor.encoding<{
Expand Down
24 changes: 12 additions & 12 deletions mlir/test/Dialect/SparseTensor/invalid.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func.func @invalid_pack_type(%values: tensor<6xf64>, %pos: tensor<2xi32>, %coord

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"], posWidth=32, crdWidth=32}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed), posWidth=32, crdWidth=32}>

func.func @invalid_pack_mis_position(%values: tensor<6xf64>, %coordinates: tensor<6xi32>)
-> tensor<2x100xf64, #CSR> {
Expand Down Expand Up @@ -80,7 +80,7 @@ func.func @invalid_unpack_type(%sp: tensor<100x2xf64, #SparseVector>, %values: t

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"], posWidth=32, crdWidth=32}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed), posWidth=32, crdWidth=32}>

func.func @invalid_unpack_mis_position(%sp: tensor<2x100xf64, #CSR>, %values: tensor<6xf64>, %coordinates: tensor<6xi32>) {
// expected-error@+1 {{inconsistent number of fields between input/output}}
Expand Down Expand Up @@ -297,7 +297,7 @@ func.func @sparse_unannotated_insert(%arg0: tensor<128xf64>, %arg1: index, %arg2

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

func.func @sparse_wrong_arity_insert(%arg0: tensor<128x64xf64, #CSR>, %arg1: index, %arg2: f64) {
// expected-error@+1 {{'sparse_tensor.insert' op incorrect number of coordinates}}
Expand Down Expand Up @@ -347,7 +347,7 @@ func.func @sparse_unannotated_compression(%arg0: memref<?xf64>,

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

func.func @sparse_wrong_arity_compression(%arg0: memref<?xf64>,
%arg1: memref<?xi1>,
Expand Down Expand Up @@ -381,7 +381,7 @@ func.func @sparse_convert_rank_mismatch(%arg0: tensor<10x10xf64, #DCSR>) -> tens

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

func.func @sparse_convert_dim_mismatch(%arg0: tensor<10x?xf32>) -> tensor<10x10xf32, #CSR> {
// expected-error@+1 {{unexpected conversion mismatch in dimension 1}}
Expand Down Expand Up @@ -632,7 +632,7 @@ func.func @invalid_select_wrong_yield(%arg0: f64) -> f64 {

// -----

#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func @invalid_concat_less_inputs(%arg: tensor<9x4xf64, #DC>) -> tensor<9x4xf64, #DC> {
// expected-error@+1 {{Need at least two tensors to concatenate.}}
%0 = sparse_tensor.concatenate %arg {dimension = 1 : index}
Expand All @@ -642,7 +642,7 @@ func.func @invalid_concat_less_inputs(%arg: tensor<9x4xf64, #DC>) -> tensor<9x4x

// -----

#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func @invalid_concat_dim(%arg0: tensor<2x4xf64, #DC>,
%arg1: tensor<3x4xf64, #DC>,
%arg2: tensor<4x4xf64, #DC>) -> tensor<9x4xf64, #DC> {
Expand All @@ -657,7 +657,7 @@ func.func @invalid_concat_dim(%arg0: tensor<2x4xf64, #DC>,
// -----

#C = #sparse_tensor.encoding<{map = (d0) -> (d0 : compressed)}>
#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
#DCC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed", "compressed"]}>
func.func @invalid_concat_rank_mismatch(%arg0: tensor<2xf64, #C>,
%arg1: tensor<3x4xf64, #DC>,
Expand All @@ -672,7 +672,7 @@ func.func @invalid_concat_rank_mismatch(%arg0: tensor<2xf64, #C>,

// -----

#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func @invalid_concat_size_mismatch_dyn(%arg0: tensor<?x4xf64, #DC>,
%arg1: tensor<5x4xf64, #DC>,
%arg2: tensor<4x4xf64, #DC>) -> tensor<9x4xf64, #DC> {
Expand All @@ -686,7 +686,7 @@ func.func @invalid_concat_size_mismatch_dyn(%arg0: tensor<?x4xf64, #DC>,

// -----

#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func @invalid_concat_size_mismatch(%arg0: tensor<3x4xf64, #DC>,
%arg1: tensor<5x4xf64, #DC>,
%arg2: tensor<4x4xf64, #DC>) -> tensor<9x4xf64, #DC> {
Expand All @@ -700,7 +700,7 @@ func.func @invalid_concat_size_mismatch(%arg0: tensor<3x4xf64, #DC>,

// -----

#DC = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#DC = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func @invalid_concat_size_mismatch(%arg0: tensor<2x4xf64, #DC>,
%arg1: tensor<3x3xf64, #DC>,
%arg2: tensor<4x4xf64, #DC>) -> tensor<9x4xf64, #DC> {
Expand Down Expand Up @@ -844,7 +844,7 @@ func.func @sparse_sort_coo_y_too_small(%arg0: memref<60xindex>, %arg1: memref<10

// -----

#CSR = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

func.func @sparse_alloc_escapes(%arg0: index) -> tensor<10x?xf64, #CSR> {
// expected-error@+1 {{sparse tensor allocation should not escape function}}
Expand Down
8 changes: 4 additions & 4 deletions mlir/test/Dialect/SparseTensor/invalid_encoding.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ func.func private @scalar(%arg0: tensor<f64, #a>) -> ()
// -----

// expected-error@+2 {{dimension-rank mismatch between encoding and tensor shape: 2 != 1}}
#a = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"]}>
#a = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>
func.func private @tensor_dimlevel_size_mismatch(%arg0: tensor<8xi32, #a>) -> ()

// -----

// expected-error@+1 {{level-rank mismatch between dimToLvl and lvlTypes: 1 != 2}}
#a = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"], dimToLvl = affine_map<(i) -> (i)>}>
// expected-error@+1 {{use of undeclared identifier}}
#a = #sparse_tensor.encoding<{map = (d0) -> (d0 : dense, d1 : compressed)}>
func.func private @tensor_sizes_mismatch(%arg0: tensor<8xi32, #a>) -> ()

// -----
Expand All @@ -34,7 +34,7 @@ func.func private @tensor_dimtolvl_mismatch(%arg0: tensor<8xi32, #a>) -> ()
// -----

// expected-error@+1 {{expected a permutation affine map for dimToLvl}}
#a = #sparse_tensor.encoding<{lvlTypes = ["dense", "compressed"], dimToLvl = affine_map<(i,j) -> (i,i)>}>
#a = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d0 : compressed)}>
func.func private @tensor_no_permutation(%arg0: tensor<16x32xf32, #a>) -> ()

// -----
Expand Down
3 changes: 1 addition & 2 deletions mlir/test/Dialect/SparseTensor/pack_copy.mlir
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// RUN: mlir-opt %s --sparsification-and-bufferization | FileCheck %s

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense","compressed"],
dimToLvl = affine_map<(i,j) -> (i,j)>,
map = (d0, d1) -> (d0 : dense, d1 : compressed),
crdWidth = 32,
posWidth = 32
}>
Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/rewriting_for_codegen.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// RUN: FileCheck %s

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense", "compressed"]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#CSC = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i, j) -> (j, i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
}>

#COO = #sparse_tensor.encoding<{
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/semi_ring.mlir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: mlir-opt %s -sparsification | FileCheck %s

#SM = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#SM = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>

#trait = {
indexing_maps = [
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/sparse_2d.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: mlir-opt %s -sparsification | FileCheck %s

#Tdd = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "dense" ] }>
#Tds = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#Tds = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>
#Tsd = #sparse_tensor.encoding<{ lvlTypes = [ "compressed", "dense" ] }>
#Tss = #sparse_tensor.encoding<{ lvlTypes = [ "compressed", "compressed" ] }>

Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/sparse_affine.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: mlir-opt %s -sparsification | FileCheck %s

#SpVec = #sparse_tensor.encoding<{ map = (d0) -> (d0 : compressed) }>
#CSR = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "compressed" ] }>
#CSR = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : compressed) }>
#Row = #sparse_tensor.encoding<{ lvlTypes = [ "compressed", "dense" ] }>
#EncDenseVec = #sparse_tensor.encoding<{ map = (d0) -> (d0 : dense) }>

Expand Down
5 changes: 2 additions & 3 deletions mlir/test/Dialect/SparseTensor/sparse_expand.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
// RUN: FileCheck %s --check-prefix=CHECK-CONVERT

#CSR = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#CSC = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i,j) -> (j,i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
}>

#DCSC = #sparse_tensor.encoding<{
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/sparse_extract_slice.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: mlir-opt %s --sparse-tensor-codegen --cse | FileCheck %s

#CSR = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ]
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

#CSR_SLICE = #sparse_tensor.encoding<{
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/sparse_lower.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUN: --tensor-bufferize --finalizing-bufferize | \
// RUN: FileCheck %s --check-prefix=CHECK-LIR

#CSR = #sparse_tensor.encoding<{lvlTypes = [ "dense", "compressed" ]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

#trait_matvec = {
indexing_maps = [
Expand Down
3 changes: 1 addition & 2 deletions mlir/test/Dialect/SparseTensor/sparse_lower_col.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
// RUN: FileCheck %s --check-prefix=CHECK-LIR

#CSC = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i,j) -> (j,i)>
map = (d0, d1) -> (d1 : dense, d0 : compressed)
}>

#trait_matvec = {
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/SparseTensor/sparse_lower_inplace.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUN: --tensor-bufferize --finalizing-bufferize | \
// RUN: FileCheck %s --check-prefix=CHECK-LIR

#CSR = #sparse_tensor.encoding<{lvlTypes = [ "dense", "compressed" ]}>
#CSR = #sparse_tensor.encoding<{map = (d0, d1) -> (d0 : dense, d1 : compressed)}>

#trait_matvec = {
indexing_maps = [
Expand Down
3 changes: 1 addition & 2 deletions mlir/test/Dialect/SparseTensor/sparse_matmul_codegen.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// RUN: --canonicalize --cse | FileCheck %s

#CSR = #sparse_tensor.encoding<{
lvlTypes = [ "dense", "compressed" ],
dimToLvl = affine_map<(i,j) -> (i,j)>
map = (d0, d1) -> (d0 : dense, d1 : compressed)
}>

//
Expand Down
Loading