Skip to content

KV-FP8 W1's read-side comments anchor scaled_vec_conversion<float, uint8_t> at quant_utils.cuh:302-308, which at the pin is the identity primary template plus the fp8->HALF specialization; the real one is :419-429 #1636

Description

@localai-bot

Row: KV-FP8

Three KV-FP8 W1 read-side comments cite scaled_vec_conversion<float, uint8_t> at csrc/quantization/w8a8/fp8/nvidia/quant_utils.cuh:302-308. At parity pin 5559679229bc961848b121ccdeaa8fa5d79bec98 that range holds no such thing. Lines 301-305 are the GENERIC primary template (template <typename Tout, typename Tin> ... { return x; }) and 307-314 are the // fp8 -> half <uint16_t, uint8_t> specialization, so 302-308 straddles a template that returns its input unchanged and a conversion into the WRONG output type. The <float, uint8_t> specialization the three comments describe — __nv_cvt_fp8_to_halfraw then half_to_float(tmp) * scale — is at :419-429, under the // fp8 -> float label at :418.

Sites, all landed by W1:

  • include/vt/fp8_kv.h:92 — above LoadKvFp8E4M3
  • include/vt/ops.h:1129 — beside PagedAttentionArgs::k_scale/v_scale
  • src/vt/cpu/cpu_paged_attn.cpp:164 — the CPU read dequant

W2 (PR #1606, issue #1593) carried four copies of the same wrong anchor into src/vt/cuda/cuda_paged_attn.cu, tests/vt/test_cuda_fp8_kv_cache.cpp and .agents/specs/fp8-kv-cache.md. Those four are CORRECTED in that pull request. The three above are outside its authority, so they are filed rather than fixed in flow.

Same file, second anchor, same change: Fp8KVCacheDataType is cited at csrc/attention/dtype_fp8.cuh:9-13, which is the #include <cuda_fp8.h> guard. The enum is at :15-19. Sites: include/vt/fp8_kv.h:5 and :30.

Third item, a different kind. .agents/engine-matrix.md (KV-FP8 row) and .agents/quantization-matrix.md (QUANT-KV-FP8 row) both say the W2 CUDA translation units are UNCOMPILED. CI job cuda-fat-build built them for 80;86;87;89;90a;100a;103a;110;120a;121a under -Werror=all-warnings and passed on 4d71e776efc18cb5e61a26e642ddad8de5339134 (run 32495320287, job 96812232428). What remains true is that nothing has been EXECUTED on a device, because that job configures -DVLLM_CPP_BUILD_TESTS=OFF. Both clauses need the narrower statement.

Why this matters beyond tidiness: an upstream anchor is how the next reader checks a port against the oracle. One that lands on a return x; primary template invites the conclusion that the port is unfaithful, or worse, that the identity template IS the reference. .agents/specs/fp8-kv-cache.md ## Owed names this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions