Skip to content

vulkan: disable integer dot product on AMD proprietary driver without… - #193

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:fix/amd-proprietary-int-dot
Aug 7, 2026
Merged

vulkan: disable integer dot product on AMD proprietary driver without…#193
0xShug0 merged 1 commit into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:fix/amd-proprietary-int-dot

Conversation

@IIIIIllllIIIIIlllll

Copy link
Copy Markdown
Contributor

Fix: #192
On AMD GPUs without native dot4 hardware (GCN/RDNA1/RDNA2, e.g. RX 6800), the AMD proprietary Windows driver advertises integerDotProduct4x8BitPackedSignedAccelerated=true, so ggml-vulkan routes q8_0 matmuls through the integer-dot path (dotPacked4x8EXT). That path silently produces wrong results there — with the default q8_0 Irodori-TTS package the output WAV is saturated to a constant +32767 with no error or abnormal metric. RADV reports accelerated=false on the same hardware, and RDNA3+ has native dot4. Same signature reported in ollama#13108 (RX 6650 XT).

Fix

  • Force integer_dot_product=false for the affected combination (AMD vendor + eAmdProprietary + GCN/RDNA1/RDNA2), mirroring the existing old_amd_windows quirk condition. Equivalent to the known workaround GGML_VK_DISABLE_INTEGER_DOT_PRODUCT=1, applied automatically; also covers MUL_MAT_ID and flash-attention MMQ paths. The device-info path is adjusted too so the int dot log line stays truthful. RDNA3+, RADV, NVIDIA, Intel are unaffected.

Verification

  • Reporter confirmed on the affected RX 6800: device now reports int dot: 0, q8_0/Vulkan output is bit-identical to the env-var workaround (25,462 distinct samples, RMS 0.1291), f16 unchanged, no measurable perf cost, test-backend-ops still 13,641/13,641.
  • ggml-vulkan target compiles cleanly (MSVC 19.44, Vulkan SDK 1.4.350).

AI usage: Kimi K3 helped me find the issue and performed a fix.

… native dot4

The AMD proprietary Windows driver advertises
integerDotProduct4x8BitPackedSignedAccelerated on GPUs without native
dot4 hardware (GCN/RDNA1/RDNA2), but the emulated integer dot product
path silently produces incorrect quantized matmul results (e.g. q8_0
TTS output saturated to full scale). RADV reports accelerated=false on
the same hardware, and RDNA3+ has native dot4 support, so restrict the
workaround to the affected combination. Equivalent to setting
GGML_VK_DISABLE_INTEGER_DOT_PRODUCT=1 on these devices.

Refs: 0xShug0#192
@0xShug0
0xShug0 merged commit 9c81bde into 0xShug0:main Aug 7, 2026
6 checks passed
@0xShug0

0xShug0 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Thank you @IIIIIllllIIIIIlllll! Great work! I'm really glad to have your help on the project.

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.

Vulkan: q8_0 Irodori-TTS output saturates to +32767 on AMD RX 6800; disabling integer dot avoids it

2 participants