Skip to content

Conversation

@Yu-Zhewen
Copy link
Contributor

@Yu-Zhewen Yu-Zhewen commented Dec 23, 2025

When folding extract_slice operations into map_scatter, the current behavior is always adding masking logic, without checking whether the extract_slice is an identity. For static shapes, this is fine because later optimizations will remove the unnecessary masking. However, for dynamic shapes, the masking code persists and adds runtime overhead. This PR therefore avoids inserting unnecessary masking at the first place.

This PR also changes the behavior of pure-tensor, identity map_scatter canonicalization from being replaced with a copy operation to simply erased. The previous use of copy operations was causing issues with LLVMGPUSelectLoweringStrategyPass.

This PR helps mitigate the VGPR spilling issue observed in #21865.

Depends on llvm/llvm-project#173356.

Signed-off-by: Yu-Zhewen <[email protected]>
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