diff options
| author | Emma <47298336+zzEmmazz@users.noreply.github.com> | 2026-11-23 00:37:03 +0200 |
|---|---|---|
| committer | Emma <47298336+zzEmmazz@users.noreply.github.com> | 2026-11-23 00:37:03 +0200 |
| commit | 8f119bfb351ccdc99e3f79e03bc0e6d1933cb76f (patch) | |
| tree | 3abf9960b56911bfc158a243b61b7a697b83e23d /runtime/src/pe_loader.cpp | |
| parent | f847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff) | |
rdna2spirv: clear the wave64 exchange buffer with one writer per word (SHADER-708)
Under --wave64-emulate the scheduler cleared parts of %x_buf (Workgroup memory)
with plain stores that several invocations aimed at one word: the zeroing before
the first barrier clamped its index with UMin, so every invocation past the end
of a range stored to its last word, and at the top of each round every
invocation with nothing to free stored 0 to a shared sink word. All stores wrote
0, so results did not depend on it, but it is a data race, and GPU-assisted
validation reports SharedMemoryDataRace-RaceOnStore on every emulated compute
shader.
Invocation i now clears word i of each row, a short last row is stored only by
the invocations that have a word in it, and in a round only lane 0 of a wave
(mask words) and invocation 0 (counts) store, each behind a selection that ends
before the barrier. The last word of %x_buf is no longer written; it stays
allocated so the buffer size does not change. No module changes without
--wave64-emulate.
tests/semantic/test_w64x_clear_single_writer.py runs the scheduler's head for
every invocation at nine workgroup sizes.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions