Repository navigation
Conversation
`hoistOneStaticallyBoundAllocation` pads a dynamic allocation to its computed upper bound. An unconstrained dynamic dimension carries only the `index` type maximum as its bound, so padding yields a bogus multi- petabyte allocation (#24483). Decline to hoist past the target's `max_stack_allocation_size`; declining to hoist is always valid -- it simply leaves the IR's existing dynamic allocation in place. Extent of the #24483 fix: this is partial. It implements the first of the three fixes proposed in that issue -- the hoist itself no longer turns an `index`-umax-derived bound into a bogus static `alloca` (which fed poison strides into codegen and silently dropped data). It does not on its own make the originally-affected pipeline -- dynamic-shape `inner_tiled` data-tiling -- compile: as #24483 notes, capping leaves a dynamic CPU stack allocation, which is itself rejected downstream. What this commit guarantees is only that the failure mode is no longer a *silent miscompile*. The dynamic-shape `inner_tiled` pipeline is fully unblocked by a later commit in this series ("Fold reshape-containing encoding relayouts to map_store"), which removes the whole-tensor `pack` so the unbounded allocation never arises. #24483 is therefore not fully resolved by this commit alone. Progress towards #24515. Co-Authored-By: Claude Opus 4.7 <[email protected]> Signed-off-by: Benoit Jacob <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hoistOneStaticallyBoundAllocationpads a dynamic allocation to its computed upper bound. An unconstrained dynamic dimension carries only theindextype maximum as its bound, so padding yields a bogus multi- petabyte allocation (#24483). Decline to hoist past the target'smax_stack_allocation_size; declining to hoist is always valid -- it simply leaves the IR's existing dynamic allocation in place.Extent of the #24483 fix: this is partial. It implements the first of the three fixes proposed in that issue -- the hoist itself no longer turns an
index-umax-derived bound into a bogus staticalloca(which fed poison strides into codegen and silently dropped data). It does not on its own make the originally-affected pipeline -- dynamic-shapeinner_tileddata-tiling -- compile: as #24483 notes, capping leaves a dynamic CPU stack allocation, which is itself rejected downstream. What this commit guarantees is only that the failure mode is no longer a silent miscompile. The dynamic-shapeinner_tiledpipeline is fully unblocked by a later commit in this series ("Fold reshape-containing encoding relayouts to map_store"), which removes the whole-tensorpackso the unbounded allocation never arises. #24483 is therefore not fully resolved by this commit alone.Progress towards #24515.