From 91738f94070f0962ad2a754b720e23731b42a451 Mon Sep 17 00:00:00 2001 From: Henry Wu Date: Wed, 8 Oct 2025 09:44:36 -0400 Subject: [PATCH] [MLIR] Fix test failures for generate-runtime-verification pass from PR #160331 PR #160331 introduced a mistake that removed the error message for generate-runtime-verification pass, leading to test failures during `test-build-check-mlir-build-only-check-mlir`. This patch restores the missing error message. In addition, for related tests, the op strings used in FileChecks are updated with the same op formats as used in input mlirs. Verified locally. Fixes post-merge regression from: https://github.com/llvm/llvm-project/pull/160331 --- .../Transforms/GenerateRuntimeVerification.cpp | 6 ++++-- .../Dialect/Linalg/runtime-verification.mlir | 4 +++- .../assume-alignment-runtime-verification.mlir | 2 +- .../MemRef/atomic-rmw-runtime-verification.mlir | 2 +- .../MemRef/cast-runtime-verification.mlir | 8 ++++---- .../MemRef/copy-runtime-verification.mlir | 2 +- .../Dialect/MemRef/dim-runtime-verification.mlir | 2 +- .../MemRef/load-runtime-verification.mlir | 6 +++--- .../MemRef/store-runtime-verification.mlir | 2 +- .../MemRef/subview-runtime-verification.mlir | 16 ++++++++-------- .../Tensor/cast-runtime-verification.mlir | 4 ++-- .../Dialect/Tensor/dim-runtime-verification.mlir | 2 +- .../Tensor/extract-runtime-verification.mlir | 6 +++--- .../extract_slice-runtime-verification.mlir | 16 ++++++++-------- 14 files changed, 41 insertions(+), 37 deletions(-) diff --git a/mlir/lib/Transforms/GenerateRuntimeVerification.cpp b/mlir/lib/Transforms/GenerateRuntimeVerification.cpp index 63c71cd6fb44d..1e226c03972b0 100644 --- a/mlir/lib/Transforms/GenerateRuntimeVerification.cpp +++ b/mlir/lib/Transforms/GenerateRuntimeVerification.cpp @@ -51,9 +51,11 @@ class DefaultErrMsgGenerator { stream << "ERROR: Runtime op verification failed\n"; if (vLevel == 1) { op->print(stream, state); - stream << "\n"; + stream << "\n^ " << msg; + } else { + stream << "^ " << msg; } - stream << "^\nLocation: "; + stream << "\nLocation: "; op->getLoc().print(stream); return buffer; } diff --git a/mlir/test/Dialect/Linalg/runtime-verification.mlir b/mlir/test/Dialect/Linalg/runtime-verification.mlir index 07e96c823c889..287f0e081da51 100644 --- a/mlir/test/Dialect/Linalg/runtime-verification.mlir +++ b/mlir/test/Dialect/Linalg/runtime-verification.mlir @@ -12,7 +12,9 @@ func.func @static_dims(%arg0: tensor<5xf32>, %arg1: tensor<5xf32>) -> (tensor<5x // CHECK: cf.assert %[[TRUE]] // VERBOSE0: %[[TRUE:.*]] = index.bool.constant true // VERBOSE0: cf.assert %[[TRUE]] - // VERBOSE0-SAME: ERROR: Runtime op verification failed\0A^\0ALocation: loc( + // VERBOSE0-SAME: ERROR: Runtime op verification failed\0A^ unexpected negative result on dimension #0 + // VERBOSE0-SAME: Location + // VERBOSE0-SAME: 19:10 %result = tensor.empty() : tensor<5xf32> %0 = linalg.generic { indexing_maps = [#identity, #identity, #identity], diff --git a/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir index 01a826a638606..ae46de18e8572 100644 --- a/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir @@ -38,7 +38,7 @@ func.func @main() { %buffer = builtin.unrealized_conversion_cast %10 : !llvm.struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)> to memref<1xf32> // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: %[[ASSUME:.*]] = "memref.assume_alignment"(%{{.*}}) <{alignment = 4 : i32}> : (memref<1xf32>) + // CHECK-NEXT: %[[ASSUME:.*]] = memref.assume_alignment %{{.*}}, 4 : memref<1xf32> // CHECK-NEXT: ^ memref is not aligned to 4 // CHECK-NEXT: Location: loc({{.*}}) %assume = memref.assume_alignment %buffer, 4 : memref<1xf32> diff --git a/mlir/test/Integration/Dialect/MemRef/atomic-rmw-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/atomic-rmw-runtime-verification.mlir index 1144a7caf36e8..6a7984ca88a1e 100644 --- a/mlir/test/Integration/Dialect/MemRef/atomic-rmw-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/atomic-rmw-runtime-verification.mlir @@ -41,7 +41,7 @@ func.func @main() { %cast = memref.cast %buffer : memref<5xf32> to memref // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.atomic_rmw"(%{{.*}}, %{{.*}}, %{{.*}}) <{kind = 0 : i64}> : (f32, memref, index) -> f32 + // CHECK-NEXT: memref.atomic_rmw addf %{{.*}}, %{{.*}} : (f32, memref) -> f32 // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) %c9 = arith.constant 9 : index diff --git a/mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir index 1ac10306395ad..b605c77deb6f0 100644 --- a/mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir @@ -43,26 +43,26 @@ func.func @main() { %alloc = memref.alloc() : memref<5xf32> // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.cast"(%{{.*}}) : (memref) -> memref<10xf32> + // CHECK-NEXT: memref.cast %{{.*}} : memref to memref<10xf32> // CHECK-NEXT: ^ size mismatch of dim 0 // CHECK-NEXT: Location: loc({{.*}}) %1 = memref.cast %alloc : memref<5xf32> to memref func.call @cast_to_static_dim(%1) : (memref) -> (memref<10xf32>) // CHECK-NEXT: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.cast"(%{{.*}}) : (memref<*xf32>) -> memref + // CHECK-NEXT: memref.cast %{{.*}} : memref<*xf32> to memref // CHECK-NEXT: ^ rank mismatch // CHECK-NEXT: Location: loc({{.*}}) %3 = memref.cast %alloc : memref<5xf32> to memref<*xf32> func.call @cast_to_ranked(%3) : (memref<*xf32>) -> (memref) // CHECK-NEXT: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.cast"(%{{.*}}) : (memref>) -> memref> + // CHECK-NEXT: memref.cast %{{.*}} : memref> // CHECK-NEXT: ^ offset mismatch // CHECK-NEXT: Location: loc({{.*}}) // CHECK-NEXT: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.cast"(%{{.*}}) : (memref>) -> memref> + // CHECK-NEXT: memref.cast %{{.*}} : memref> // CHECK-NEXT: ^ stride mismatch of dim 0 // CHECK-NEXT: Location: loc({{.*}}) %4 = memref.cast %alloc diff --git a/mlir/test/Integration/Dialect/MemRef/copy-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/copy-runtime-verification.mlir index be9417baf93df..413cb192200fb 100644 --- a/mlir/test/Integration/Dialect/MemRef/copy-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/copy-runtime-verification.mlir @@ -28,7 +28,7 @@ func.func @main() { %cast2 = memref.cast %alloca2 : memref<5xf32> to memref // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.copy"(%{{.*}}, %{{.*}}) : (memref, memref) -> () + // CHECK-NEXT: memref.copy %{{.*}}, %{{.*}} : memref to memref // CHECK-NEXT: ^ size of 0-th source/target dim does not match // CHECK-NEXT: Location: loc({{.*}}) call @memcpy_helper(%cast1, %cast2) : (memref, memref) -> () diff --git a/mlir/test/Integration/Dialect/MemRef/dim-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/dim-runtime-verification.mlir index ef4af62459738..8f5a2c74f3b36 100644 --- a/mlir/test/Integration/Dialect/MemRef/dim-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/dim-runtime-verification.mlir @@ -20,7 +20,7 @@ func.func @main() { %alloca = memref.alloca() : memref<1xf32> // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.dim"(%{{.*}}, %{{.*}}) : (memref<1xf32>, index) -> index + // CHECK-NEXT: memref.dim %{{.*}}, %{{.*}} : memref<1xf32> // CHECK-NEXT: ^ index is out of bounds // CHECK-NEXT: Location: loc({{.*}}) %dim = memref.dim %alloca, %c4 : memref<1xf32> diff --git a/mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir index 2e42648297875..364880c0aee95 100644 --- a/mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir @@ -40,19 +40,19 @@ func.func @main() { %alloc_2x2x2 = memref.alloc(%2, %2, %2) : memref // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.load"(%{{.*}}, %{{.*}}) : (memref<1xf32>, index) -> f32 + // CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref<1xf32> // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @load(%alloca_1, %1) : (memref<1xf32>, index) -> () // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.load"(%{{.*}}, %{{.*}}) : (memref, index) -> f32 + // CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @load_dynamic(%alloc_1, %1) : (memref, index) -> () // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.load"(%{{.*}}, %{{.*}}) : (memref, index, index, index) -> f32 + // CHECK-NEXT: memref.load %{{.*}}[%{{.*}}] : memref // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @load_nd_dynamic(%alloc_2x2x2, %1, %n1, %0) : (memref, index, index, index) -> () diff --git a/mlir/test/Integration/Dialect/MemRef/store-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/store-runtime-verification.mlir index 82e63805cd027..760f2a78537a7 100644 --- a/mlir/test/Integration/Dialect/MemRef/store-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/store-runtime-verification.mlir @@ -41,7 +41,7 @@ func.func @main() { %cast = memref.cast %buffer : memref<5xf32> to memref // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.store"(%{{.*}}, %{{.*}}, %{{.*}}) : (f32, memref, index) -> () + // CHECK-NEXT: memref.store %{{.*}}, %{{.*}}[%{{.*}}] : memref // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) %c9 = arith.constant 9 : index diff --git a/mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir index 9fbe5bc60321e..71e813c0a6300 100644 --- a/mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir @@ -51,47 +51,47 @@ func.func @main() { // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref, index, index, index) -> memref> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}, 0] [%{{.*}}, 1] [%{{.*}}, 1] : memref to memref> // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref, index, index, index) -> memref> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}, 0] [%{{.*}}, 1] [%{{.*}}, 1] : memref to memref> // CHECK-NEXT: ^ subview runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @subview_dynamic_rank_reduce(%alloca_4_dyn, %5, %5, %1) : (memref, index, index, index) -> () // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref<1xf32>, index) -> memref<1xf32, strided<[1], offset: ?>> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}] [1] [1] : memref<1xf32> to memref<1xf32, strided<[1], offset: ?>> // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref<1xf32>, index) -> memref<1xf32, strided<[1], offset: ?>> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}] [1] [1] : memref<1xf32> to memref<1xf32, strided<[1], offset: ?>> // CHECK-NEXT: ^ subview runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @subview(%alloca, %1) : (memref<1xf32>, index) -> () // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref<1xf32>, index) -> memref<1xf32, strided<[1], offset: ?>> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}] [1] [1] : memref<1xf32> to memref<1xf32, strided<[1], offset: ?>> // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref<1xf32>, index) -> memref<1xf32, strided<[1], offset: ?>> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}] [1] [1] : memref<1xf32> to memref<1xf32, strided<[1], offset: ?>> // CHECK-NEXT: ^ subview runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @subview(%alloca, %n1) : (memref<1xf32>, index) -> () // Slice runs out-of-bounds due to size // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref, index, index, index) -> memref> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}, 0] [%{{.*}}, 4] [%{{.*}}, 1] : memref to memref> // CHECK-NEXT: ^ subview runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @subview_dynamic(%alloca_4_dyn, %0, %5, %1) : (memref, index, index, index) -> () // Slice runs out-of-bounds due to stride // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "memref.subview"(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (memref, index, index, index) -> memref> + // CHECK-NEXT: memref.subview %{{.*}}[%{{.*}}, 0] [%{{.*}}, 4] [%{{.*}}, 1] : memref to memref> // CHECK-NEXT: ^ subview runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @subview_dynamic(%alloca_4_dyn, %0, %4, %4) : (memref, index, index, index) -> () diff --git a/mlir/test/Integration/Dialect/Tensor/cast-runtime-verification.mlir b/mlir/test/Integration/Dialect/Tensor/cast-runtime-verification.mlir index f37a6d6383c48..a96b2bec1e341 100644 --- a/mlir/test/Integration/Dialect/Tensor/cast-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/Tensor/cast-runtime-verification.mlir @@ -40,14 +40,14 @@ func.func @main() { %alloc = tensor.empty() : tensor<5xf32> // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.cast"(%{{.*}}) : (tensor) -> tensor<10xf32> + // CHECK-NEXT: tensor.cast %{{.*}} : tensor to tensor<10xf32> // CHECK-NEXT: ^ size mismatch of dim 0 // CHECK-NEXT: Location: loc({{.*}}) %1 = tensor.cast %alloc : tensor<5xf32> to tensor func.call @cast_to_static_dim(%1) : (tensor) -> (tensor<10xf32>) // CHECK-NEXT: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.cast"(%{{.*}}) : (tensor<*xf32>) -> tensor + // CHECK-NEXT: tensor.cast %{{.*}} : tensor<*xf32> to tensor // CHECK-NEXT: ^ rank mismatch // CHECK-NEXT: Location: loc({{.*}}) %3 = tensor.cast %alloc : tensor<5xf32> to tensor<*xf32> diff --git a/mlir/test/Integration/Dialect/Tensor/dim-runtime-verification.mlir b/mlir/test/Integration/Dialect/Tensor/dim-runtime-verification.mlir index e9e5c040c6488..1a26ebe29fe27 100644 --- a/mlir/test/Integration/Dialect/Tensor/dim-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/Tensor/dim-runtime-verification.mlir @@ -22,7 +22,7 @@ func.func @main() { %tensor = tensor.empty() : tensor<1xf32> // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.dim"(%{{.*}}, %{{.*}}) : (tensor<1xf32>, index) -> index + // CHECK-NEXT: tensor.dim %{{.*}}, %{{.*}} : tensor<1xf32> // CHECK-NEXT: ^ index is out of bounds // CHECK-NEXT: Location: loc({{.*}}) %dim = tensor.dim %tensor, %c4 : tensor<1xf32> diff --git a/mlir/test/Integration/Dialect/Tensor/extract-runtime-verification.mlir b/mlir/test/Integration/Dialect/Tensor/extract-runtime-verification.mlir index 73fcec4d7abcd..cc252a2b79b9e 100644 --- a/mlir/test/Integration/Dialect/Tensor/extract-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/Tensor/extract-runtime-verification.mlir @@ -44,19 +44,19 @@ func.func @main() { %alloc_2x2x2 = tensor.empty(%2, %2, %2) : tensor // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract"(%{{.*}}, %{{.*}}) : (tensor<1xf32>, index) -> f32 + // CHECK-NEXT: tensor.extract %{{.*}}[%{{.*}}] : tensor<1xf32> // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @extract(%alloca_1, %1) : (tensor<1xf32>, index) -> () // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract"(%{{.*}}, %{{.*}}) : (tensor, index) -> f32 + // CHECK-NEXT: tensor.extract %{{.*}}[%{{.*}}] : tensor // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_dynamic(%alloc_1, %1) : (tensor, index) -> () // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract"(%{{.*}}, %{{.*}}) : (tensor, index, index, index) -> f32 + // CHECK-NEXT: tensor.extract %{{.*}}[%{{.*}}, %{{.*}}, %{{.*}}] : tensor // CHECK-NEXT: ^ out-of-bounds access // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_nd_dynamic(%alloc_2x2x2, %1, %n1, %0) : (tensor, index, index, index) -> () diff --git a/mlir/test/Integration/Dialect/Tensor/extract_slice-runtime-verification.mlir b/mlir/test/Integration/Dialect/Tensor/extract_slice-runtime-verification.mlir index 341a59e8b8102..0c7c4a6cb2d6f 100644 --- a/mlir/test/Integration/Dialect/Tensor/extract_slice-runtime-verification.mlir +++ b/mlir/test/Integration/Dialect/Tensor/extract_slice-runtime-verification.mlir @@ -47,47 +47,47 @@ func.func @main() { // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1, %arg2, %arg3) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor, index, index, index) -> tensor + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}, 0] [%{{.*}}, 1] [%{{.*}}, 1] : tensor to tensor // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1, %arg2, %arg3) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor, index, index, index) -> tensor + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}, 0] [%{{.*}}, 1] [%{{.*}}, 1] : tensor to tensor // CHECK-NEXT: ^ extract_slice runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_slice_dynamic_rank_reduce(%alloca_4_dyn, %5, %5, %1) : (tensor, index, index, index) -> () // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor<1xf32>, index) -> tensor<1xf32> + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}] [1] [1] : tensor<1xf32> to tensor<1xf32> // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor<1xf32>, index) -> tensor<1xf32> + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}] [1] [1] : tensor<1xf32> to tensor<1xf32> // CHECK-NEXT: ^ extract_slice runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_slice(%alloca, %1) : (tensor<1xf32>, index) -> () // Offset is out-of-bounds and slice runs out-of-bounds // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor<1xf32>, index) -> tensor<1xf32> + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}] [1] [1] : tensor<1xf32> to tensor<1xf32> // CHECK-NEXT: ^ offset 0 is out-of-bounds // CHECK-NEXT: Location: loc({{.*}}) // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor<1xf32>, index) -> tensor<1xf32> + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}] [1] [1] : tensor<1xf32> to tensor<1xf32> // CHECK-NEXT: ^ extract_slice runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_slice(%alloca, %n1) : (tensor<1xf32>, index) -> () // Slice runs out-of-bounds due to size // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1, %arg2, %arg3) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor, index, index, index) -> tensor + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}, 0] [%{{.*}}, 4] [%{{.*}}, 1] : tensor to tensor // CHECK-NEXT: ^ extract_slice runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_slice_dynamic(%alloca_4_dyn, %0, %5, %1) : (tensor, index, index, index) -> () // Slice runs out-of-bounds due to stride // CHECK: ERROR: Runtime op verification failed - // CHECK-NEXT: "tensor.extract_slice"(%arg0, %arg1, %arg2, %arg3) <{operandSegmentSizes = array, static_offsets = array, static_sizes = array, static_strides = array}> : (tensor, index, index, index) -> tensor + // CHECK-NEXT: tensor.extract_slice %{{.*}}[%{{.*}}, 0] [%{{.*}}, 4] [%{{.*}}, 1] : tensor to tensor // CHECK-NEXT: ^ extract_slice runs out-of-bounds along dimension 0 // CHECK-NEXT: Location: loc({{.*}}) func.call @extract_slice_dynamic(%alloca_4_dyn, %0, %4, %4) : (tensor, index, index, index) -> ()