Skip to content

fix(hlo): concatenate axis-sum (#667) + reshape shape lookup (#666); cut 0.28.0#670

Merged
michalharakal merged 1 commit into
developfrom
fix/reshape-concatenate-shape-0.28.0
Jun 6, 2026
Merged

fix(hlo): concatenate axis-sum (#667) + reshape shape lookup (#666); cut 0.28.0#670
michalharakal merged 1 commit into
developfrom
fix/reshape-concatenate-shape-0.28.0

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Fixes two StableHLO shape-converter bugs surfaced by the conformance harness, and bumps the version to 0.28.0 (which also ships the develop-only #663/#668 export fixes — none are in a 0.27.x tag yet).

#667 — multi-input concatenate mis-infers the axis

convertConcat trusted the node's declared output spec, which had the wrong extent on the concatenated axis for >2 operands (e.g. (1x1x8x8, 1x4x8x8, 1x1x8x8) dim 1 -> 1x1x8x8 instead of 1x6x8x8). Now it computes the result type by summing the operands' extents on the axis.

#666 — reshape lowers to an empty function

convertReshape only looked under shape/newShape/output-spec. The reshape trace records the target under outputShape, so it bailed with 'requires a target shape specification'. Now it also reads outputShape and synthesises a typed result when no output spec is present.

Adds ReshapeConcatShapeFixTest (both cases); full skainet-compile-hlo jvmTest suite is green. Closes #666, #667.

#666); cut 0.28.0

ShapeOperationsConverter:
- convertConcat now COMPUTES the result type, summing the operands' extents on the
  concatenated axis, instead of trusting the node's declared output spec (which
  mis-inferred the axis for >2 operands — e.g. (1x1x8x8, 1x4x8x8, 1x1x8x8) along
  dim 1 produced 1x1x8x8 instead of 1x6x8x8). [#667]
- convertReshape now also reads the target shape from the `outputShape` parameter
  (the key the reshape trace records it under) and synthesises a typed result when
  no output spec is declared, so a reshape no longer lowers to an empty function. [#666]

Adds ReshapeConcatShapeFixTest covering both; full skainet-compile-hlo suite green.
Bumps VERSION_NAME to 0.28.0 (also carries the develop-only #663/#668 export fixes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@michalharakal michalharakal merged commit e2c7b44 into develop Jun 6, 2026
4 checks passed
@michalharakal michalharakal deleted the fix/reshape-concatenate-shape-0.28.0 branch June 6, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant