@@ -130,19 +130,6 @@ func.func private @sparse_slice(tensor<?x?xf64, #CSR_SLICE>)
130
130
131
131
// -----
132
132
133
- // TODO: It is probably better to use [dense, dense, 2:4] (see NV_24 defined using new syntax
134
- // below) to encode a 2D matrix, but it would require dim2lvl mapping which is not ready yet.
135
- // So we take the simple path for now.
136
- #NV_24 = #sparse_tensor.encoding <{
137
- map = (d0 , d1 ) -> (d0 : dense , d1 : block2 _4 )
138
- }>
139
-
140
- // CHECK-LABEL: func private @sparse_2_out_of_4(
141
- // CHECK-SAME: tensor<?x?xf64, #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 : block2_4) }>>
142
- func.func private @sparse_2_out_of_4 (tensor <?x?xf64 , #NV_24 >)
143
-
144
- // -----
145
-
146
133
#BSR = #sparse_tensor.encoding <{
147
134
map = ( i , j ) ->
148
135
( i floordiv 2 : dense ,
@@ -204,11 +191,12 @@ func.func private @BSR_explicit(%arg0: tensor<?x?xf64, #BSR_explicit>) {
204
191
( i : dense ,
205
192
j floordiv 4 : dense ,
206
193
j mod 4 : block2 _4
207
- )
194
+ ),
195
+ crdWidth = 8 // we would even like just 2-bits
208
196
}>
209
197
210
198
// CHECK-LABEL: func private @NV_24(
211
- // CHECK-SAME: tensor<?x?xf64, #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 floordiv 4 : dense, d1 mod 4 : block2_4) }>>
199
+ // CHECK-SAME: tensor<?x?xf64, #sparse_tensor.encoding<{ map = (d0, d1) -> (d0 : dense, d1 floordiv 4 : dense, d1 mod 4 : block2_4), crdWidth = 8 }>>
212
200
func.func private @NV_24 (%arg0: tensor <?x?xf64 , #NV_24 >) {
213
201
return
214
202
}
@@ -245,4 +233,4 @@ func.func private @NV_24(%arg0: tensor<?x?x?xf64, #NV_24>) {
245
233
// CHECK-SAME: tensor<?x?x?xf64, #sparse_tensor.encoding<{ map = (d0, d1, d2) -> (d0 : dense, d2 floordiv 4 : dense, d1 : dense, d2 mod 4 : block2_4) }>>
246
234
func.func private @NV_24 (%arg0: tensor <?x?x?xf64 , #NV_24 >) {
247
235
return
248
- }
236
+ }
0 commit comments