fix: default distributions to automatic GPU support with CPU fallback
This commit is contained in:
1 parent
d9336db1d5
commit
0fcc8ec21c
9 files changed
+43
-15
No files matched your search
@@ -10,12 +10,12 @@ endif()
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Static local worker runtime" FORCE)
|
||||
set(GGML_OPENMP OFF CACHE BOOL "Use bounded native llama thread pools without external OpenMP runtime" FORCE)
|
||||
set(GGML_NATIVE OFF CACHE BOOL "Portable CPU kernels")
|
||||
# GPU backends are explicit production build options. The Windows VM builds
|
||||
# with all of these OFF; runtime device selection always retains CPU fallback.
|
||||
# Normal distribution builds include GPU support and CPU fallback. CPU-only
|
||||
# configuration is explicitly reserved for development/testing in the VM.
|
||||
set(GGML_CUDA OFF CACHE BOOL "Production CUDA backend")
|
||||
set(GGML_VULKAN OFF CACHE BOOL "Production Vulkan backend")
|
||||
set(GGML_METAL OFF CACHE BOOL "Production Metal backend")
|
||||
set(SEARCHI_ACCELERATION "cpu" CACHE STRING "cpu, auto, metal, vulkan, or cuda")
|
||||
set(SEARCHI_ACCELERATION "auto" CACHE STRING "auto; explicit developer overrides: cpu, metal, vulkan, cuda")
|
||||
if(SEARCHI_ACCELERATION STREQUAL "cpu")
|
||||
set(GGML_CUDA OFF CACHE BOOL "CPU test build" FORCE)
|
||||
set(GGML_VULKAN OFF CACHE BOOL "CPU test build" FORCE)
|
||||
@@ -27,12 +27,10 @@ elseif(SEARCHI_ACCELERATION STREQUAL "cuda")
|
||||
elseif(SEARCHI_ACCELERATION STREQUAL "vulkan")
|
||||
set(GGML_VULKAN ON CACHE BOOL "Production Vulkan backend" FORCE)
|
||||
elseif(SEARCHI_ACCELERATION STREQUAL "auto")
|
||||
find_package(Vulkan QUIET)
|
||||
if(Vulkan_FOUND)
|
||||
set(GGML_VULKAN ON CACHE BOOL "Available production Vulkan backend" FORCE)
|
||||
else()
|
||||
message(STATUS "No production acceleration SDK detected; retaining CPU backend")
|
||||
endif()
|
||||
# A missing build SDK must not silently turn a normal release into a
|
||||
# CPU-only artifact. End users need drivers, not this compilation SDK.
|
||||
find_package(Vulkan COMPONENTS glslc REQUIRED)
|
||||
set(GGML_VULKAN ON CACHE BOOL "Production GPU support with runtime CPU fallback" FORCE)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown SEARCHI_ACCELERATION=${SEARCHI_ACCELERATION}")
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user