diff --git a/CMakeLists.txt b/CMakeLists.txt index 143b6894f..fa5f28f18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $<$:-use_fast_math -extended-lambda>) add_library(ggml_v1 otherarch/ggml_v1.c diff --git a/Makefile b/Makefile index bccd9a95b..c152634f5 100644 --- a/Makefile +++ b/Makefile @@ -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