Skip to content

Fix A-scale preshuffle LDS reads for multi-wave M configurations#1056

Merged
harsh-nod merged 4 commits intoiree-org:mainfrom
panditsa:sanket/preshuffle_a_fix
Mar 6, 2026
Merged

Fix A-scale preshuffle LDS reads for multi-wave M configurations#1056
harsh-nod merged 4 commits intoiree-org:mainfrom
panditsa:sanket/preshuffle_a_fix

Conversation

@panditsa
Copy link
Contributor

@panditsa panditsa commented Mar 5, 2026

  • Fix A-scale LDS addressing in preshuffle_scale_to_shared that caused wrong results (50% mismatch) when multiple waves cover different M-blocks (e.g., wave_shape=(2,2) with block=(128,32,256))
  • Handle _Rational values inside Max/Min and comparison operators in the emitter, fixing codegen failures with dynamic shapes
  • Add (128, 32, 256) and (256, 224, 256) macrotiles with wave_shape=(2,2) to preshuffle tests, split tile lists by wave shape (MACROTILES_PRESHUFFLE_1x4, MACROTILES_PRESHUFFLE_2x2), and parametrize both static and dynamic tests over (block_shape, wave_shape) pairs

panditsa added 3 commits March 5, 2026 16:44
Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
@panditsa panditsa marked this pull request as ready for review March 5, 2026 23:24
@harsh-nod harsh-nod self-requested a review March 6, 2026 03:35
Copy link
Collaborator

@harsh-nod harsh-nod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@harsh-nod harsh-nod merged commit 7b169ba into iree-org:main Mar 6, 2026
17 checks passed
xintin pushed a commit that referenced this pull request Mar 6, 2026
- Fix A-scale LDS addressing in `preshuffle_scale_to_shared` that caused
wrong results (50% mismatch) when multiple waves cover different
M-blocks (e.g., `wave_shape=(2,2)` with `block=(128,32,256)`)
- Handle `_Rational` values inside `Max`/`Min` and comparison operators
in the emitter, fixing codegen failures with dynamic shapes
- Add `(128, 32, 256)` and `(256, 224, 256)` macrotiles with
`wave_shape=(2,2)` to preshuffle tests, split tile lists by wave shape
(`MACROTILES_PRESHUFFLE_1x4`, `MACROTILES_PRESHUFFLE_2x2`), and
parametrize both static and dynamic tests over `(block_shape,
wave_shape)` pairs

---------

Signed-off-by: Sanket Pandit <sanket.pandit@amd.com>
Signed-off-by: xintin <gaurav.verma@amd.com>
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