Fix validation errors in native matrix shaders #73
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!73
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/cooperative-memory-model"
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?
What this fixes
Native cooperative-matrix shaders declare
CooperativeMatrixKHRwith GLSL450, failing SPIR-V validation. Device-scope barriers also require the corresponding Vulkan memory-model capability.Why merge
RX_VK_ROBUST=0opt-out.Change
gpu/vk/eden/shader_recompiler/backend/spirv/emit_spirv.cpp: native capabilities/model.gpu/vk/vk_coopmat.cpp: self-test memory model.gpu/vk/vk_main.cpp: required feature gating.gpu/vk/sirit/include/sirit/sirit.h: declare addressing-preserving setter.gpu/vk/sirit/src/sirit.cpp: implement setter.nx2/test_coop_spirv.py: seven native/software/ordinary and physical-addressing cases.Tested
In a compiler developer shell with builder CPM cache in
RX_CPMand SPIR-V Tools on PATH:Fails on the old code, passes now. All seven cases and CPU syntax checks pass. Local RX 9070 XT lacks the required native matrix configuration.
Contributor RTX 2070 test, driver 621.01: builds and runs with native matrices enabled; unrelated device loss remains at frame 1071, as without this change.
Please check
NVIDIA execution is contributor-reported, not locally reproduced. This does not claim to fix #132 or improve performance.
Tested this on an RTX 2070 (Turing, driver 621.01), merged onto
c02f290: it built and ran, with "native matrix multiplies on", but the GPU was still lost in a compute dispatch (frame 1071), as without it. So on Turing it does not fix that hang, though it may still be right for the spec. (On1c7c9c7with driver 621.14 the native path has since run stably without it; details in #132.)Thanks for testing on Turing! That confirms the native path builds and runs with the Vulkan memory model enabled. Agreed, this isn't a fix for the #132 hang; it only makes the cooperative-matrix shaders valid SPIR-V, since the spec requires
VulkanMemoryModelalongsideCooperativeMatrixKHR. Glad1c7c9c7+ 621.14 resolved the hang separately.