Fix Windows MSVC build: hoist CB*_I8_RECIP out of __ARM_NEON guard#17
Merged
Fix Windows MSVC build: hoist CB*_I8_RECIP out of __ARM_NEON guard#17
Conversation
Round 11 introduced three int8 codebook reciprocal constants (CB3_I8_RECIP, CB_I8_RECIP, CB5_I8_RECIP) inside #ifdef __ARM_NEON blocks, but the per_block_scale computation that uses them lives *outside* the guard and runs on every platform. NEON builds happened to compile; MSVC x64 errored with C2065 undeclared identifier on tq_turbo_kv.c lines 365, 585, 1324. These are plain `static const float`s, not NEON-typed — hoist them out of the guards so all platforms see the declarations. No behavior change. Fixes 8 consecutive Windows CI failures since Round 10. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Fixes the 8 consecutive Windows CI failures since Round 10 (commit
24136353619). All recent CI runs onmainare red onwindows-latest (x64)with:Root cause
Round 10/11 added three int8 codebook reciprocal constants inside
#ifdef __ARM_NEONblocks:NEON builds happened to compile because the guard contains the declaration in the same translation unit. MSVC x64 (no
__ARM_NEON) sees the use without the declaration and errors out.Fix
Hoist all three
static const float CB*_I8_RECIPdeclarations one line above their#ifdef __ARM_NEONopenings. They're plain floats, not NEON-typed. Six insertions, three deletions, no behavior change.Test plan
cmake --build build) — passes🤖 Generated with Claude Code