[Mlir-commits] [mlir] [mlir][Tensor] Check for out-of-bounds slice in `insert/extract_slice` verifier (PR #130487)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Mar 10 10:50:49 PDT 2025
================
@@ -271,38 +271,34 @@ func.func @insert_slice_of_transfer_write_rank_extending(%t1 : tensor<?x?x12xf32
// -----
-// CHECK: #[[$map:.*]] = affine_map<()[s0] -> (s0 + 2)>
// CHECK-LABEL: func @insert_slice_of_insert_slice(
// CHECK-SAME: %[[t:[0-9a-z]*]]: tensor<f32>
// CHECK-SAME: %[[r1:[0-9a-z]*]]: tensor<1x14xf32>
// CHECK-SAME: %[[pos:[0-9a-z]*]]: index
-// CHECK: %[[add:.*]] = affine.apply #[[$map]]()[%[[pos]]]
-// CHECK: tensor.insert_slice %[[t]] into %[[r1]][4, %[[add]]] [1, 1] [1, 1] : tensor<f32> into tensor<1x14xf32>
+// CHECK: tensor.insert_slice %[[t]] into %[[r1]][0, %[[pos]]] [1, 1] [1, 1] : tensor<f32> into tensor<1x14xf32>
func.func @insert_slice_of_insert_slice(%t: tensor<f32>, %r0: tensor<1x1xf32>, %r1: tensor<1x14xf32>, %pos: index)
-> tensor<1x14xf32>
{
- %0 = tensor.insert_slice %t into %r0[1, 2] [1, 1] [1, 1]
+ %0 = tensor.insert_slice %t into %r0[0, 0] [1, 1] [1, 1]
----------------
MaheshRavishankar wrote:
Making it all zero might be losing some test coverage. Maybe increase the size of the tensor instead?
https://github.com/llvm/llvm-project/pull/130487
More information about the Mlir-commits
mailing list