engine/rr: run dec0_1's translated tail on two waves
dec0_1's translated output tail ran on wave 0 while the block's other three waves had finished. It is a prologue (y = r + MLP * s2 and the shuffles that give each lane its two pixels) followed by the same per-pixel code twice. gen_rr2_enc0.py --tail-waves N gives each of N waves its own copy of the tail with only its N-th of the stores (in order: the first pixel's six, then the second's), and the compiler drops what a copy's stores do not need. Every stored value comes from the same instructions on the same values as on one wave. With one window per workgroup, the window index no longer adds gl_SubgroupID (it was 0 for the only valid wave). compile_rr2.py uses two waves (D4R_RR2_TAIL_WAVES=1 for one): 120 -> 96 vector registers, 12 -> 16 waves per SIMD; RX 9070 XT, 720p -> 1440p: dec0_1 565 -> 474 us. Four waves, splitting each pixel's stores, is slower (529 us). Every image byte-identical on the replay inputs (also robustness2, no robust access and the split gather build). Signed-off-by: itchyfeetleech <[email protected]>
This commit is contained in:
1 parent
69a4f6ae2f
commit
c29076b38f
3 files changed
+31
-5
No files matched your search
@@ -71,7 +71,7 @@ KERNEL['downp'] = 'rr2_downsample_kernel_static_hdr'
|
||||
BLOCK['downp'] = '16,16,1'
|
||||
BUFFERS['downp'] = [72, 168, 176]
|
||||
# with --native: the translation of the per-pixel code around the native block (engine/rr/gen_rr2_enc0.py)
|
||||
HYBRID = {'enc0': [], 'dec0_1': ['--dec0_1']}
|
||||
HYBRID = {'enc0': [], 'dec0_1': ['--dec0_1', '--tail-waves', os.environ.get('D4R_RR2_TAIL_WAVES', '2')]}
|
||||
# windows per workgroup of the hybrid stages (gen_rr2_enc0.py --group; D4R_RR2_GROUP to experiment)
|
||||
GROUP = int(os.environ.get('D4R_RR2_GROUP', '1'))
|
||||
# encoder 0's gather as a pass of its own, which pays with the four-wave block (one shader would run the gather on one
|
||||
|
||||
Reference in new issue
Block a user