Skip to content

fix: Windows MSVC build errors in turboquant-kv-cache branch#37

Closed
YunagiHisa wants to merge 1 commit into
TheTom:feature/turboquant-kv-cachefrom
YunagiHisa:fix/windows-msvc-build
Closed

fix: Windows MSVC build errors in turboquant-kv-cache branch#37
YunagiHisa wants to merge 1 commit into
TheTom:feature/turboquant-kv-cachefrom
YunagiHisa:fix/windows-msvc-build

Conversation

@YunagiHisa

Copy link
Copy Markdown

Overview

Fix Windows MSVC build errors in the feature/turboquant-kv-cache branch.
This branch does not build on Windows due to several MSVC-specific issues.

Changes

  • Add _USE_MATH_DEFINES for M_PI in ggml-turbo-quant.c (MSVC does not define it by default)
  • Fix DLL boundary issue for turbo3_cpu_wht_group_size via GGML_API setter function
  • Add TURBO_INNERQ_API export macros to turbo-innerq.cuh for Windows DLL compatibility
  • Include turbo-innerq.cuh directly in llama-kv-cache.cpp instead of raw extern declarations
  • Link ggml-cuda and define GGML_USE_CUDA for llama target when CUDA is enabled

Test environment

  • Windows 11, MSVC 19.44, CUDA 13.1, RTX 4080 Super (SM89)
  • Ubuntu 24.04.4 LTS, CUDA 12.0, RTX 3060 12GB (SM86)

AI usage disclosure

Diagnosed and fixed with assistance from Claude (Anthropic).

🤖 Generated with Claude

- Add _USE_MATH_DEFINES for M_PI in ggml-turbo-quant.c (MSVC does not define it by default)
- Fix DLL boundary issue for turbo3_cpu_wht_group_size via GGML_API setter function
- Add TURBO_INNERQ_API export macros to turbo-innerq.cuh for Windows DLL compatibility
- Include turbo-innerq.cuh directly in llama-kv-cache.cpp instead of raw extern declarations
- Link ggml-cuda and define GGML_USE_CUDA for llama target when CUDA is enabled
@TheTom

TheTom commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Thank you @YunagiHisa for the Windows fixes and the dual-platform testing (RTX 4080 Super + RTX 3060). The setter function approach and direct include of turbo-innerq.cuh are clean solutions.

These fixes are already included in PR #45 (weight compression branch) which carries the same set of Windows DLL visibility and M_PI fixes. Closing to avoid merge conflicts but your contribution and testing are appreciated.

If you want to test weight compression on your 4080 Super, PR #45 has the full CUDA support: #45

@TheTom TheTom closed this Apr 2, 2026
@YunagiHisa YunagiHisa deleted the fix/windows-msvc-build branch April 3, 2026 22:06
hkmodd pushed a commit to hkmodd/llama-cpp-turboquant-triattention-buun-moelogging that referenced this pull request May 20, 2026
cuda: tune Ada MMQ tile cap for small quants
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 12, 2026
…026-07-12)

4 parallele Subagents (Vulkan/AMD, CUDA/MoE, arXiv, Multi-GPU/Batching)
konsolidiert zu 25 neuen Items in ROADMAP:

Tier 1 Quick Wins (3 neu):
- AtomicBot-ai#31 K-Quant A-Matrix Transpose CM1 (PR ggml-org#22970, +5-15% PP auf Mars)
- AtomicBot-ai#32 Pascal L1 Cache Tuning (-Xptxas -dlcm=ca, Styx)
- TheTom#33 Per-Quant MMVQ/MMQ Batch Threshold (AMD MFMA, Mars/Venus)

Tier 2 (7 neu):
- TheTom#34 UBBoost, TheTom#35 Row-Packing DMMV, TheTom#36 Auto Param Fitting TP
- TheTom#37 LFRU Expert Caching, TheTom#38 Conf-KV, TheTom#39 Talon, TheTom#40 MoE Load Balancing

Tier 3 (5 neu):
- TheTom#41 GRKV, TheTom#42 CapKV, TheTom#43 SliderQuant, TheTom#44 Alloc-MoE, TheTom#45 CUDA Streams QKV

Tier 4 (10 neu):
- TheTom#46-55: SpecMD, QUICK, FluxMoE, STAR-KV, VQKV, CompilerKV,
  SliceMoE, MoBiE, DASH-Q, GOOSE

7 PRs als bereits im Fork identifiziert (nicht erneut vorschlagen):
ggml-org#21472, ggml-org#23764, ggml-org#22299, ggml-org#21611, ggml-org#22423, ggml-org#18749, Warp Shuffle, Constant Memory
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 12, 2026
4 parallele Subagents evaluierten AtomicBot-ai#8, AtomicBot-ai#15, AtomicBot-ai#16, TheTom#34, TheTom#36, TheTom#37, TheTom#38, TheTom#40.
Ergebnisse: AtomicBot-ai#16 ✅ bereits integriert, TheTom#38 ⏭️ verschoben, 6 ☐ offen.
ROADMAP-Status für alle 8 Items mit Eval-Ergebnissen aktualisiert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants