Skip to content

compute: share one raw UAV for reads and writes to the same slot - #3213

Merged
R0Y00 merged 1 commit into
mainfrom
codex/compute-share-raw-uav
Nov 27, 2026
Merged

R0Y00 merged 1 commit into
mainfrom
codex/compute-share-raw-uav

Conversation

@R0Y00

@R0Y00 R0Y00 commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Refs #3209.

When a reachable raw store and a raw load use the same proven fixed descriptor-table slot, use the same raw UAV handle for both. A second SRV for that slot gives the runtime conflicting states for one resource. The C++ solver still verifies the descriptor words.

The source-built control reads, transforms, and writes the same buffer within one dispatch. It checks all 320 dwords, including an untouched tail, and verifies that the dispatch binds one UAV and zero SRVs. Local verification on 8509b4951 (MSVC Release /O2, Windows 11 build 26200, RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP). Hardware passed ctest --preset release --no-tests=error -R '^startup_compute_dispatch_native_(warp|hardware)$', including the shared UAV readback. WARP reported a wave32 capability skip.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent verification of exact head 8509b495 on main d474a393. The alias is based on a reachable raw store and the proven fixed descriptor table/offset; the emitter still validates the descriptor words and reuses the same writable handle. Built startup_stream_consumer d3d12_xs_shim compile_dxil native_store_replay in Debug and Release /O2. Ran ctest --test-dir <build> --no-tests=error -j1 -V -R '^(startup_compute_dispatch_native_(warp|hardware)|native_global_load_hardware|native_smem_vcc_hardware)$'. Each configuration had three passes and one WARP wave32 capability skip. The RTX 4060 Laptop readback matched all 320 dwords including the untouched tail, with one UAV, zero SRVs, and no D3D12 debug error. Windows 11 26200.9974, driver 32.0.16.1656, WARP 10.0.26100.9818. The current main trial at 6cc46a3c has identical PR source/fixture contents. Hosted Windows passed.

@R0Y00
R0Y00 merged commit ae07824 into main Nov 27, 2026
5 checks passed
@xiaoqi72665

Copy link
Copy Markdown
Contributor

Adjacent regression note from the #3209 work, on an independently built, unmodified upstream main at 2e12dd8 (Debug, Windows, app-local Agility 1.620.2, WARP 1.0.22.0 / RX 7900 XT driver 32.0.32029.2010):

  • startup_compute_dispatch_native_warp reports a native translation and one translated Dispatch(3,2,2), but word 0 is c5c5c5c5 rather than ea74e376, and 288 words differ. This is not the wave32 capability skip observed with your WARP build; it may be specific to this app-local WARP version. No conclusion about the cause yet.
  • startup_compute_dispatch_native_hardware gets past the first native readback, then fails the cache-file assertion because revision.txt is present (startup: warn when the shader cache and the translator come from different revisions #2820). A local diagnostic copy allowing only that additional metadata filename passes the full check, including the shared guest UAV/untouched tail, in both Debug and Release on RX 7900 XT.

Reproduced the same two original failures on the #3209 candidate in both configurations. The candidate has no production changes. Keeping the original tests unchanged in #3209; this is separate evidence, not a request to reopen the merged shared-UAV change.

Repro: ctest --preset dev --no-tests=error -j1 -V -R "^startup_compute_dispatch_native_(warp|hardware)$"

AI-assisted.

R0Y00 pushed a commit that referenced this pull request Nov 27, 2026
Trace the GPU writer and consumer of a 12-byte dispatch record with fenced argument, compute output and pixel readbacks. Keep guards and a stale-SRV negative control.

Fixes #3209. Refs #3211, #3213, and #3074.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants