Skip to content

tracking: console compute programs (device slot 67) translate and dispatch at run time, checklist of claimable items #2274

Backlog

Description

@NiiRoZz

Problem

On main: the compute stage in tools/startup/gfx2hlsl.py (#2182), publishing of translation requests for slot 67 compute pipelines (#2195) and translation of those requests (#2223). Texture UAV forms in the pixel stage translate (#2155) but the runtime binds none. Dispatch (#1974) and compute root state (#1803, #1975) are still open PRs. #1412 describes the whole path and stays the umbrella; #2022 lists translator gaps as lettered items and is not repeated here. This issue only splits the remaining work into items that can be claimed one at a time.

Local observation, not reproducible from this repository (one local run, counts only): 2,689 compute requests were published. 8 translate and compile on main. 90 do with the unmerged lowerings listed below (95 with one more buffer_load_format follow-up). In a window of the run, 874 distinct programs were dispatched (2,019,430 dispatches). The 23 of those that translate with the unmerged lowerings cover 2.24% of dispatches, and every one of the 23 writes a texture through a UAV, so none can be bound by the runtime yet. Shares below are the incremental gain of each step of a greedy cover over the dispatched programs, from that same run; they rank items and are not a prediction.

Proposal

A. Translator lowerings (gfx2hlsl compute stage)

Acceptance for every A item: source-built gfx1013 case + GPU read-back (WARP and hardware) + a pinned negative control that fails when the lowering is off. Refuse what the change does not cover.

Already open elsewhere and seen in the same ranking, so not duplicated: v_fma_mix_f32 #2055, v_readlane_b32 #2032, DPP forms #2038, s_bfm_b64 #2007, v_add_co_ci_u32 #2033.

B. Runtime (startup stubs)

Acceptance: a source-built fixture on WARP, hardware where it matters, a pinned negative control, and the exact ctest selection in the PR body.

Alternatives

One large compute pull request. Rejected: a wrong lowering hides every dispatch that depends on it, so each piece needs its own read-back and negative control.

Verification

Each item carries its own acceptance. Overall state is read from the compute counts in docs/experiments.md once items land. A passing fixture supports the behavior under test only; it does not show that any title starts or runs.

Claiming

Comment with the item text before starting, open one pull request per item, and tick the box when it merges. Percentages and counts come from a local run and may shift as lowerings land.
Last updated 2026-11-25 from claims in the comments and merged pull requests.

AI-assisted (Claude Code).

Activity

  1. RavenCurseBurg commented on Nov 25, 2026

    @RavenCurseBurg
    Contributor

    I'll take A, image_gather4_lz in the startup compute translator (tools/startup/gfx2hlsl.py). The existing pixel handler already checks a constant clamp-to-edge sampler and a one-hot component. I'll exercise that profile from a source-built gfx1013 compute program with a raw output buffer, then compare all four returned texels on WARP and a GeForce RTX 4060. I'll use a nonzero first view mip and distinct values per channel and tap so an absolute-mip or gather-order mistake yields a specific readback mismatch. This uses the standalone compute fixture and can be tested before the runtime texture-binding work in B lands.

  2. NiiRoZz commented on Nov 25, 2026

    @NiiRoZz
    ContributorAuthor

    Claiming three A items, one pull request each:

    Not touching buffer_store_format_d16_x (overlaps the d16 work on #2022 B), image_gather4_lz (claimed above) or the items owned by open pull requests.

    AI-assisted (Claude Code).

  3. RavenCurseBurg commented on Nov 25, 2026

    @RavenCurseBurg
    Contributor

    I'll take the uniform-mask part of A's v_mbcnt item in the startup compute translator. #1782 established a reference in compute_store_aot.py; this slice is for tools/startup/gfx2hlsl.py. I'll start with groups of at most 32 threads and a literal or proven constant SGPR mask, so all active lanes are in the low half for either guest wave size. I'll use sparse masks, a nonzero base, a multidimensional group, and WARP/RTX 4060 readbacks to distinguish the per-lane count from a plain lane ID, whole-mask popcount or a lost base. Larger groups and masks whose value cannot be proven stay outside this slice. The separate missing-descriptor diagnostic remains available.

  4. R0Y00 commented on Nov 25, 2026

    @R0Y00
    Owner

    The A item for image_gather4_lz landed in #2282. On WARP and RTX 4060 Laptop, all five 320-word comparisons matched, and the omitted gather, wrong channel, wrong mip and swapped taps produced the expected mismatches. The alias and descriptor-boundary rejection checks also passed. Reproduce with ctest --preset release --no-tests=error -R '^startup_compute_gather_lz(_warp|_hardware)?$' -V. This covers translation and standalone readback. Slot 67 still needs the B-path binding and submission evidence; the other A claims above can continue independently.

  5. RavenCurseBurg commented on Nov 25, 2026

    @RavenCurseBurg
    Contributor

    I'll take A's compute image_store d16 translation for the full RGBA mask, 2D, full-width XY and a fixed table descriptor. The startup translator currently refuses this even though the separate offline tool in #2106 already provides a source-built half-float reference. I'll use that reference and the existing three-mip RGBA16_FLOAT readback on WARP and RTX 4060, with controls for a missing store, half order, and EXEC.

    The emitted compute texture UAV will identify its float element type, dimension, table location and four channels as described under B. I'll check raw buffer/texture slot numbering and descriptor alias refusals in the translator. The slot-67 runtime binding work remains with the B owner.

  6. stan495 commented on Nov 25, 2026

    @stan495
    Contributor

    I'd like to take Per-reason refusal census from Part B (count every refusal reason per key, not only the last; acceptance: two controls show both reasons with counts).

    Checking main right now, the slot-67 runtime compute dispatch path is still on the local branch tracked in the first Part B items. Should I build this first as a standalone, lock-protected header and unit test in src/startup_stubs/ (similar to memory_srv_census.h, keeping bounded per-key/per-reason counts plus two controls showing both refusal reasons with counts for one key) ready to wire into the compute dispatch/binding path once it lands, or wait until the first Part B compute dispatch slice opens?

  7. NiiRoZz commented on Nov 25, 2026

    @NiiRoZz
    ContributorAuthor

    Update on my three claims above.

    • SDWA v_mov: merged as startup: lower v_mov_b32_sdwa in gfx2hlsl #2286.
    • Buffer store through a modified descriptor: narrowing this claim. Local observation, counts only, not reproducible from this repository: among the compute requests of one local run, the only modified form that reaches this refusal is the structured-to-raw conversion (stride clear, OOB_SELECT=3, NUM_RECORDS multiplied by the stride), mostly after the entry block. I have a proven rule for a simpler case (the store's four registers are unmodified words of one load, inside the entry block, with read-back on WARP and hardware and mutant controls), but it makes no additional request translate, so I am not opening a pull request for it. The composite form builds on the stride-clear store work that is in progress elsewhere; I will take it after that lands, and anyone who wants it sooner is welcome to it.
    • buffer_load_format_xyzw: unchanged, waits on startup: lower buffer_load_format_x/xy/xyz with the format from the buffer descriptor #2138.

    While reading the store handler I found three cases where main may accept a store it should refuse. I am reproducing each with a source-built program and will file them as a separate issue with one claimable item per case.

    AI-assisted (Claude Code).

  8. R0Y00 commented on Nov 25, 2026

    @R0Y00
    Owner

    Two A items are now on main: #2290 covers constant-mask MBCNT for groups of at most 32 threads, and #2300 covers full-RGBA packed D16 image_store with a fixed 2D table descriptor. I ran the source-built WARP and RTX 4060 Laptop cases and their negative controls. For Part B, #2300 publishes the v2 typed-UAV row uav N tex2d float table P O channels 4. The runtime acceptance is still to bind a compatible view, forward a dispatch, and read back the addressed mip while an incompatible view is refused before submission.

  9. stan495 commented on Nov 25, 2026

    @stan495
    Contributor

    I'd like to take v_readfirstlane proof from Part A (loop counter and one-path register are refused as unproven).

    Plan:

    • Preserve uniform SGPR proofs across branch/loop joins in tools/startup/gfx2hlsl.py when either (1) no non-dominating or back-reaching path writes the SGPR (one-path register), or (2) every write to a uniform loop-counter SGPR across the loop is itself proven uniform and controlled only by uniform branches (loop counter), while continuing to refuse any SGPR written non-uniformly or conditionally under a non-uniform branch (e.g. s_mov_b32 s3, vcc_lo on a loop back-edge or vccz/execz/non-uniform scc loops).
    • Extend tests/startup_gfx2hlsl_readfirstlane_recompute_check.py and add a source-built gfx1013 compute fixture + WARP and hardware UAV readback + negative controls.
  10. NiiRoZz commented on Nov 25, 2026

    @NiiRoZz
    ContributorAuthor

    I'd like to take TG_SIZE_EN from Part A. The v_readfirstlane proof is stan495's, so I leave that one.

    Plan, in the order the checklist asks:

    • show s_and_b32 R, TG, 0xfc0 correct on its own with a source-built gfx1013 compute program and a negative control;
    • show the v_mbcnt_lo read correct on its own, building on shader: lower masked bit counts in small startup compute groups #2290 rather than repeating it;
    • only then accept TG_SIZE_EN for the forms both proofs cover; every other form stays refused with a named reason.

    If either prerequisite cannot be shown from source-built programs I will say so here and release the claim instead of opening a PR.

    AI-assisted (Claude Code).

  11. RavenCurseBurg commented on Nov 25, 2026

    @RavenCurseBurg
    Contributor

    I'll take a first startup-compute LDS slice in Part A: aligned ds_write_b32 and ds_read_b32 across an explicit workgroup s_barrier. I'll start with straight-line, full-EXEC programs, bounded addresses, and the LDS allocation from the compute register state. The source-built fixture will exchange data between lanes and keep consecutive groups' data separate. I'll check the output against a CPU reference on WARP and desktop hardware, with an incorrect-address control. #1566 covers the separate compute_store_aot entry point.

  12. 23 remaining items

  13. R0Y00 commented on Nov 25, 2026

    @R0Y00
    Owner

    The buffer_store_format_xyzw slice landed in #2530 (e4e2b46d) after #2478. On the exact PR head I ran ctest --preset release --no-tests=error -R '^startup_compute_store_format_xyzw' -V: 21 passed, zero skips, on WARP and RTX 4060 Laptop. The source-built fixture checks full output words and detects dropped stores, wrong component order, bounds/offset errors, packing mistakes and writes under the wrong EXEC mask. Its direct dispatch uses the sized UAV runner. The slot 67 binding path, the #2492 indirect fixture and live replay evidence remain separate.

  14. roansystemlabs commented on Nov 25, 2026

    @roansystemlabs
    Contributor

    I'd like to take the Part B item "A translated draw samples a compute-written texture". @NiiRoZz, it would stack on your #2470/#2490 chain, and @denn0x, #2603 carries compute runtime and draw-UAV code: if either of you already covers this or would rather keep it, say so and I'll step back and review.

    Scope, first slice:

    • One translated Dispatch writes a 2D texture (mip 0) through the uav ... tex2d binding from startup: translated compute Dispatch with 2D texture views, static samplers and a per-key census #2490; one translated draw on the same list samples it through an SRV after the UAV-to-SRV transition; the render target is read back.
    • Refused by name before submission: a view whose mip, dimension or format does not match the texture the Dispatch wrote, and a draw whose sampled resource has no published compute writer in that list.
    • Second mips, array slices and cross-list fences stay out of this slice.

    Evidence: WARP and an RTX 3070 with the debug layer on, stacked on #2490 with the base commit stated, ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_compute_' -V plus the new test's exact name, adapter and skip status. Negative controls: the draw recorded before the Dispatch reads the sentinel, a wrong-mip view is refused, and an untranslated Dispatch leaves the target clear.

    AI-assisted.

  15. brainbudt commented on Nov 26, 2026

    @brainbudt
    Contributor

    Note

    🤖 GPT-6.2 Astra responding on behalf of brainbudt

    I’m taking the Part A startup LDS follow-up for two disjoint ds_write_b32 fills before one unconditional workgroup barrier in tools/startup/gfx2hlsl.py. Each lane in a 1D group writes one dword to each span using the same local-X byte address and distinct immediate offsets. The source-built gfx1013 fixture will read both spans after the barrier and check refusals for overlap, an uninitialized gap and allocation overflow. I’ll run the Linux LLVM checks and attempt WARP readback on disposable Windows. The tracker gives no dispatch count for this particular shape.

  16. R0Y00 commented on Nov 26, 2026

    @R0Y00
    Owner

    The two-bank LDS follow-up is on main in #2751 (6f696d4). The source-built readback exercised one workgroup barrier and kept the two disjoint initialized spans separate. On WARP and RTX 4060 Laptop the complete compute suite passed, and zeroing the second fill changed 128 of 320 words on each adapter. The tracker’s broader LDS work remains open. This fixture does not measure original-executable dispatch frequency.

  17. R0Y00 commented on Nov 26, 2026

    @R0Y00
    Owner

    The focused input-range diagnostic is on main via #2624. The real translated dispatch matched all 320 output words on WARP and RTX 4060 Laptop. Five distinct invalid inputs each produced its expected reason and left output untouched. This covers identifying the refusal and leaves the custom-heap token path in #2625.

  18. R0Y00 commented on Nov 26, 2026

    @R0Y00
    Owner

    #2625 is on main at cd1ff54. A source-built translated compute dispatch bound the slot-70 custom-heap view token through the backing resource at the view offset. WARP and RTX 4060 Laptop each matched 320/320 output DWORDs after the input was written through the guest address. The five existing rejected inputs still left output untouched. This closes the fixture-sized token slice. Draw coverage and the original-executable replay remain open.

  19. added
    priority: P0
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: P0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions