From 49020c08570fd4cee82643b5d6bce56a89720445 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Thu, 7 Dec 2023 14:25:24 +0200 Subject: [PATCH] cmake : enable separable compilation for CUDA --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0639518de8a821..6dc00d1ee59f0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,6 +279,10 @@ if (LLAMA_CUBLAS) if (LLAMA_CUDA_FORCE_MMQ) add_compile_definitions(GGML_CUDA_FORCE_MMQ) endif() + + # required for dynamic parallelism + set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) + add_compile_definitions(GGML_CUDA_DMMV_X=${LLAMA_CUDA_DMMV_X}) add_compile_definitions(GGML_CUDA_MMV_Y=${LLAMA_CUDA_MMV_Y}) if (DEFINED LLAMA_CUDA_DMMV_Y)