diff options
author | Alex <awhill19@icloud.com> | 2023-10-22 15:56:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 22:56:53 +0300 |
commit | 96981f37b1e3f450d9e63e571514217bf60f0a7f (patch) | |
tree | 2c09acb1219bcae7385ee9adb97a43989820d264 | |
parent | 438c2ca83045a00ef244093d27e9ed41a8cb4ea9 (diff) |
make : add optional CUDA_NATIVE_ARCH (#2482)
Use the environment variable `CUDA_NATIVE_ARCH` if present to set NVCC arch. Otherwise, use `native`.
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |