cuda : fix Turbo4 VEC decode without dot2 - #318
Open
mgeldi wants to merge 1 commit into
Open
Conversation
Author
|
CI triage after the initial run:
The Windows x64 static and Vulkan CPU jobs were cancelled by matrix fail-fast. |
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
Fixes #207.
The manual Turbo4 VEC value decoder used on CUDA builds without
V_DOT2_F32_F16_AVAILABLEexpands four rows per thread, while the scheduler selected eight rows. That row-ownership mismatch corrupts the Turbo4 V cache.This change:
Additional information
Related: #229 and #253 explored the same regression with broader scheduling changes. This version is deliberately narrower: it leaves the dot2/HIP Turbo4 path unchanged and directly tests the manual decoder at both supported head sizes.
Tested on an NVIDIA GeForce RTX 5090 with CUDA 13.3, SM120a, and a Release build with all quantized flash-attention kernels enabled:
test-turbo-quant: passed.test-quantize-fns: passed; the generic suite's rotated-domain Turbo2/3/4 skips are expected.test-backend-ops test -j 1: 21,661/21,661 CUDA0 cases passed against the CPU reference; both new cases executed.FLASH_ATTN_EXTsweep: 10,927/10,927 passed.CUDA path healthy.llama-bench, five repeats: pp512 5,018.35 +/- 199.67 tok/s; tg128 68.15 +/- 0.47 tok/s.Runtime coverage is limited to this NVIDIA/CUDA configuration. The HIP dot2 path is preserved by the compile-time branch but was not runtime-tested here; MUSA and older NVIDIA architectures were not available.
Requirements