vulkan: fix output corruption on GCN 2.0/3.0 (Vulkan 1.2)#21787
Open
rafikb wants to merge 1 commit intoggml-org:masterfrom
Open
vulkan: fix output corruption on GCN 2.0/3.0 (Vulkan 1.2)#21787rafikb wants to merge 1 commit intoggml-org:masterfrom
rafikb wants to merge 1 commit intoggml-org:masterfrom
Conversation
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.
Overview
This PR resolves output corruption (token repetition/double-wording) on legacy AMD GCN 2.0 and 3.0 hardware (e.g., R9 390, Fury X).
The issue was introduced in b8394 due to the implementation of modern Vulkan synchronization primitives that are not fully supported by the final legacy Adrenalin drivers (Vulkan 1.2.170). By restoring backward-compatible memory barrier logic in ggml-vulkan.cpp, we restore coherent generation for these cards without regressing performance on modern Vulkan 1.3+ hardware.
Additional information
Hardware Tested: Radeon R9 390 (8GB VRAM) on Windows 10.
Performance: Verified 22.0 t/s using gemma-4-E4B-it-Q4_K_M.gguf with 100% GPU offload.
Context: Many legacy 8GB cards are still highly capable for inference in 2026, but are limited by driver-level Vulkan support. This fix ensures continued accessibility for users on vintage or budget-restricted hardware.
Requirements