Repository navigation
Conversation
…e manifest (R0Y00#2974) The stand-in's manifest reader and Dispatch path took only 2D and 2D array output textures, so a compute program storing to a 3D or 1D image could not run on cpp-migration. The runtime half of R0Y00#2902 (open on main) is taken here unchanged: `uav N tex3d|tex1d float table P OFF channels C` lines, TEXTURE3D/TEXTURE1D UAV views from the title's view record, and the mip and W range checks, also for slot 19. For the offline route, format_compute_runtime_manifest now writes those lines for 3D and 1D texture UAVs, so compile_dxil publishes a manifest the runtime accepts. AI-assisted.
|
The view checks are scoped clearly. Please distinguish unsupported native wave-size capability from unexpected PSO failure, so a passing WARP job tells us whether the new cases actually ran. A portable shader fixture could cover the binding path independently. Ready for more review |
…1D UAV fixture After a published compute translation fails PSO creation, the stand-in checks the adapter's wave capabilities (the same OPTIONS1 test the native route uses) and logs "pipeline creation failed: the adapter has no 32-lane waves" when they rule out a WaveSize(32) module. The texture check skips the native 3D/1D dispatch cases on WARP only for that reason; any other PSO failure fails it. Portable 3D and 1D cases compile a cs_6_0 store with dxc and a hand-written manifest, so the binding path is checked on WARP and hardware independently of the C++ compiler. AI-assisted.
|
Thanks. Both done in the new commit. Wave size versus PSO failure.
Portable fixture. The 3D and 1D cases now also run with a Results on an RTX 5080 and on WARP (Windows 11, DXC from the Windows SDK 10.0.26100):
A manual mutant that never names the wave reason makes the WARP check fail. AI-assisted. |
|
The two portable shader and manifest checks passed locally. The new portable fixture covers the binding path independently of native wave size. One diagnostic issue remains. A published shader with no wave-size requirement can still get a missing-32-lane-waves label if its PSO fails on that adapter, and a failed capability query gets the same label. Please keep the generic PSO failure as the primary reason and report the observed capability separately, or limit the specific reason to shaders known to require that wave size. Ready for more review |
…ility beside it A failed published compute PSO stays "pipeline creation failed". The stand-in adds the adapter's 32-lane wave capability as observed: "(adapter has no 32-lane waves)" or "(adapter wave capability query failed)". The manifest records no wave size, so the runtime does not claim the shader needed one. Only the texture check, whose native modules declare WaveSize(32), skips its native cases on WARP for the no-waves observation. AI-assisted.
|
Thanks, done in the new commit. I took the first option; the wave-size-specific reading now lives only in the test, which knows its modules declare
On the RTX 5080 and on WARP, the results are the same as in my last comment. With a mutant that drops the observation, the WARP check fails on the bare AI-assisted. |
|
The diagnostic finding is resolved. Five scripted checks passed, including the separate capability-query failure note. The Release dispatch checks passed on both adapters, and both portable UAV cases passed on the GTX 1060. The WARP texture failure reproduced on clean main, and the native GTX 1060 pipeline failure reproduced on the prior PR head. The isolated WARP run stalled, so it adds no coverage. Ready to merge from our side |
R0Y00
left a comment
There was a problem hiding this comment.
Reviewed e18549cafe7f9412b896fd43cf261fdc6750498a. The published PSO failure remains the primary diagnostic; the independent adapter-capability result no longer claims a wave requirement on the shader. I rebuilt startup_stream_consumer d3d12_xs_shim compile_dxil with the Release preset and ran ctest --preset release --no-tests=error --output-on-failure -R '^startup_compute_dispatch_texture_(warp|hardware)$' on Windows 11 build 26200.9974. Both CTest entries passed. WARP (10.0.26100.9818) and RTX 4060 Laptop (32.0.16.1656) each matched 6,144 portable volume words and 128 portable line words; the incompatible views left sentinels intact. RTX also matched 6,144 words each for native volume and volume NSA and 128 for native line. WARP capability-skipped those three native subcases. The texture-input check reports the D3D12 debug layer enabled with no errors on both adapters. The merge trial with cpp-migration at e0d83759 was clean, and #2993 contains this head as an ancestor.
KelboLive
left a comment
There was a problem hiding this comment.
PR #2975 adds 3D and 1D texture UAV support to the C++ compute manifest. Good incremental work.
What works
- Minimal diff: the direct_compute_cache.cpp switch expands the old two-case if/else to a full switch on image_dimension with default: nullopt.
- Runtime dispatch: volume_uav_range_error() extracts 3D W-range validation into a reusable inline function.
- ComputeTranslation struct replaces bool array with D3D12_UAV_DIMENSION uav_dimension, giving a typed discriminator.
- Test fixture gains texture-volume, texture-line, texture-volume-bad-w, texture-line-bad-mip modes.
- CMakeLists.txt conditionally passes compile_dxil and DXC SDK paths to the texture test when the tools exist.
Issues
- std::min type deduction: (std::min)(view.MipSlice, 15u) mixes UINT and unsigned int. Consider static_cast(15u) for portability.
- adapter_32_lane_waves() caching: ensure the static local returns a cached value rather than re-querying on every Dispatch.
- Stale manifest compatibility: uav_dimension defaults to UNKNOWN (zero-initialized). The dispatch path must check this field rather than array for 3D/1D dispatches.
- Test 3D resource: MipLevels=2, view on mip 1 where depth=3. FirstWSlice=1, WSize=~0u covers slices 1 and 2. The bad-w case uses WSize=6 which correctly triggers refusal (6 > 3-1=2).
Recommendations
- Add comment near uav_dimension noting it replaces array.
- Ensure adapter_32_lane_waves() caches its result.
- Consider a one-time runtime log when tex3d/tex1d manifests are accepted.
Overall: clean, correct change. The dimension switch is easier to maintain than the previous binary condition.
KelboLive
left a comment
There was a problem hiding this comment.
PR #2975 adds 3D and 1D texture UAV support to the C++ compute manifest.
What works
- Minimal diff: direct_compute_cache.cpp switch replaces binary if/else with a full dimension switch, default: nullopt keeps unmapped dims refused.
- runtime: volume_uav_range_error() extracts 3D W-range validation into a reusable inline function.
- struct ComputeTranslation: replaces bool array with D3D12_UAV_DIMENSION uav_dimension, typed discriminator.
- test fixture gains texture-volume, texture-line, texture-volume-bad-w, texture-line-bad-mip modes.
- CMakeLists.txt conditionally passes compile_dxil and DXC SDK paths to texture test when tools exist.
Issues
- std::min type deduction: (std::min)(view.MipSlice, 15u) mixes UINT and unsigned int. Consider static_cast(15u) for portability.
- adapter_32_lane_waves() caching: ensure the static local returns cached value rather than re-querying each Dispatch.
- Stale manifest compatibility: uav_dimension defaults to UNKNOWN (zero-init). The dispatch path must check this field, not array, for tex3d/tex1d dispatches.
- Test resource: MipLevels=2, view on mip 1 where depth=3. FirstWSlice=1, WSize=~0u covers slices 1-2 (correct). bad-w uses WSize=6, 6 > 2 triggers refusal (correct).
Recommendations
- Add comment near uav_dimension noting it replaces array.
- Ensure adapter_32_lane_waves() caches its result.
- One-time runtime log when tex3d/tex1d manifests are accepted.
Overall: clean, correct change. The dimension switch is easier to maintain.
|
Thanks. Answers to the three points:
AI-assisted. |
|
Title-run results for Setup: Windows 11 26300.9974, RX 9070 XT (driver 32.0.32029.2010), release. Each run lasts 300 s with the same scripted inputs. The shader cache is the same local rev-28 cache, copied fresh for each run.
Start-up progress is measured as file opens by the title over time. The
What the stand-in does in the stalled runs: three pipelines now load as translated. They are the per-frame compute pipeline you described on #2974 ( I have not found the cause. It could be:
Why I'm holding it: without this PR, AI-assisted; the runs above were done locally, counts only. |
|
Thanks for the runs. I compared the two paths in the stand-in at The refusal path.
One difference: manifest polling.
If your count includes those paths, this could account for the missing ~1 open per second between 120 and 240 s, at most. It does not explain the missing step of about 730 opens after 240 s, nor the 3 keys dispatched at the end of AI-assisted. |
|
I opened draft #3049 on |
|
Retargeted to main. My local integration on e04217f preserves #2902, compute root SRVs and the Python-published 1D/3D fixtures while adding separate compile_dxil publication coverage. I also saw #3049, which integrates both original PRs and preserves Leyukaka's commits. I am checking it as the combined integration candidate. The original-program startup observation with injected manifests is still open. For a comparable run on current main, please report title file opens separately from shader-cache paths, and record translated/refused dispatch counts for the three keys. |
Part 1 of #2974 (steps 1 and 2). Part of #2935. Target branch
main. Step 3, binding these views on the in-process native route, will be a separate pull request.Change:
src/startup_stubs/d3d12_compute_dispatch.inl,src/startup_stubs/d3d12_xs_device.cpp,tests/startup_stream_consumer.cpp): the runtime half of startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902, which is open onmain, taken unchanged, so a later merge ofmainshould merge cleanly there.uav N tex3d|tex1d float table P OFF channels C.TEXTURE3D/TEXTURE1Dfrom the title's view record.texture-volume,texture-line,texture-volume-bad-wandtexture-line-bad-mipmodes.cpp-migration, say so and I will drop these hunks.src/direct_compute_cache.cpp):format_compute_runtime_manifestwritestex3dandtex1dfor atexture_uav/half4_texture_uavwith image dimension 2 or 0, next to the existingtex2d/tex2da. Other dimensions and kinds stay refused, socompile_dxil --requestspublishes a manifest the runtime accepts for 3D and 1D stores.tests/startup_compute_dispatch_texture_check.py,CMakeLists.txt): the 3D, 3D NSA and 1D store cases from startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 now run throughcompile_dxilinstead ofgfx2hlsl.py, since the Python half of startup: lower compute image_store to 1D and 3D texture UAVs (Part of #2022) #2902 is not on this branch. CMake passescompile_dxiland the DXC directory to the existing WARP and hardware entries when they exist.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, on
cpp-migration2b678fd3plus this commit.startup_compute_dispatch_texture_hardwarepassed.no translation.compile_dxilthen writes<key>.txtwithuav 0 tex3dortex1d float table 1 64 channels 4, and<key>.cs.cso.startup_compute_dispatch_texture_warppassed. WARP refused the PSO, so for the 3D/1D cases only the manifest was checked there.Mutation checks, run by hand; each fails the hardware test:
tex2din the formatter fails the manifest assertion;texture-volume-bad-wcontrol.Measured on a local capture (counts and instruction shape only) with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests.2b678fd3to 177; the number compiled is unchanged at 388.srv 0/1 buf,srv 2 tex2d,uav 0 tex3d float ... channels 4).cpp-migrationb260984f, that pipeline was dispatched 17,408 times and never translated. In a later run with this change andcompile_dxil, it was translated and dispatched about 17,400 times. (An earlier version of this line also linked the title staying on its first screen to this pipeline; that was not shown, see cpp-migration: bind table buffers, 2D texture SRVs and 3D/1D texture UAVs for natively translated compute #2974.)AI-assisted.