@@ -132,7 +132,7 @@ func.func @transfer_read_dims_mismatch_non_contiguous_non_zero_indices(
132
132
// -----
133
133
134
134
/// The leading dynamic shapes don't affect whether this example is flattenable
135
- /// or not as those dynamic shapes are not candidates for flattening anyway.
135
+ /// or not. Indeed, those dynamic shapes are not candidates for flattening anyway.
136
136
137
137
func.func @transfer_read_leading_dynamic_dims (
138
138
%arg : memref <?x?x8 x4 xi8 , strided <[?, 32 , 4 , 1 ], offset : ?>>,
@@ -141,7 +141,8 @@ func.func @transfer_read_leading_dynamic_dims(
141
141
142
142
%c0_i8 = arith.constant 0 : i8
143
143
%c0 = arith.constant 0 : index
144
- %result = vector.transfer_read %arg [%idx_1 , %idx_2 , %c0 , %c0 ], %c0_i8 {in_bounds = [true , true ]} : memref <?x?x8 x4 xi8 , strided <[?, 32 , 4 , 1 ], offset : ?>>, vector <8 x4 xi8 >
144
+ %result = vector.transfer_read %arg [%idx_1 , %idx_2 , %c0 , %c0 ], %c0_i8 {in_bounds = [true , true ]} :
145
+ memref <?x?x8 x4 xi8 , strided <[?, 32 , 4 , 1 ], offset : ?>>, vector <8 x4 xi8 >
145
146
return %result : vector <8 x4 xi8 >
146
147
}
147
148
@@ -163,10 +164,9 @@ func.func @transfer_read_leading_dynamic_dims(
163
164
164
165
// -----
165
166
166
- // The input memref has a dynamic trailing shape and hence is not flattened.
167
- // TODO: This case could be supported via memref.dim
167
+ // One of the dims to be flattened is dynamic - not supported ATM.
168
168
169
- func.func @transfer_read_dims_mismatch_non_zero_indices_trailing_dynamic_dim (
169
+ func.func @negative_transfer_read_dynamic_dim_to_flatten (
170
170
%idx_1: index ,
171
171
%idx_2: index ,
172
172
%m_in: memref <1 x?x4 x6 xi32 >) -> vector <1 x2 x6 xi32 > {
@@ -178,11 +178,11 @@ func.func @transfer_read_dims_mismatch_non_zero_indices_trailing_dynamic_dim(
178
178
return %v : vector <1 x2 x6 xi32 >
179
179
}
180
180
181
- // CHECK-LABEL: func.func @transfer_read_dims_mismatch_non_zero_indices_trailing_dynamic_dim
181
+ // CHECK-LABEL: func.func @negative_transfer_read_dynamic_dim_to_flatten
182
182
// CHECK-NOT: memref.collapse_shape
183
183
// CHECK-NOT: vector.shape_cast
184
184
185
- // CHECK-128B-LABEL: func @transfer_read_dims_mismatch_non_zero_indices_trailing_dynamic_dim
185
+ // CHECK-128B-LABEL: func @negative_transfer_read_dynamic_dim_to_flatten
186
186
// CHECK-128B-NOT: memref.collapse_shape
187
187
188
188
// -----
@@ -377,8 +377,8 @@ func.func @transfer_write_dims_mismatch_non_contiguous_non_zero_indices(
377
377
378
378
// -----
379
379
380
- // The leading dynamic shapes don't affect whether this example is flattenable
381
- // or not as those dynamic shapes are not candidates for flattening anyway.
380
+ /// The leading dynamic shapes don't affect whether this example is flattenable
381
+ /// or not. Indeed, those dynamic shapes are not candidates for flattening anyway.
382
382
383
383
func.func @transfer_write_leading_dynamic_dims (
384
384
%vec : vector <8 x4 xi8 >,
@@ -387,7 +387,8 @@ func.func @transfer_write_leading_dynamic_dims(
387
387
%idx_2 : index ) {
388
388
389
389
%c0 = arith.constant 0 : index
390
- vector.transfer_write %vec , %arg [%idx_1 , %idx_2 , %c0 , %c0 ] {in_bounds = [true , true ]} : vector <8 x4 xi8 >, memref <?x?x8 x4 xi8 , strided <[?, 32 , 4 , 1 ], offset : ?>>
390
+ vector.transfer_write %vec , %arg [%idx_1 , %idx_2 , %c0 , %c0 ] {in_bounds = [true , true ]} :
391
+ vector <8 x4 xi8 >, memref <?x?x8 x4 xi8 , strided <[?, 32 , 4 , 1 ], offset : ?>>
391
392
return
392
393
}
393
394
@@ -407,10 +408,9 @@ func.func @transfer_write_leading_dynamic_dims(
407
408
408
409
// -----
409
410
410
- // The input memref has a dynamic trailing shape and hence is not flattened.
411
- // TODO: This case could be supported via memref.dim
411
+ // One of the dims to be flattened is dynamic - not supported ATM.
412
412
413
- func.func @transfer_write_dims_mismatch_non_zero_indices_trailing_dynamic_dim (
413
+ func.func @negative_transfer_write_dynamic_to_flatten (
414
414
%idx_1: index ,
415
415
%idx_2: index ,
416
416
%vec : vector <1 x2 x6 xi32 >,
@@ -423,11 +423,11 @@ func.func @transfer_write_dims_mismatch_non_zero_indices_trailing_dynamic_dim(
423
423
return
424
424
}
425
425
426
- // CHECK-LABEL: func.func @transfer_write_dims_mismatch_non_zero_indices_trailing_dynamic_dim(
426
+ // CHECK-LABEL: func.func @negative_transfer_write_dynamic_to_flatten
427
427
// CHECK-NOT: memref.collapse_shape
428
428
// CHECK-NOT: vector.shape_cast
429
429
430
- // CHECK-128B-LABEL: func @transfer_write_dims_mismatch_non_zero_indices_trailing_dynamic_dim(
430
+ // CHECK-128B-LABEL: func @negative_transfer_write_dynamic_to_flatten
431
431
// CHECK-128B-NOT: memref.collapse_shape
432
432
433
433
// -----
0 commit comments