Skip to content

[mlir][tosa] Limit shape op level checks to MAX_SHAPE_LEN - #15

Open
atabakp wants to merge 1 commit into
torq-3.10from
tosa-max-shape-len-level-check
Open

[mlir][tosa] Limit shape op level checks to MAX_SHAPE_LEN#15
atabakp wants to merge 1 commit into
torq-3.10from
tosa-max-shape-len-level-check

Conversation

@atabakp

@atabakp atabakp commented Jul 27, 2026

Copy link
Copy Markdown

Cherry-pick of llvm/llvm-project@bc010989719d. Replaces #13.

#13 works around the failure by globally disabling shape-type rank validation. This is the upstream root-cause fix: shape ops are level-checked against a new MAX_SHAPE_LEN (16 at level 8K, 64 at NONE), and the incorrect blanket MAX_RANK check on all shapeTypes is removed. A pad shape operand is 2*rank, so it was never correct to check it against MAX_RANK.

Confirmed on the #13 case (in16x1x48, k3x1, oc48, s2x1): the stride-2 decomposition emits tosa.pad with !tosa.shape<8>, which fails exceeds MAX_RANK on torq-3.10 and passes with this change.

Adapted: only AddShape, DivCeilShape, DivFloorShape, MulShape and SubShape exist in this tree, so the remaining conversions and their tests are omitted.

Cherry-pick of llvm/llvm-project@bc010989719d, adapted to the shape ops present in this tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant