Skip to content

[Fix][Metal] Bound symbolic stack allocations - #20236

Open
akaashrp wants to merge 3 commits into
apache:mainfrom
akaashrp:upstream/metal-symbolic-stack-allocations
Open

[Fix][Metal] Bound symbolic stack allocations#20236
akaashrp wants to merge 3 commits into
apache:mainfrom
akaashrp:upstream/metal-symbolic-stack-allocations

Conversation

@akaashrp

Copy link
Copy Markdown
Contributor

Use analyzer-proven finite upper bounds when emitting fixed-size Metal arrays. Reject unbounded, nonpositive, and overflowing extents while allowing shapes such as min(dynamic_extent, constant_limit).

Comment thread src/backend/metal/codegen/codegen_metal.cc Outdated
Use analyzer-proven finite upper bounds when emitting fixed-size Metal arrays. Reject unbounded, nonpositive, and overflowing extents while allowing shapes such as min(dynamic_extent, constant_limit).
Exercise rejection of nonpositive allocation upper bounds and size_t element-count overflow in Metal code generation. Clarify that symbolic allocation sizing uses program-derived compile-time upper bounds rather than integer dtype limits.
Treat the analyzer positive-infinity sentinel independently from an integer dtype maximum. This allows finite uint64 extents whose dtype maximum is represented as LargeUIntImm while continuing to reject genuinely unbounded extents.

Add bounded and unbounded uint64 codegen regressions alongside the existing narrower-integer coverage.
@akaashrp
akaashrp force-pushed the upstream/metal-symbolic-stack-allocations branch from 47bee57 to c13fab9 Compare September 1, 2026 23:44
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.

2 participants