Skip to content

Conversation

@loci-dev
Copy link

@loci-dev loci-dev commented Dec 3, 2025

Mirrored from ggml-org/llama.cpp#17736

Previously, cmake was forcing _WIN32_WINNT=0x0A00 for MinGW builds, This caused "macro redefined" warnings with toolchains that define the version.

This also removes the GGML_WIN_VER variable as it is no longer needed.

Previously, cmake was forcing `_WIN32_WINNT=0x0A00` for MinGW builds,
This caused "macro redefined" warnings with toolchains that define the version.

This also removes the `GGML_WIN_VER` variable as it is no longer needed.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@loci-review
Copy link

loci-review bot commented Dec 3, 2025

Explore the complete analysis inside the Version Insights

Performance Analysis Summary - PR #417

Overview

PR #417 relocates the _WIN32_WINNT macro definition from CMake build configuration to C/C++ header files (common/common.h and ggml/include/ggml.h). This build system refactoring addresses macro redefinition warnings with MinGW toolchains while maintaining Windows 10 API compatibility.

Performance Impact

Analysis of versions a2b60b7c-9d36-46fe-984d-44f9b3b23fd4 (target) versus 00be72bf-5249-419f-a980-e14c00af57a6 (base) shows no measurable performance changes. All examined functions report 0% variation in both response time and throughput metrics:

  • llama_decode: 732255 ns response time, 69 ns throughput (unchanged)
  • llama_tokenize: 393910 ns response time, 22 ns throughput (unchanged)
  • ggml_backend_graph_compute: 128 ns response time, 22 ns throughput (unchanged)

Power consumption analysis across 16 binaries shows negligible variations within measurement precision (< 0.001%). The largest absolute delta is 0.84 nJ in build.bin.libllama.so, representing a reduction within noise thresholds.

Tokens per Second Impact: None. The inference-critical functions (llama_decode, llama_encode, llama_tokenize) show zero response time or throughput changes, resulting in no impact on token generation rate.

Impacted Binaries: None exhibit meaningful power consumption changes. All variations are sub-nanosecond level.

This PR is a pure build configuration change with no runtime code modifications, confirmed by performance metrics showing complete stability across all measured dimensions.

@loci-dev loci-dev force-pushed the main branch 27 times, most recently from 9612097 to c217e38 Compare December 6, 2025 08:10
@loci-dev loci-dev force-pushed the main branch 30 times, most recently from 048ad94 to 6c1fde6 Compare February 3, 2026 13:32
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.

2 participants