Skip to content

Commit dec3cd9

Browse files
committed
fix cuda compile
1 parent 21e31e2 commit dec3cd9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ target_include_directories(ggml PUBLIC . ./ggml/include ./ggml/src ./ggml/src/gg
438438
target_compile_features(ggml PUBLIC c_std_11) # don't bump
439439
target_link_libraries(ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS})
440440
set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON)
441+
target_compile_options(ggml PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-use_fast_math -extended-lambda>)
441442

442443
add_library(ggml_v1
443444
otherarch/ggml_v1.c

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ ifdef LLAMA_CUBLAS
183183
CUBLAS_OBJS += $(patsubst %.cu,%.o,$(filter-out ggml/src/ggml-cuda/ggml-cuda.cu, $(wildcard ggml/src/ggml-cuda/*.cu)))
184184
CUBLAS_OBJS += $(OBJS_CUDA_TEMP_INST)
185185
NVCC = nvcc
186-
NVCCFLAGS = --forward-unknown-to-host-compiler -use_fast_math
186+
NVCCFLAGS = --forward-unknown-to-host-compiler -use_fast_math -extended-lambda
187187

188188
ifdef LLAMA_ADD_CONDA_PATHS
189189
CUBLASLD_FLAGS += -Lconda/envs/linux/lib -Lconda/envs/linux/lib/stubs

0 commit comments

Comments
 (0)