Repository navigation
Conversation
PowerVR DXT (Imagination Technologies, vendorID 0x1010) shader compiler crashes on the subgroup_no_shmem SPIR-V variant when NUM_COLS >= 2. This affects all quantized matmul pipelines during vkCreateComputePipelines. Root cause: SHADER_REDUCTION_MODE_SUBGROUP generates subgroup-only reduction code without shared memory. The PowerVR compiler cannot handle this variant with multiple columns. HYBRID mode (subgroup + shared memory fallback) and SHMEM mode both work correctly. Fix: Override SUBGROUP -> HYBRID reduction mode for Imagination GPUs. Tested on PowerVR Immortalis G925 (Pixel 10 Pro XL, Vulkan 1.3.288). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
|
Were there any validation errors with the original code? |
Contributor
|
@Konoxx Please respond if you want to proceed with this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VK_VENDOR_ID_IMAGINATION(0x1010) vendor ID constantSHADER_REDUCTION_MODE_SUBGROUPtoSHADER_REDUCTION_MODE_HYBRIDfor Imagination Technologies GPUsVK_ERROR_UNKNOWN(-13) crash duringvkCreateComputePipelineson all quantized matmul shadersRoot Cause
PowerVR's shader compiler crashes on the
subgroup_no_shmemSPIR-V variant when the specialization constantNUM_COLS >= 2. WithNUM_COLS=1it works fine. The other two reduction modes (SHMEMandHYBRID) work correctly with allNUM_COLSvalues.Isolated through 8 targeted test binaries that systematically narrowed the failure from "all pipelines crash" to "this specific shader variant with this specific specialization constant value."
Fix
Two changes:
VK_VENDOR_ID_IMAGINATION 0x1010alongside existing vendor IDsreduc/reduc16, overrideSUBGROUP→HYBRIDfor Imagination GPUsThe HYBRID mode uses subgroup operations with a shared memory fallback, which the PowerVR compiler handles correctly. Performance impact is minimal — HYBRID is only slightly slower than pure SUBGROUP on other vendors.
Testing
Tested on PowerVR Immortalis G925 (Google Pixel 10 Pro XL, Tensor G5):
Note: GPU compute output has a separate correctness issue (garbled text) on this device that appears to be a deeper driver precision bug unrelated to this shader compilation fix. CPU inference works correctly.
Test plan
🤖 Generated with Claude Code