[LDS] Add pre-check to ensure all copies are DMA-convertible before converting any#23472
Merged
[LDS] Add pre-check to ensure all copies are DMA-convertible before converting any#23472
Conversation
51829cb to
4611c5f
Compare
…before converting any. * Add isCopyDMAConvertible() to check DMA viability without modifying IR. * In GPUConvertToCoalescedDMAPass, collect all linalg.copy ops with use_global_load_dma or derived_thread_config. If ALL are DMA-convertible, upgrade them all to use_global_load_dma. If ANY fails, downgrade them all to derived_thread_config. * Add new lit tests for paired copy conversion and mixed attribute scenarios.
4611c5f to
d3fe89e
Compare
* Rename checkDMAAlignment to getDMAAlignedSubgroupSize for clarity. * Add TODO about isCopyDMAConvertible vs tracesToTensorEmpty divergence. * Make test comments more explicit about minElementsPerTransfer calculation. * Add negative test for "no DMA intent" path (only derived_thread_config). Co-Authored-By: Claude Opus 4.6 <[email protected]>
36bc0f0 to
a74256e
Compare
MaheshRavishankar
pushed a commit
to MaheshRavishankar/iree
that referenced
this pull request
Feb 24, 2026
…onverting any (iree-org#23472) This patch ensures we either use DMA for all promoted operands or none. This is to ensure we can have async buffer pipelines. * Add isCopyDMAConvertible() to check DMA viability without modifying IR. * In GPUConvertToCoalescedDMAPass, collect all linalg.copy ops with use_global_load_dma or derived_thread_config. If ALL are DMA-convertible, upgrade them all to use_global_load_dma. If ANY fails, downgrade them all to derived_thread_config. * Add new lit tests for paired copy conversion and mixed attribute scenarios. --------- Co-authored-by: Claude Opus 4.6 <[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.
This patch ensures we either use DMA for all promoted operands or none. This is to ensure we can have async buffer pipelines.