Skip to content

Conversation

@Hardcode84
Copy link
Contributor

@Hardcode84 Hardcode84 commented Oct 29, 2025

Padding should 0 when sizes are aligned.

Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
Copilot AI review requested due to automatic review settings October 29, 2025 11:39
Copy link
Contributor

Copilot AI left a 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>
Signed-off-by: Ivan Butygin <ivan.butygin@gmail.com>
Copilot AI review requested due to automatic review settings October 29, 2025 19:49
Copy link
Contributor

Copilot AI left a 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.

@raikonenfnu raikonenfnu merged commit 85374a2 into iree-org:main Oct 29, 2025
19 checks passed
sa-faizal pushed a commit that referenced this pull request Nov 3, 2025
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>
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