native compute: run wave32 direct modules on WARP (proposal, stage 1 claimed) #3160
Open
opened 2026-11-27 19:12:18 +00:00 by Not-Saii
·
7 comments
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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#3160
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?
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-27T19:12:18Z.
Part of #2935 (item "WARP") and #3074 (stage 4, "Verify wave32/wave64 ... behavior").
Problem. Natively translated compute modules never run on WARP, so CI never runs one.
src/dxil_module.h, thei32 11, i32 32entry property;[WaveSize(32)]in the HLSL path ofsrc/gfx1013_compute_native.cpp).WaveLaneCountMin/Max4/4, docs/experiments.md, subgroup compaction notes)._warpexecution tests skip with 77, and the in-process route refuses the adapter ("the adapter has no 32-lane waves",src/startup_stubs/d3d12_compute_dispatch.inl).native_graphics_wqm_warp). The gap is compute only.What is already known.
WaveSize(32)should therefore be accepted there. This is not yet measured for these modules.WaveReadLaneAtas the inverse permutation at forced widths above 8. The direct path lowersv_readlane, DPP16 andv_permlane*throughwaveReadLaneAt(src/gfx1013_direct_compute.inl), so those fixtures may mismatch on WARP for a reason that is not the translator's.offscreen_check(and the archive GPU check) loads the Agility runtime.native_store_replayand the stand-in tests do not.Proposal.
Stage 1, measurement (I'm taking this). Let the native compute test executables opt into the existing
OFFSCREEN_AGILITY_620_DIR+OFFSCREEN_WARP_DIRsetup, with the same exports and DLL copies asoffscreen_checkand no change when the options are unset. Then run the native compute_warptests on WARP 1.0.22 and record, per test, whether it runs, passes, mismatches or still skips. Any mismatch is checked against the #145 pattern before it is called a translator defect. Deliverable: the opt-in wiring, adocs/experiments/native-compute-warp.mdtable, and a known-result note for #145-shaped mismatches. No translator change.Stage 2, CI (decision needed, not claimed). CI uses in-box WARP. The options are:
_warpas a skip and rely on_hardware.(a) is the smallest if stage 1 passes. (b) is translator work: a 4-lane host wave splits each guest wave32, so
EXEC/ballot values,s_bcnt1,v_readlane, DPP, scalar values written under a skippeds_cbranch_execz, and the guest-wave index for groups over 32 threads all change meaning. I'd like a maintainer's view before anyone starts stage 2.Test for stage 1.
cteston the native compute_warpentries with both options set, plus the same entries without the options. Those must still skip with 77, so nothing changes by default. Negative control: one native compute fixture with a deliberately wrong expected word fails on WARP 1.0.22, which shows the run is real and not a skip.Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100. WARP 1.0.22 and Agility SDK 1.620.2 app-local, from the Microsoft NuGet packages (not committed).
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T19:27:55Z.
Independent setup finding on Windows 11
26300.10075and Visual Studio 2026 18.12.1. With the official 1.620.2sdk.nupkgpresent inOFFSCREEN_AGILITY_620_DIR, buildingoffscreen_checkstops at the existingstatic_assertinsrc/startup_stubs/d3d12_compute_dispatch.inl: it requires both texture view descriptors to have size 40. The same assertion is onmain88cddb09. A trivial x64 probe printingsizeof(D3D12_SHADER_RESOURCE_VIEW_DESC)andsizeof(D3D12_UNORDERED_ACCESS_VIEW_DESC)measured40/40with SDK 10.0.26100 headers and40/48with the 1.620.2 headers. I am retesting the existingoffscreen_checkdirect atomics/gather fixtures through the DLL-only Agility configuration to isolate runtime behavior. This does not change your test-runner wiring.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T19:31:03Z.
Independent readback at
ed946ef8(#3162) using Agility DLLs only with SDK 10.0.26100 headers. Windows 1126300.10075, DXC1.9.2602.17, WARP1.0.22.0, debug layer enabled. In-box WARP10.0.26100.10068exposed4..4and skipped all four checks below. App-local WARP exposed4..128.shader_wave32_warpffffffffwere correct.wave_shuffle_warp0/64correct and64/64block-misrouted, rotation48/64correct. Native width 8 passed.native_image_atomic_warpCheckFeatureSupport1) in the DLL-only configuration. A separate replay matched all 336 words in each of the seven fixtures and rejected all three mutations that clear GLC.native_gather_lod_cs_warpword=0 expected=3f102100 actual=c5c5c5c5). A direct constant-only store reproduced the failure with 1 or 4 threads, and passed with 32.The gather failure can be separated from #145 and from the gather lowering. This independent DXC
cs_6_6control stores the entry mask without usingWaveReadLaneAtor any texture reads:I compiled this with
dxc -T cs_6_6 -E mainand usednative_gather_lod_check.render_computewith expected words[1, 0, 32, 0x12345678]followed by 316 sentinels. On WARP, group sizes 1 and 4 returned a zero ballot, where1and0xfwere expected. Group size 32 matched. RTX 4070 with the same Agility runtime matched all three sizes. A plain constant store without the ballot also passed on WARP at sizes 1, 4 and 32.Reproduction of the stock checks:
ctest --test-dir out/build/warp-1022 --no-tests=error -j 1 -R '^(shader_wave32_warp|wave_shuffle_warp|native_gather_lod_cs_warp|native_image_atomic_warp)$' -V. This uses the existing offscreen runner. Treat partial-wave ballots and per-lane shuffles as separate WARP failure classes when interpreting the upcoming runner results.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T19:32:03Z.
I’ll take the pre-existing Agility header build failure as a separate runtime fix. The scope is the temporary descriptor storage used when rebinding published Compute texture views. I’ll verify both SDK header configurations and leave the native WARP runner wiring and stage-2 options to your work.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-27T19:38:27Z.
Stage 1 measurement. It changes the plan above, so this note adds no wiring. The details are in
docs/experiments/native-compute-warp.md(#3166).The app-local WARP gives 32-lane waves here, not Agility. On Windows 11 build 26300 the in-box
D3D12Core.dllis 10.0.26100.9818 (SDK version 616). Loaded by that runtime, with noD3D12SDKVersionexport, WARP 1.0.22 reportsWaveOps=1, lanes 4 to 128 and SM 6.8. A configure withOFFSCREEN_WARP_DIRalready copiesd3d10warp.dllbeside every test EXE.native_comparison_pso_warpnative_heap_handle_probe_warpnative_global_srv_heap_replay_warpmismatch word 5).startup_compute_dispatch_native_warp0xc5c5c5c5fill (288 words)native_startup_request_cache_warpcompute dispatch output mismatch(translated branch)shader_wave32_warpbvh_wave64_warpf03aeb40decodes to source lane 19 (expected 3; the value in #145 decodes to 27, the inverse)With the DLL removed, the same binaries of the heap-probe and heap-replay tests report
(4..4)lanes and skip with 77. Without the options, the five native tests behave as before.The two stand-in failures are not #145-shaped: no word is written at all.
startup_compute_dispatch_warp(HLSL module, same stand-in and WARP) passes. On the RTX 4090,startup_compute_dispatch_native_hardwareandnative_startup_request_cache_hardwarepass in the same build. So the failure is WARP-only. Its cause, a WARP 1.0.22 defect or a construct in the native module that hardware tolerates, is not established.Agility on this machine.
D3D12SDKVersion = 620,".\\D3D12\\", theoffscreen_checkpattern) fails with0x887E0003. The loader saysUnable to load D3D12Core.dll. Verify D3D12SDKPath is correct.ID3D12SDKConfiguration1::CreateDeviceFactory(620, <absolute path>)loads the same DLL.main: the 40-byte view-descriptionstatic_assertfrom #2532 fails, because the UAV description is 48 bytes in the 1.620 headers. Filed as #3165.Coverage gap. The
v_readlane, DPP andv_permlane*fixtures run onnative_store_replay, which uses the default adapter and has only_hardwareentries. Whether #145 affects native compute is still unmeasured.For stage 2, option (a) becomes "fetch the WARP package", with Agility only if a runner's in-box runtime needs it. Before CI can rely on it:
OFFSCREEN_WARP_DIRrequiresOFFSCREEN_AGILITY_620_DIR(added for the Windows 10 DXR results in #147), which now forces a configuration that does not build.Environment: Windows 11 build 26300, MSVC 14.44.35207, Windows SDK 10.0.26100, Debug, commit
88cddb09. RTX 4090 (driver 32.0.16.1088) for the two stand-in_hardwareruns only.d3d10warp.dll1.0.22.0.20261027.1 andD3D12Core.dll1.620.2.0.20261106.5 are Microsoft-signed. Debug layer enabled inoffscreen_check; the native fixtures do not enable it.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by xiaoqi72665 on 2026-11-27T20:30:35Z.
Independent Windows 10 / RX 7900 XT result: partial-wave ballots explain the 288 missing stores
Follow-up to #3166 and @RonLogic's partial-wave control above. Tested the retained local test-only candidate
2485076(basee0d8375on cpp-migration); its earlier equivalent candidatebd7a32fsupplied the original 57-pass / 1-fail native run. No production lowering changes.Environment: Windows 10 22H2 build 19045, AMD RX 7900 XT (1002:744c), driver 32.0.32029.2010, Windows SDK 10.0.26100 DXC, Debug build, signed app-local Agility 1.620.2 and WARP 1.0.22.0. D3D12 debug layer unavailable (0x887a002d).
Windows 10 difference from #3166: copied the original options-unset offscreen_check.exe and only WARP's d3d10warp.dll into an isolated directory (no Agility exports/D3D12 directory).
offscreen_check.exe warp --shader-wave32reported driver 1.0.22.0, range 4..128, shader model 0x65, then skipped with 77. With app-local Agility 620 DLLs, the earlier wave32 preflight actually passed on both adapters at SM 6.6. For #3165, keeping sdk.nupkg outside the OFFSCREEN_AGILITY_620_DIR and pointing it at a DLL-only directory preserves the desktop 40-byte view structures and builds without modifying the assertion. This is a local workaround, not the descriptor ABI fix already claimed.New sweep: independent DXC cs_6_6 source, not the native compiler; same source-built slot67 runtime fixture and descriptor manifest, only the published CSO and group-shape field substituted in a copied cache. Dispatch(3,2,2), write group zero only, complete 320-DWORD readback with untouched sentinel guards.
Compile with
dxc -T cs_6_6 -E main -Fo probe.cso probe.hlsl. Replace group dimensions in the source and manifest consistently. Every written record on each adapter was inspected:All 16 runs reported width 32 and lane indices 0..N-1; every guard was intact. This independently confirms the zero low ballot for the tested partial-wave sizes and an additional active-count discrepancy at 24 and 31. Full 32-thread control passes. It does not establish the behavior of every possible group shape or WARP version.
Connection to #3166's missing writes: on the original 2x3x4 cache fixture, native DXIL on WARP left 288 expected writes at 0xc5c5c5c5, hardware matched all 320 words. Python lowering of the same request on WARP matched all 320; native and Python binding manifests were identical. Independent DXC arithmetic/store shaders using either SV_GroupIndex or WaveGetLaneIndex matched on WARP without the ballot gate, but with
(WaveActiveBallot(true).x & (1u << WaveGetLaneIndex())) != 0all 288 writes were absent. The native DXIL initializes EXEC with the same low ballot and gates stores on it. This explains the observed missing stores without changing the compiler or relaxing the assertion. No WaveReadLaneAt operation is required, so keep this distinct from #145.The local test-only environment candidate is retained, not submitted as a competing wiring PR while #3160 and #3165 are owned. Stage 2 CI remains a separate maintainer decision.
Buhe (@xiaoqi72665). AI-assisted; source-built fixtures executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T23:22:14Z.
The full-header setup fix is ready for review in #3223 (fixes #3165). With Agility 1.620.2 headers and signed DLLs, the four translated texture dispatch cases passed on both backends, including the 3D and swapped-mip controls. On app-local WARP 1.0.22,
shader_wave32_warpand the stocknative_image_atomic_warpnow pass with the debug layer enabled. The earlier warning-989-only failure came from the DLL-only build. All seven atomic readbacks matched and all three GLC mutations were detected.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T06:02:30Z.
I ran a source HLSL readback matrix on Windows 11 build 26300.10075, DXC 1.9.2602.17, Agility 1.620.2, and app-local WARP 1.0.22. The same SM 6.6 DXIL ran on RTX 4070 (32.0.16.2124) and WARP. Each invocation recorded its lane index and wave width. The CPU reconstructed the full and sparse masks from those indices, then checked every invocation's ballot, OR, count, and workgroup atomic result.
Nx1x1for N=1..32, plus2x2x2,3x2x2, and4x4x2.WaveActiveBallotreturned zero for both predicates on all 33 shapes with fewer than 32 threads. Both full-width shapes matched.WaveActiveBitOrandWaveActiveCountBitsworked at 1–8, 16, 24, and 32 threads in the linear matrix, but lost the tail at other sizes. At 9 threads, the full mask/count wereff/8instead of1ff/9; the sparse mask was6dinstead of16d. A repeated 9-thread WARP readback was byte-identical and had zero debug errors or warnings. Replacing ballot with either reduction would leave a gap.groupshared InterlockedOrmatched both masks on every shape on both backends. In the 32-thread tiled case both adapters returned sparse mask799ee779, which also shows why a sparse reference based on flat thread index alone would misreport that case.The 9-thread reproducer is below. Compile with
dxc -T cs_6_6 -Fo probe.dxil probe.hlsl; then runoffscreen_check <hardware|warp> --raw-uav-dump probe.dxil 1 432 probe.bin. Read 12 little-endian uint32s per thread. The 32-thread control uses the same source withnumthreads(32,1,1)and 1536 bytes.This confirms a converged, single-workgroup control. The group-shared result depends on every thread reaching both barriers, so it does not establish a replacement for general divergent wave operations.