Skip to content

[Fix][Metal][WebGPU] Preserve variable bindings when resolving allocation bounds - #20337

Open
akaashrp wants to merge 2 commits into
apache:mainfrom
akaashrp:metal-allocation-bound-bindings
Open

[Fix][Metal][WebGPU] Preserve variable bindings when resolving allocation bounds#20337
akaashrp wants to merge 2 commits into
apache:mainfrom
akaashrp:metal-allocation-bound-bindings

Conversation

@akaashrp

Copy link
Copy Markdown
Contributor

Track primitive Bind expressions in a per-function analyzer so allocation bounds remain provable after common subexpression elimination. Continue rejecting extents whose only upper bound is the integer type limit.

Track primitive Bind expressions in a per-function analyzer so allocation bounds remain provable after common subexpression elimination. Continue rejecting extents whose only upper bound is the integer type limit.

Test chained bounded and unbounded bindings. Update the vector-ramp test to use an explicit T.let declaration required by the current TIRx parser.
Keep a per-function arithmetic analyzer and record primitive variable bindings before resolving allocation extents. This preserves finite bounds hoisted into temporary variables, including chains of bindings, for local and workgroup allocations.

Cover bounded and unbounded aliases in both storage scopes and verify that resolved workgroup allocation sizes still obey the target memory limit.
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