Skip to content

[Fix][Relax] Track lowered reshape storage aliases - #20134

Open
akaashrp wants to merge 2 commits into
apache:mainfrom
akaashrp:upstream/relax-reshape-alias-liveness
Open

[Fix][Relax] Track lowered reshape storage aliases#20134
akaashrp wants to merge 2 commits into
apache:mainfrom
akaashrp:upstream/relax-reshape-alias-liveness

Conversation

@akaashrp

Copy link
Copy Markdown
Contributor

StaticPlanBlockMemory tracks relax.reshape as an alias of its input storage, but did not recognize direct calls to vm.builtin.reshape. DispatchSortScan emits these packed reshape calls before static memory planning. Without alias tracking, the planner could reuse the input storage while the reshaped view was still live, allowing later allocations to overwrite its contents.

This PR:

  • Recognizes vm.builtin.reshape as a storage-aliasing operation
  • Preserves the input storage token through the reshape result
  • Updates the dynamic-output expected IR for the corrected planning path

@yongwww yongwww closed this Aug 17, 2026
@yongwww yongwww reopened this Aug 17, 2026
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