DAG DSL → StableHLO: multi-input concatenate mis-infers the concatenated axis (0.27.0)
Surfaced by the conformance harness. A 3-input concat along dim=1 infers the output
shape with the channel extent of the first operand instead of the sum of all operands.
The 2-input concat in the op micro-suite produces the correct shape, so this is
arity/axis-specific — distinct from #663 (self-containment) and #666 (reshape/norms).
Repro (verified, 0.27.0)
A YOLO-style detection head concatenating three branches (1,1,8,8) + (1,4,8,8) + (1,1,8,8)
along the channel axis emits:
%out = stablehlo.concatenate %a, %b, %c, dim = 1
: (tensor<1x1x8x8xf32>, tensor<1x4x8x8xf32>, tensor<1x1x8x8xf32>)
-> tensor<1x1x8x8xf32> // EXPECTED: tensor<1x6x8x8xf32>
The result type keeps 1 on the concatenated axis (operand 0's extent) instead of
1+4+1 = 6. iree-compile then rejects the module (operand/result shapes inconsistent).
Expected
concatenate over dim = d should set the result extent on d to the sum of the operands'
extents on d (here 6), for any number of operands.
cc #663
DAG DSL → StableHLO: multi-input
concatenatemis-infers the concatenated axis (0.27.0)Surfaced by the conformance harness. A 3-input
concatalongdim=1infers the outputshape with the channel extent of the first operand instead of the sum of all operands.
The 2-input
concatin the op micro-suite produces the correct shape, so this isarity/axis-specific — distinct from #663 (self-containment) and #666 (
reshape/norms).Repro (verified, 0.27.0)
A YOLO-style detection head concatenating three branches
(1,1,8,8) + (1,4,8,8) + (1,1,8,8)along the channel axis emits:
The result type keeps
1on the concatenated axis (operand 0's extent) instead of1+4+1 = 6. iree-compile then rejects the module (operand/result shapes inconsistent).Expected
concatenateoverdim = dshould set the result extent ondto the sum of the operands'extents on
d(here 6), for any number of operands.cc #663