Skip to content

Conversation

@slinder1
Copy link

@slinder1 slinder1 commented Nov 7, 2025

The existing check for this case only comes after a derefence of what can be an iterator sentinel (leading to an assert).

This may not be purely NFC in that it also avoids queuing the effectively-empty region for rescheduling, but AFAICT this should be purely an optimization.

Testing this seems difficult, as the high-level scheduler avoids scheduling these "empty" regions. This means a reproducer has to depend on behavior of the scheduler passes before PreRARematStage in order to craft a region which triggers the bug.

Since this is a release blocker I am posting a PR now, as both Shore Shen and I have manually verified that this resolves the particular crash from SWDEV-564142 but I am still working on making a reasonable test.

(cherry picked from commit 004cfea)

The existing check for this case only comes after a derefence of what
can be an iterator sentinel (leading to an assert).

This may not be purely NFC in that it also avoids queuing the
effectively-empty region for rescheduling, but AFAICT this should be
purely an optimization.

Testing this seems difficult, as the high-level scheduler avoids
scheduling these "empty" regions. This means a reproducer has to depend
on behavior of the scheduler passes before PreRARematStage in order to
craft a region which triggers the bug.

Since this is a release blocker I am posting a PR now, as both Shore
Shen and I have manually verified that this resolves the particular
crash from SWDEV-564142 but I am still working on making a reasonable
test.

(cherry picked from commit 004cfea)
@z1-cciauto
Copy link
Collaborator

@slinder1 slinder1 changed the title [AMDGPU] Handle empty-except-for-DI regions in PreRARematerialize [DoNotMerge][AMDGPU] Handle empty-except-for-DI regions in PreRARematerialize Nov 7, 2025
@slinder1 slinder1 changed the title [DoNotMerge][AMDGPU] Handle empty-except-for-DI regions in PreRARematerialize [AMDGPU] Handle empty-except-for-DI regions in PreRARematerialize Nov 7, 2025
@bcahoon bcahoon self-requested a review November 7, 2025 22:14
@arsenm
Copy link

arsenm commented Nov 8, 2025

Testcase?

@arsenm
Copy link

arsenm commented Nov 8, 2025

Why is this direct to mainline?

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.

5 participants