From: Eve Date: Sat, 4 Oct 2025 20:04:27 +0000 (+0000) Subject: vulkan: use a more appropriate amount of threads when generating shaders (#16418) X-Git-Tag: upstream/0.0.6764~74 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=86df2c9ae4f2f1ee63d2558a9dc797b98524639b;p=pkg%2Fggml%2Fsources%2Fllama.cpp vulkan: use a more appropriate amount of threads when generating shaders (#16418) * use a more flexible amount of threads * fix windows compile and 0 thread case * nominmax --- diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp b/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp index e2726f1f..f0cc24ff 100644 --- a/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp +++ b/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp @@ -1,5 +1,3 @@ - - #include #include #include @@ -22,6 +20,7 @@ #include #ifdef _WIN32 + #define NOMINMAX #include #include // For _mkdir on Windows #else @@ -306,7 +305,7 @@ using compile_count_guard = std::unique_ptr guard(compile_count_mutex); compile_count_cond.wait(guard, [N] { return compile_count < N; }); compile_count++;