CS_DefragHeap_ComputeRelocations took 11.9 ms of GPU time a frame with
the pair meetings of ce383f8 (run 184458, the card's time by command).
Three changes, all for console waves meeting on their own
(`with_pair_meetings`: the digest list, VICTORY_WAVE_WIDE=1):
- LDS order (`LdsOrder`): the program cut at its s_barriers; an access
needs the host waves of its console wave to meet only when a plain
ds_write stands in a piece it can reach or be reached from. Atomics
among themselves and reads of what an earlier piece wrote need none.
In ComputeRelocations the relocation pass (reads, ds_cmpst loops,
ds_add_rtn) and the copy pass after it lose every meeting, and their
per-lane loops are no longer taken wave-wide: 8 branches widened
instead of 18, 50 meetings in the code instead of 138. Reads near an
LDS atomic are not taken as alike in every lane.
- A meeting: the first lane of each host wave counts it in (one atomic
per host wave, two a meeting), the wave polls the counter with one
shared load behind a fence. Before: an atomic per lane to arrive and
per lane per poll.
- An exchange is one meeting: two buffers per console wave, taken in
turn by the count of meetings (a half writes one only after the
meeting its partner's reads of it came before). Before: two meetings.
A first-lane read exchanges "has a lane" and the value at once.
Other programs translate as before (900 compute programs, the same DXIL
with VICTORY_HOST_MAX_WAVE=32); ComputeRelocations validates. Tests: the
two console waves' loops still bit-exact on the RTX 4070 SUPER; a new
test for the LDS order.
Co-Authored-By: Claude Opus 5.5 <[email protected]>