Skip to content

gpuav: Skip data race pass on Subgroup shared barriers - #13753

Merged
spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:gpuav-race-subgroup-barrier
Nov 24, 2026
Merged

spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
apollo-2006:gpuav-race-subgroup-barrier

Conversation

@apollo-2006

Copy link
Copy Markdown
Contributor

Closes #12813

The data race pass only clears its shadow memory on a Workgroup scope barrier, so a Subgroup scope OpControlBarrier on shared memory (GroupMemoryBarrierWithWaveSync in Slang) was ignored and the accesses after it were reported as RaceOnAtomic. As @jeffbolznv suggested, the pass now skips shaders that use one.

Added GLSL and Slang tests (both fail on main), and there are no new GPU-AV failures on RADV. Happy to change anything :)

@apollo-2006
apollo-2006 requested a review from a team as a code owner November 20, 2026 16:20
@apollo-2006
apollo-2006 force-pushed the gpuav-race-subgroup-barrier branch from 0ae5e51 to 460bd71 Compare November 20, 2026 16:23
@jeffbolznv

Copy link
Copy Markdown
Contributor

This seems like a reasonable compromise. I tried to think of a good way to fold subgroup barrier tracking into the pass, but never got anywhere with it.

A Subgroup scope OpControlBarrier with WorkgroupMemory semantics
orders shared memory within a subgroup, but only a Workgroup scope
barrier resets the shadow memory, so the accesses after it were
reported as races. Skip the pass for those shaders instead.
@spencer-lunarg
spencer-lunarg force-pushed the gpuav-race-subgroup-barrier branch from 460bd71 to 94ddeec Compare November 23, 2026 22:22

@spencer-lunarg spencer-lunarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Happy with this, but redid it to not have to rewalk every instruction in the pass and just detect it once when we parse the module initially as save a bool to check

@spencer-lunarg
spencer-lunarg merged commit 9fbee57 into KhronosGroup:main Nov 24, 2026
29 checks passed
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.

GroupMemoryBarrierWithWaveSync function is ignored

3 participants