cmake: default GGML_CUDA_GRAPHS to ON

Standalone ggml ships CUDA graphs off. Capture/replay batches every
kernel launch of a graph into a single submission. Override with
-DGGML_CUDA_GRAPHS=OFF or at runtime with GGML_CUDA_DISABLE_GRAPHS=1
This commit is contained in:
Pascal
2026-07-04 13:45:08 +02:00
parent 0b4ef05d4c
commit 46c99d5889
+6
View File
@@ -58,6 +58,12 @@ if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
endif()
# ggml as subdirectory, inherits GGML_CUDA, GGML_METAL, etc. from cmake flags
# CUDA graphs default on: standalone ggml ships them off, the decode loop
# relies on capture/replay to batch its kernel launches. Overridable with
# -DGGML_CUDA_GRAPHS=OFF or at runtime with GGML_CUDA_DISABLE_GRAPHS=1.
if(NOT DEFINED GGML_CUDA_GRAPHS)
set(GGML_CUDA_GRAPHS_DEFAULT ON)
endif()
add_subdirectory(ggml)
# cpp-httplib (HTTP server library, no SSL, behind reverse proxy in prod).