vulkan : fix unclosed brace in turbo type guard (backend never compiled) - #73
Open
skulze wants to merge 1 commit into
Open
Conversation
The turbo-type guard in ggml_backend_vk_device_supports_op opened a block
that was never closed: the inner head_dim/f32 check closed itself, but the
outer if did not, so the following type switch and every subsequent
function definition were parsed as nested inside it. Result: the Vulkan
backend failed to build at all ("a function-definition is not allowed
here"), which silently forced HIP-only deployments.
Close the guard so it validates the turbo constraint and falls through to
the type switch as intended. Verified: build-vk-tq compiles clean and
serves Qwen3.6-35B-A3B with -ctk/-ctv turbo3, draft-mtp and 256K context
on RDNA4 (RADV).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
feature/turboquant-kv-cache is a legacy branch latest is please check if this issue persist there. I suppose not, because i checked that Vulkan should work there |
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.
Problem
The Vulkan backend on
feature/turboquant-kv-cachedoes not compile. The turbo-type guard added toggml_backend_vk_device_supports_op(around line 17603 ofggml-vulkan.cpp) opens a block that is never closed:Every subsequent function definition in the file is parsed as nested, so a
-DGGML_VULKAN=ONbuild fails with a wall of:Fix
Close the guard so it validates the turbo constraint (head_dim divisible by 128, f32 source) and falls through to the existing type switch — which already handles
GGML_TYPE_TURBO{2,3,4}_0— as clearly intended.Verified
Built with
-DGGML_VULKAN=ON -DGGML_NATIVE=ON -DCMAKE_BUILD_TYPE=Release(0 errors) and servedQwen3.6-35B-A3B-UD-Q4_K_XL-MTPon an AMD Radeon AI PRO R9700 (RDNA4/gfx1201, RADV, Mesa 25.2.8) with-ctk turbo3 -ctv turbo3 --spec-type draft-mtp -c 262144. Turbo KV, MTP speculation and 256K context all work; measured 139 t/s decode with-ub 2048.🤖 Generated with Claude Code