[Mlir-commits] [mlir] [mlir][tosa] Add concat/slice_shape ops (PR #174620)
Peng Sun
llvmlistbot at llvm.org
Wed Jan 7 13:19:09 PST 2026
================
@@ -1690,3 +1690,32 @@ func.func @test_dim(%arg0: tensor<1x2x3x4x5x6x7x8xi32>) -> !tosa.shape<1> {
%0 = tosa.dim %arg0 {axis = 2 : i32} : (tensor<1x2x3x4x5x6x7x8xi32>) -> !tosa.shape<1>
return %0 : !tosa.shape<1>
}
+
+
+// -----
+
+func.func @test_concat_shape_invalid_list_size() {
+ %0 = tosa.const_shape {values = dense<[]> : tensor<0xindex>} : () -> !tosa.shape<0>
+ // expected-error at +1 {{'tosa.concat_shape' op failed level check for MAX_TENSOR_LIST_SIZE: input}}
----------------
psunn wrote:
NIT: the level-check errors would be clearer if they reported both the limit and the actual list size.
Since it’s unrelated to this PR, I’ll leave the code as-is here, but a follow-up could update `levelCheckListSize()` to include something like _“MAX_TENSOR_LIST_SIZE (N) exceeded: got M for <desc>”_ so users see both the cap and the offending value.
https://github.com/llvm/llvm-project/pull/174620
More information about the Mlir-commits
mailing list