From e55b9676d78832cb167a92b76d8d401f91adb3c0 Mon Sep 17 00:00:00 2001 From: sergiywith Date: Thu, 1 Oct 2026 16:29:27 +0300 Subject: [PATCH] load_experts_gguf: the header declares the new parameter The definition gained a defaulted parameter while the header kept the four-parameter declaration. The engine's caller is in the same file, so it built, but tests/core/expert_layout_test.cpp calls it through the header and failed to link (LNK2019, unresolved load_experts_gguf). The default now lives in the declaration; expert_layout_test passes. --- include/strata/core/expert_source.hpp | 3 ++- src/core/expert_source.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/strata/core/expert_source.hpp b/include/strata/core/expert_source.hpp index 307edd98..49d35509 100644 --- a/include/strata/core/expert_source.hpp +++ b/include/strata/core/expert_source.hpp @@ -648,7 +648,8 @@ private: /// layout's type and dimensions, and inside the file. `native` is the --native shard (see set_gguf). bool check_experts_gguf(const std::string& native, const strata::kernels::cpu::ExpertLayout& lay, std::string& err); /// Fills `dst` (lay.total bytes, the experts.bin layout) from the GGUF files, one role at a time. +/// `unbuffered`: each chunk read past the file cache (Windows). LoadStats load_experts_gguf(const std::string& native, uint8_t* dst, const strata::kernels::cpu::ExpertLayout& lay, - int threads); + int threads, bool unbuffered = false); } // namespace strata::core diff --git a/src/core/expert_source.cpp b/src/core/expert_source.cpp index e69b9b56..e091cf9e 100644 --- a/src/core/expert_source.cpp +++ b/src/core/expert_source.cpp @@ -2118,7 +2118,7 @@ bool check_experts_gguf(const std::string& gguf, const strata::kernels::cpu::Exp // `unbuffered` (Windows, experts_unbuffered): each chunk's 4 KiB-aligned window is read with FILE_FLAG_NO_BUFFERING into // an aligned buffer and scattered into the blobs - no copy through the file cache when the drive is read anyway. LoadStats load_experts_gguf(const std::string& gguf, uint8_t* dst, const strata::kernels::cpu::ExpertLayout& lay, - int threads, bool unbuffered = false) { + int threads, bool unbuffered) { LoadStats st; st.layers = (uint64_t) lay.n_layers; const auto t0 = std::chrono::steady_clock::now();