-
Notifications
You must be signed in to change notification settings - Fork 25
Fix gather-to-lds tail padding calculations #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a tail padding calculation bug in the gather-to-shared operation. When the total number of elements is perfectly divisible by elements_per_wave, the tail padding should be 0, not elements_per_wave.
Key changes:
- Fixed tail_padding calculation to correctly handle the case when materialized shape is perfectly divisible by elements_per_wave
- Updated test expectations to reflect changes in memory allocation patterns (direct allocation instead of view-based allocation)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| wave_lang/kernel/wave/gather_to_shared.py | Fixed tail_padding calculation by adding modulo operation to avoid unnecessary padding when perfectly divisible |
| lit_tests/kernel/wave/gather_to_shared.py | Updated test expectations to match new memory allocation patterns (direct alloc instead of alloc+view) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Padding should 0 when sizes are aligned. --------- Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com> Signed-off-by: sa-faizal <sahil.faizal@amd.com>
Padding should 0 when sizes are aligned.