cuda : fix Turbo4 VEC decode without dot2 - #318
Conversation
|
CI triage after the initial run:
The Windows x64 static and Vulkan CPU jobs were cancelled by matrix fail-fast. |
|
Thanks, @mgeldi. This was an easy one to miss in the CI noise, but the patch is focused and well supported. The schedule now matches the manual Turbo4 decoder contract only on builds without dot2, the HIP/dot2 path stays unchanged, and the deterministic D=128/D=256 cases directly cover the regression. The full CUDA backend sweep, sanitizers, and hosted CUDA/HIP/MUSA run are enough here. The red checks are confirmed baseline failures, including the slot restore issue now fixed through #324. Merging this. |
9a38e18
into
TheTom:feature/turboquant-kv-cache
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