]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
CUDA cmake: add `-lineinfo` for easier debug (#15260)
authorAman Gupta <redacted>
Tue, 12 Aug 2025 09:21:45 +0000 (17:21 +0800)
committerGitHub <redacted>
Tue, 12 Aug 2025 09:21:45 +0000 (17:21 +0800)
ggml/src/ggml-cuda/CMakeLists.txt

index 98ed29bc9c12fbf7e17a6549df31ffea7a746b7c..bce07ac362830c164ecb9aebcfd92617944a6845 100644 (file)
@@ -120,6 +120,10 @@ if (CUDAToolkit_FOUND)
 
     set(CUDA_FLAGS -use_fast_math -extended-lambda)
 
+    if (GGML_CUDA_DEBUG)
+        list(APPEND CUDA_FLAGS -lineinfo)
+    endif()
+
     if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL "12.8")
         # Options are:
         # - none (not recommended)