[Mlir-commits] [mlir] [mlir][tosa] Add concat/slice_shape ops (PR #174620)

Peng Sun llvmlistbot at llvm.org
Wed Jan 7 14:08:39 PST 2026


================
@@ -4666,6 +4666,56 @@ LogicalResult tosa::DimOp::verify() {
   return success();
 }
 
+LogicalResult tosa::ConcatShapeOp::verify() {
----------------
psunn wrote:

`concat_shape` currently allows an empty variadic input list.

For example, the following test case would pass:
```
func.func @test_concat_shape_empty_inputs() -> !tosa.shape<0> {
  %out = tosa.concat_shape : () -> !tosa.shape<0>
  return %out : !tosa.shape<0>
}
```

This may be a rare corner case here (also applicable to the current TOSA spec).
Happy to discuss this further and address it in a follow-up PR if needed.

My understanding is that the semantics of `concat_shape` presume at least one input. An empty input list is unlikely to be meaningful and could potentially hide user errors.

If we intend to disallow empty inputs as such, we may want to consider clarifying or updating the TOSA Spec accordingly.

https://github.com/llvm/llvm-project/pull/174620


More information about the Mlir-commits mailing list