Skip to content

Commit

Permalink
make : add optional CUDA_NATIVE_ARCH (#2482)
Browse files Browse the repository at this point in the history
Use the environment variable `CUDA_NATIVE_ARCH` if present to set NVCC arch. Otherwise, use `native`.
  • Loading branch information
awhill19 authored Oct 22, 2023
1 parent 438c2ca commit 96981f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,12 @@ else
endif #LLAMA_CUDA_NVCC
ifdef CUDA_DOCKER_ARCH
NVCCFLAGS += -Wno-deprecated-gpu-targets -arch=$(CUDA_DOCKER_ARCH)
endif # CUDA_DOCKER_ARCH
ifdef CUDA_NATIVE_ARCH
NVCCFLAGS += -arch=$(CUDA_NATIVE_ARCH)
else
NVCCFLAGS += -arch=native
endif # CUDA_DOCKER_ARCH
endif # CUDA_NATIVE_ARCH
ifdef LLAMA_CUDA_FORCE_DMMV
NVCCFLAGS += -DGGML_CUDA_FORCE_DMMV
endif # LLAMA_CUDA_FORCE_DMMV
Expand Down

0 comments on commit 96981f3

Please sign in to comment.