compute: DPP16/DPP8 and cross-lane operations through SM 6 wave intrinsics #1536

Open
opened 2026-11-24 13:48:00 +00:00 by denn0x · 10 comments
denn0x commented 2026-11-24 13:48:00 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T13:48:00Z.


Problem

Measured on the 349 gfx1013 compute programs (device slot 67 pipelines) that the executable created in one run past start-up, and on the 627 dispatches of one busy frame after loading. After LDS and stores, the largest stop by dispatch count is DPP: 17 programs, 53 of the busy frame's
dispatches (v_add_nc_u32_dpp, v_or_b32_dpp, v_add_f32_dpp, v_min_f32_dpp with row_shr, row_bcast,
quad_perm). Related cross-lane stops: v_readlane_b32, v_writelane_b32, v_mbcnt_lo_u32_b32, ds_bpermute_b32
(26 sites), s_bcnt1_i32_b32 sN, exec_lo, s_ff1_i32_b64 sN, exec.

Proposal

Compile these programs with dxc (cs_6_0+) and map:

  • quad_perm:[a,b,c,d] to QuadReadLaneAt, or to WaveReadLaneAt(x, (lane & ~3) | sel).
  • row_shr:n / row_shl:n / row_ror:n to WaveReadLaneAt within the 16-lane row, honouring bound_ctrl
    and row_mask/bank_mask (lanes outside keep the old value).
  • row_bcast:15/31 (wave64) to reads from the last lane of the previous row.
  • v_mbcnt_lo/hi to WavePrefixCountBits over the lane mask; s_bcnt1 exec to WaveActiveCountBits(true);
    v_readlane to WaveReadLaneAt; ds_bpermute_b32 to WaveReadLaneAt(data, addr >> 2).

The open question is wave width: the programs assume wave32 or wave64 (exec as exec_lo or a pair), while
desktop waves are 32 on some vendors and 64 on others. Either require WaveLaneCountMin to match, or check
it at run time and refuse otherwise.

Alternatives

Emulate DPP through groupshared memory with barriers. This is vendor-independent but slower, and it needs
uniform control flow.

Verification

A source-built gfx1013 fixture (LLVM 15 llvm-mc, as the existing compute_store_check.py and pixel_aot_check.py
fixtures) that uses the instructions, translated and dispatched on WARP, with the UAV read back and compared with
expected words. Include a negative control (an operand form or modifier the lowering refuses). Run the fixture on hardware with both wave widths where possible; report each width separately.

Checklist

  • I checked for an existing issue or pull request for this change.
  • I did not include game files, dumps, distribution links or credentials.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6583244084 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T13:48:00Z. --- ### Problem Measured on the 349 gfx1013 compute programs (device slot 67 pipelines) that the executable created in one run past start-up, and on the 627 dispatches of one busy frame after loading. After LDS and stores, the largest stop by dispatch count is DPP: 17 programs, 53 of the busy frame's dispatches (`v_add_nc_u32_dpp`, `v_or_b32_dpp`, `v_add_f32_dpp`, `v_min_f32_dpp` with `row_shr`, `row_bcast`, `quad_perm`). Related cross-lane stops: `v_readlane_b32`, `v_writelane_b32`, `v_mbcnt_lo_u32_b32`, `ds_bpermute_b32` (26 sites), `s_bcnt1_i32_b32 sN, exec_lo`, `s_ff1_i32_b64 sN, exec`. ### Proposal Compile these programs with dxc (cs_6_0+) and map: - `quad_perm:[a,b,c,d]` to `QuadReadLaneAt`, or to `WaveReadLaneAt(x, (lane & ~3) | sel)`. - `row_shr:n` / `row_shl:n` / `row_ror:n` to `WaveReadLaneAt` within the 16-lane row, honouring `bound_ctrl` and `row_mask`/`bank_mask` (lanes outside keep the old value). - `row_bcast:15/31` (wave64) to reads from the last lane of the previous row. - `v_mbcnt_lo/hi` to `WavePrefixCountBits` over the lane mask; `s_bcnt1 exec` to `WaveActiveCountBits(true)`; `v_readlane` to `WaveReadLaneAt`; `ds_bpermute_b32` to `WaveReadLaneAt(data, addr >> 2)`. The open question is wave width: the programs assume wave32 or wave64 (exec as `exec_lo` or a pair), while desktop waves are 32 on some vendors and 64 on others. Either require `WaveLaneCountMin` to match, or check it at run time and refuse otherwise. ### Alternatives Emulate DPP through groupshared memory with barriers. This is vendor-independent but slower, and it needs uniform control flow. ### Verification A source-built gfx1013 fixture (LLVM 15 `llvm-mc`, as the existing `compute_store_check.py` and `pixel_aot_check.py` fixtures) that uses the instructions, translated and dispatched on WARP, with the UAV read back and compared with expected words. Include a negative control (an operand form or modifier the lowering refuses). Run the fixture on hardware with both wave widths where possible; report each width separately. ### Checklist - [x] I checked for an existing issue or pull request for this change. - [x] I did not include game files, dumps, distribution links or credentials. AI-assisted (Claude Code).
JustinDCosta commented 2026-11-24 15:02:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JustinDCosta on 2026-11-24T14:26:13Z.


I plan to take a narrow first slice: lower v_or_b32_dpp with only quad_perm:[a,b,c,d] and full row/bank masks in compute_store_aot.py. I’ll use the lane-local wave read path, with a source-built gfx1013 fixture, a per-lane CPU reference, a negative control that keeps row_shr unsupported, and WARP plus RTX 3060 readbacks. I’ll leave other DPP operations and cross-lane instructions for separate slices.

Environment: Windows 11, MSVC 19.51, WARP and RTX 3060 Laptop GPU.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134371633 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7134371633). Originally posted by [JustinDCosta](https://github.com/JustinDCosta) on 2026-11-24T14:26:13Z. --- I plan to take a narrow first slice: lower `v_or_b32_dpp` with only `quad_perm:[a,b,c,d]` and full row/bank masks in `compute_store_aot.py`. I’ll use the lane-local wave read path, with a source-built gfx1013 fixture, a per-lane CPU reference, a negative control that keeps `row_shr` unsupported, and WARP plus RTX 3060 readbacks. I’ll leave other DPP operations and cross-lane instructions for separate slices. Environment: Windows 11, MSVC 19.51, WARP and RTX 3060 Laptop GPU.
R0Y00 commented 2026-11-24 15:02:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T14:38:31Z.


Please go ahead with v_or_b32_dpp and quad_perm under full row and bank masks. For the first slice, require uniform active participation and defined source lanes within each quad. A source-built test with unique words per lane and distinct words between quads can expose an accidental cross-quad read or identity permutation. Keep the row_shr refusal and report the generated HLSL WARP and hardware results separately from the gfx1013 LLVM round-trip.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134708069 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7134708069). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T14:38:31Z. --- Please go ahead with v_or_b32_dpp and quad_perm under full row and bank masks. For the first slice, require uniform active participation and defined source lanes within each quad. A source-built test with unique words per lane and distinct words between quads can expose an accidental cross-quad read or identity permutation. Keep the row_shr refusal and report the generated HLSL WARP and hardware results separately from the gfx1013 LLVM round-trip.
henriazz10 commented 2026-11-24 15:02:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-24T14:55:31Z.


I'd like to take the v_mbcnt_lo_u32_b32 / v_mbcnt_hi_u32_b32 part of this in tools/compute_store_aot.py, separate from the v_or_b32_dpp slice above.

Slice:

  • v_mbcnt_lo_u32_b32 vD, mask, base with a mask and base the translator already knows (inline constant, literal or known word) becomes countbits(mask & ((1u << lane) - 1u)) + base.
  • v_mbcnt_hi_u32_b32 vD, mask, base in a wave32 program: no lane is above 31, so the result is base.
  • The lane comes from the flat local thread index, ((z * Y + y) * X + x) & 31, not from desktop wave intrinsics, so the result does not depend on the desktop wave width. This assumes the program runs as wave32, as the existing ds_*_addtid path already does.
  • Still refused: wave64 programs, a mask computed per lane, and the other cross-lane forms (s_bcnt1_i32_b32 ... exec_lo, v_readlane, ds_bpermute), which I would leave for follow-ups.

Fixture: a source-built gfx1013 program that stores, one word per thread:

  • mbcnt_lo(-1, 0) (the lane-index idiom);
  • mbcnt_lo of a sparse literal mask plus a base;
  • the mbcnt_lo/mbcnt_hi pair.

It runs with group sizes 32 and 64 (two waves) and is compared against a CPU reference. Negative control: a reference that uses the flat index instead of index & 31 must fail at the first lane of the second wave. I'll report the WARP and RTX 5080 readbacks separately from the LLVM 15 round trip.

Environment: Windows 11, MSVC 14.29, RTX 5080 (driver 616.92) and WARP. LLVM 15 runs in Ubuntu 22.04 for the binary check.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7135171733 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7135171733). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-24T14:55:31Z. --- I'd like to take the `v_mbcnt_lo_u32_b32` / `v_mbcnt_hi_u32_b32` part of this in `tools/compute_store_aot.py`, separate from the `v_or_b32_dpp` slice above. **Slice:** - `v_mbcnt_lo_u32_b32 vD, mask, base` with a mask and base the translator already knows (inline constant, literal or known word) becomes `countbits(mask & ((1u << lane) - 1u)) + base`. - `v_mbcnt_hi_u32_b32 vD, mask, base` in a wave32 program: no lane is above 31, so the result is `base`. - The lane comes from the flat local thread index, `((z * Y + y) * X + x) & 31`, not from desktop wave intrinsics, so the result does not depend on the desktop wave width. This assumes the program runs as wave32, as the existing `ds_*_addtid` path already does. - **Still refused:** wave64 programs, a mask computed per lane, and the other cross-lane forms (`s_bcnt1_i32_b32 ... exec_lo`, `v_readlane`, `ds_bpermute`), which I would leave for follow-ups. **Fixture:** a source-built gfx1013 program that stores, one word per thread: - `mbcnt_lo(-1, 0)` (the lane-index idiom); - `mbcnt_lo` of a sparse literal mask plus a base; - the `mbcnt_lo`/`mbcnt_hi` pair. It runs with group sizes 32 and 64 (two waves) and is compared against a CPU reference. **Negative control:** a reference that uses the flat index instead of `index & 31` must fail at the first lane of the second wave. I'll report the WARP and RTX 5080 readbacks separately from the LLVM 15 round trip. **Environment:** Windows 11, MSVC 14.29, RTX 5080 (driver 616.92) and WARP. LLVM 15 runs in Ubuntu 22.04 for the binary check. AI-assisted (Claude Code).
roansystemlabs commented 2026-11-24 19:01:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-24T18:42:16Z.


I'd like to take the row-shift part of this as the next slice after #1613, separate from the v_mbcnt slice (#1782): v_or_b32_dpp and v_add_nc_u32_dpp with row_shr:1..15 in tools/compute_store_aot.py (gfx1013). It uses the same logical-lane model as #1613 (SV_GroupThreadID.x with group-shared staging), so the result does not depend on the desktop wave width.

  • Rows are 16 logical lanes. A lane whose source falls before its row start reads 0 when bound_ctrl is set and keeps its old destination when it is not, as the ISA describes.
  • Full row_mask/bank_mask only, 1D groups with a size divisible by 16, uniform active participation.
  • Still refused: row_shl, row_ror, row_share/row_xmask, fi:1, partial masks, lane-guarded execution, multidimensional groups and the other cross-lane forms.

Fixture: a source-built program with unique words per logical lane and per row, both bound_ctrl settings, shifts 1, 8 and 15, compared with a per-lane CPU reference. Negative controls: a mutant that reads across the row boundary, and one that writes 0 instead of keeping the old value without bound_ctrl, each with a predicted first mismatch. WARP and RTX 3070 readbacks reported separately from the LLVM 15 round trip.

Environment: Windows 11, MSVC 19.44, RTX 3070 and WARP, LLVM 15 for gfx1013.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7141031950 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7141031950). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-24T18:42:16Z. --- I'd like to take the row-shift part of this as the next slice after #1613, separate from the `v_mbcnt` slice (#1782): `v_or_b32_dpp` and `v_add_nc_u32_dpp` with `row_shr:1..15` in `tools/compute_store_aot.py` (gfx1013). It uses the same logical-lane model as #1613 (`SV_GroupThreadID.x` with group-shared staging), so the result does not depend on the desktop wave width. - Rows are 16 logical lanes. A lane whose source falls before its row start reads 0 when `bound_ctrl` is set and keeps its old destination when it is not, as the ISA describes. - Full `row_mask`/`bank_mask` only, 1D groups with a size divisible by 16, uniform active participation. - Still refused: `row_shl`, `row_ror`, `row_share`/`row_xmask`, `fi:1`, partial masks, lane-guarded execution, multidimensional groups and the other cross-lane forms. Fixture: a source-built program with unique words per logical lane and per row, both `bound_ctrl` settings, shifts 1, 8 and 15, compared with a per-lane CPU reference. Negative controls: a mutant that reads across the row boundary, and one that writes 0 instead of keeping the old value without `bound_ctrl`, each with a predicted first mismatch. WARP and RTX 3070 readbacks reported separately from the LLVM 15 round trip. Environment: Windows 11, MSVC 19.44, RTX 3070 and WARP, LLVM 15 for gfx1013. AI-assisted.
henriazz10 commented 2026-11-24 20:01:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-24T19:14:14Z.


I'd like to take s_bcnt1_i32_b32 sN, exec_lo from this issue in tools/compute_store_aot.py (gfx1013). It is separate from the quad_perm and row_shr DPP slices and builds on the v_mbcnt slice (#1782).

Slice:

  • Outside a guarded region exec is the whole wave, so the count is known statically:
    • for a group of at most 32 threads, it is the group's thread count;
    • for a larger group, it is 32, accepted only with the caller's existing wave_size=32 statement and a thread count that is a multiple of 32.
  • The result becomes a known scalar word.
  • Refused:
    • the instruction inside a guarded region;
    • exec_hi, exec and other sources;
    • larger groups without the statement or not a multiple of 32;
    • a later SCC read, unless the translator already models SCC.

Evidence planned:

  • a source-built gfx1013 fixture with a unique word per thread and a Python reference;
  • reference mutations: the count off by one, the group size used in place of 32, a changed sentinel;
  • draws on WARP and hardware;
  • the LLVM 15 round trip.

v_readlane, v_writelane, ds_bpermute and s_ff1_i32_b64 are not part of this.

AI-assisted (Gemini 4 Hydrogen in Antigravity CLI writes it; Claude Code reviews and verifies).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7141801643 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7141801643). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-24T19:14:14Z. --- I'd like to take `s_bcnt1_i32_b32 sN, exec_lo` from this issue in `tools/compute_store_aot.py` (gfx1013). It is separate from the `quad_perm` and `row_shr` DPP slices and builds on the `v_mbcnt` slice (#1782). **Slice:** - Outside a guarded region `exec` is the whole wave, so the count is known statically: - for a group of at most 32 threads, it is the group's thread count; - for a larger group, it is 32, accepted only with the caller's existing `wave_size=32` statement and a thread count that is a multiple of 32. - The result becomes a known scalar word. - Refused: - the instruction inside a guarded region; - `exec_hi`, `exec` and other sources; - larger groups without the statement or not a multiple of 32; - a later SCC read, unless the translator already models SCC. **Evidence planned:** - a source-built gfx1013 fixture with a unique word per thread and a Python reference; - reference mutations: the count off by one, the group size used in place of 32, a changed sentinel; - draws on WARP and hardware; - the LLVM 15 round trip. `v_readlane`, `v_writelane`, `ds_bpermute` and `s_ff1_i32_b64` are not part of this. AI-assisted (Gemini 4 Hydrogen in Antigravity CLI writes it; Claude Code reviews and verifies).
JustinDCosta commented 2026-11-24 20:01:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JustinDCosta on 2026-11-24T19:28:17Z.


I would like to take the unclaimed v_readlane_b32 slice, separate from the active row_shr and s_bcnt1 work.

Scope: on gfx1013, lower v_readlane_b32 sD, vS, lane only when lane resolves statically to 0..31, the instruction is unguarded, and the group is one-dimensional. For a group of at most 32 threads, require the selected lane to exist; for larger groups, require a multiple of 32 threads plus the caller's wave_size=32 statement. Stage VGPR values by SV_GroupIndex in groupshared memory and compute the SGPR result from the selected lane of each logical wave, avoiding desktop wave-lane mapping assumptions. Dynamic lane operands and v_writelane remain refused.

Fixture plan: source-built gfx1013 with unique source words per logical thread, group sizes 32 and 64, per-wave selected-lane CPU reference, identity/wrong-lane negative controls, LLVM 15 round-trip, and separate WARP / RTX 3060 results.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142142941 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7142142941). Originally posted by [JustinDCosta](https://github.com/JustinDCosta) on 2026-11-24T19:28:17Z. --- I would like to take the unclaimed `v_readlane_b32` slice, separate from the active `row_shr` and `s_bcnt1` work. Scope: on gfx1013, lower `v_readlane_b32 sD, vS, lane` only when `lane` resolves statically to 0..31, the instruction is unguarded, and the group is one-dimensional. For a group of at most 32 threads, require the selected lane to exist; for larger groups, require a multiple of 32 threads plus the caller's `wave_size=32` statement. Stage VGPR values by `SV_GroupIndex` in groupshared memory and compute the SGPR result from the selected lane of each logical wave, avoiding desktop wave-lane mapping assumptions. Dynamic lane operands and `v_writelane` remain refused. Fixture plan: source-built gfx1013 with unique source words per logical thread, group sizes 32 and 64, per-wave selected-lane CPU reference, identity/wrong-lane negative controls, LLVM 15 round-trip, and separate WARP / RTX 3060 results.
henriazz10 commented 2026-11-24 20:01:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by henriazz10 on 2026-11-24T19:56:37Z.


I'd like to take two more unclaimed parts of this issue in tools/compute_store_aot.py (gfx1013), as two separate PRs. They are separate from v_readlane_b32 (#1858), the DPP slices and s_bcnt1 (#1872).

  1. v_writelane_b32 vD, sS, lane
    • Lowering: vD = ((SV_GroupIndex & 31) == lane) ? sS : vD.
    • The lane is a statically known word, masked to 5 bits as in wave32.
    • The old vD must be a known vector value. exec is not read, matching the instruction.
    • Accepted only unguarded. A group of more than 32 threads needs the existing wave_size=32 statement.
  2. s_ff1_i32_b64 sD, exec and s_ff1_i32_b32 sD, exec_lo
    • Outside a guarded region, lane 0 is always active, so the result folds to the known word 0.
    • Refused inside a guarded region and for any other source.

Each PR will have a source-built fixture with a Python reference, reference and recompiled-HLSL mutations, draws on WARP and hardware, and the LLVM 15 round trip.

AI-assisted (Gemini 4 Hydrogen in Antigravity CLI writes them; Claude Code reviews and verifies).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142817082 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7142817082). Originally posted by [henriazz10](https://github.com/henriazz10) on 2026-11-24T19:56:37Z. --- I'd like to take two more unclaimed parts of this issue in `tools/compute_store_aot.py` (gfx1013), as two separate PRs. They are separate from `v_readlane_b32` (#1858), the DPP slices and `s_bcnt1` (#1872). 1. **`v_writelane_b32 vD, sS, lane`** - Lowering: `vD = ((SV_GroupIndex & 31) == lane) ? sS : vD`. - The lane is a statically known word, masked to 5 bits as in wave32. - The old `vD` must be a known vector value. `exec` is not read, matching the instruction. - Accepted only unguarded. A group of more than 32 threads needs the existing `wave_size=32` statement. 2. **`s_ff1_i32_b64 sD, exec` and `s_ff1_i32_b32 sD, exec_lo`** - Outside a guarded region, lane 0 is always active, so the result folds to the known word 0. - Refused inside a guarded region and for any other source. Each PR will have a source-built fixture with a Python reference, reference and recompiled-HLSL mutations, draws on WARP and hardware, and the LLVM 15 round trip. AI-assisted (Gemini 4 Hydrogen in Antigravity CLI writes them; Claude Code reviews and verifies).
roansystemlabs commented 2026-11-24 21:01:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-24T20:18:25Z.


I'd like to take v_permlane16_b32 and v_permlanex16_b32 in tools/compute_store_aot.py (gfx1013) as the next slice on the logical-lane model of #1613 and #1884. It builds on #1884 and I'll rebase it once that is decided.

  • Each logical lane stages its source word in group-shared memory; lane i of a 16-lane row reads the lane selected by its nibble of src1 (lanes 0-7) or src2 (lanes 8-15) in the same row, or in the paired row for the x16 form.
  • First slice: src1/src2 must be known words, unguarded execution, 1D groups (multiple of 16 for permlane16, of 32 for permlanex16; larger than 32 only with the existing wave_size=32 statement).
  • Still refused: op_sel (fetch-inactive and bound_ctrl), lane selects computed per lane, guarded regions, multidimensional groups.

Fixture: a source-built program with unique words per logical lane and per row, identity, reversal and fixed pseudo-random selects, compared with a per-lane CPU reference. Negative controls: a mutant that reads the same row for the x16 form, one that swaps the src1/src2 halves, and one that applies the identity, each with a predicted first mismatch. WARP and RTX 3070 readbacks reported separately from the LLVM 15 round trip.

These two are not in the measured stop list above, only in the NGG census of #1723. If none of your compute programs reaches them, say so and I'll leave them refused rather than add an unused lowering.

Environment: Windows 11, MSVC 19.44, RTX 3070 and WARP, LLVM 15 for gfx1013.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143339764 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7143339764). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-24T20:18:25Z. --- I'd like to take `v_permlane16_b32` and `v_permlanex16_b32` in `tools/compute_store_aot.py` (gfx1013) as the next slice on the logical-lane model of #1613 and #1884. It builds on #1884 and I'll rebase it once that is decided. - Each logical lane stages its source word in group-shared memory; lane i of a 16-lane row reads the lane selected by its nibble of src1 (lanes 0-7) or src2 (lanes 8-15) in the same row, or in the paired row for the x16 form. - First slice: src1/src2 must be known words, unguarded execution, 1D groups (multiple of 16 for permlane16, of 32 for permlanex16; larger than 32 only with the existing `wave_size=32` statement). - Still refused: `op_sel` (fetch-inactive and bound_ctrl), lane selects computed per lane, guarded regions, multidimensional groups. Fixture: a source-built program with unique words per logical lane and per row, identity, reversal and fixed pseudo-random selects, compared with a per-lane CPU reference. Negative controls: a mutant that reads the same row for the x16 form, one that swaps the src1/src2 halves, and one that applies the identity, each with a predicted first mismatch. WARP and RTX 3070 readbacks reported separately from the LLVM 15 round trip. These two are not in the measured stop list above, only in the NGG census of #1723. If none of your compute programs reaches them, say so and I'll leave them refused rather than add an unused lowering. Environment: Windows 11, MSVC 19.44, RTX 3070 and WARP, LLVM 15 for gfx1013. AI-assisted.
roansystemlabs commented 2026-11-25 05:04:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-25T05:00:16Z.


A note on the row_bcast entry in the measured DPP list above, before anyone takes it for gfx1013 compute.

LLVM 15.0.7 does not accept row_bcast:15 or row_bcast:31 for gfx1013 or gfx1030 (not a valid operand; gfx900 accepts both), and its disassembler prints DPP_CTRL 0x142 and 0x143 on gfx1013 as /* row_bcast is not supported starting from GFX10 */. The DPP_CTRL table in the RDNA2 ISA guide (section 13.3.9, Table 91) has no row_bcast entry, and tools/disasm_rdna2.py reports 0x142/0x143 as an invalid GFX10 DPP16 control.

The census may have picked up that disassembler comment, in which case those programs really carry DPP_CTRL 0x142/0x143, or the name may have come from somewhere else. If they do carry those bytes, I'd suggest keeping them refused by name, with the raw DPP_CTRL value in the message, rather than lowering them as the GFX9 broadcast, since there is no RDNA2 definition to test against. If you can share which DPP_CTRL values the 17 DPP programs use (counts only), I can take whichever row control is actually there next, with the same logical-lane model and evidence as #1884.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7153359032 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7153359032). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-25T05:00:16Z. --- A note on the `row_bcast` entry in the measured DPP list above, before anyone takes it for gfx1013 compute. LLVM 15.0.7 does not accept `row_bcast:15` or `row_bcast:31` for gfx1013 or gfx1030 (`not a valid operand`; gfx900 accepts both), and its disassembler prints DPP_CTRL 0x142 and 0x143 on gfx1013 as `/* row_bcast is not supported starting from GFX10 */`. The DPP_CTRL table in the RDNA2 ISA guide (section 13.3.9, Table 91) has no row_bcast entry, and `tools/disasm_rdna2.py` reports 0x142/0x143 as an invalid GFX10 DPP16 control. The census may have picked up that disassembler comment, in which case those programs really carry DPP_CTRL 0x142/0x143, or the name may have come from somewhere else. If they do carry those bytes, I'd suggest keeping them refused by name, with the raw DPP_CTRL value in the message, rather than lowering them as the GFX9 broadcast, since there is no RDNA2 definition to test against. If you can share which DPP_CTRL values the 17 DPP programs use (counts only), I can take whichever row control is actually there next, with the same logical-lane model and evidence as #1884. AI-assisted.
R0Y00 commented 2026-11-25 20:04:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T19:49:10Z.


The claimed compute row_shr slice landed in #1884 (e864213a). The final Release cases passed on WARP and RTX 4060 Laptop for shifts 1, 8 and 15, including the upper-row guard and wrong-zero controls. This unblocks the already claimed v_permlane16_b32 / v_permlanex16_b32 branch to rebase on main. Keep unsupported row/width/mask forms and other cross-lane groups in their existing scope.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172804645 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1543#issuecomment-7172804645). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T19:49:10Z. --- The claimed compute `row_shr` slice landed in #1884 (`e864213a`). The final Release cases passed on WARP and RTX 4060 Laptop for shifts 1, 8 and 15, including the upper-row guard and wrong-zero controls. This unblocks the already claimed `v_permlane16_b32` / `v_permlanex16_b32` branch to rebase on `main`. Keep unsupported row/width/mask forms and other cross-lane groups in their existing scope.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#1536
No description provided.