fix cuda compile

This commit is contained in:
Concedo
2025-05-13 02:15:33 +08:00
parent 21e31e255b
commit dec3cd92b0
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -438,6 +438,7 @@ target_include_directories(ggml PUBLIC . ./ggml/include ./ggml/src ./ggml/src/gg
target_compile_features(ggml PUBLIC c_std_11) # don't bump
target_link_libraries(ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS})
set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_options(ggml PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-use_fast_math -extended-lambda>)
add_library(ggml_v1
otherarch/ggml_v1.c
+1 -1
View File
@@ -183,7 +183,7 @@ ifdef LLAMA_CUBLAS
CUBLAS_OBJS += $(patsubst %.cu,%.o,$(filter-out ggml/src/ggml-cuda/ggml-cuda.cu, $(wildcard ggml/src/ggml-cuda/*.cu)))
CUBLAS_OBJS += $(OBJS_CUDA_TEMP_INST)
NVCC = nvcc
NVCCFLAGS = --forward-unknown-to-host-compiler -use_fast_math
NVCCFLAGS = --forward-unknown-to-host-compiler -use_fast_math -extended-lambda
ifdef LLAMA_ADD_CONDA_PATHS
CUBLASLD_FLAGS += -Lconda/envs/linux/lib -Lconda/envs/linux/lib/stubs