cpp-migration: lower DPP16 row_shl, row_shr and row_ror in the direct C++ compute path #3008
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3008
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Leyukaka on GitHub · 2026-11-27 04:40 UTC · original
Target branch
cpp-migration. Part of #2935 (instruction coverage). I am taking this; please say if you already have it locally and I will drop it.Gap. Direct compute lowers DPP16
quad_permand the two mirrors. The parser refuses every other DPP16 pattern above 255 with "unsupported DPP lane selection" (src/gfx1013_compute_native.cpp). That includes the row shifts and rotates. Onmain,tools/compute_store_aot.pylowersrow_shrforv_or_b32_dppandv_add_nc_u32_dpp(#1884). The direct path has no equivalent.Measured on a local capture of 2,689 compute requests (counts and instruction shape only), with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requestsoncpp-migratione0d83759plus #3006. The four later commits oncpp-migrationdo not touch DPP. 80 requests stop first at "unsupported DPP lane selection", in two forms:row_ror:80x128v_min_f32,v_add_f32,v_mov_b32row_shr:10x111v_add_nc_u32Both use
row_mask:0xf bank_mask:0xf. The requests of one start-up run contain the same 80.Plan:
row_shl:1..15,row_shr:1..15androw_ror:1..15(0x101..0x10f,0x111..0x11f,0x121..0x12f) in the existinglower_dpp, still with full row and bank masks only.row_shl:Nreads row laner + N;row_shr:Nreadsr - N;row_ror:Nreads(r - N) mod 16.lower_dppalready applies to a disabled source lane, and the onecompute_store_aot.pyuses forrow_shr.lower_dppapplies the disabled-source rule only when FI is clear, so the out-of-row test needs its own path; the 18row_shr:1requests set FI.row_share,row_xmask, the pre-GFX10 controls (wave_*androw_bcast,0x130..0x13c,0x142,0x143) and partial masks stay refused.Tests: a hardware readback against a CPU reference.
row_shr:1(FI, no BOUND_CTRL) onv_add_nc_u32, androw_ror:8(BOUND_CTRL) onv_add_f32andv_min_f32.row_shl,row_shrandrow_rorwith shifts 1 and 15 onv_mov_b32.row_share:0(0x150), raw control0x142, a partial row mask, and a 24-thread group stay refused.v_mov_b32cases (row_ror:8is its own inverse);Measurement: the census and the run's requests, before and after, counting requests that newly compile and their next refusal.
AI-assisted.