Skip to content

Fix Windows I2_S linker errors - #606

Open
Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-595
Open

Fix Windows I2_S linker errors#606
Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-595

Conversation

@ousamabenyounes

@ousamabenyounes Ben Younes (ousamabenyounes) commented Aug 10, 2026

Copy link
Copy Markdown

Closes #595.

Root cause

ggml.c references quantize_i2_s and dequantize_row_i2_s from the ggml-base target, but their definitions lived in ggml-cpu. Windows links ggml-base independently and therefore reported both symbols as unresolved.

Fix

Update the llama.cpp submodule to isHuangXin/llama.cpp#5, which moves the unchanged platform-neutral implementations into ggml-quants.c (ggml-base) and adds a focused executable that links only ggml-base.

Test verification (RED → GREEN)

  • RED, reverted implementation: test-i2-s-linkage fails to link with undefined references to quantize_i2_s and dequantize_row_i2_s.
  • GREEN, patched implementation: target builds and the direct executable exits 0.
  • ctest --test-dir build/3rdparty/llama.cpp -R "^test-i2-s-linkage$" --output-on-failure: 1/1 passed.
  • Full BitNet build: passed.
  • Independent code and test reviews: approved.

Dependency: isHuangXin/llama.cpp#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Linker error "undefined symbol: quantize_i2_s" when building with -q i2_s or -q tl2 on Windows 11

1 participant