diff options
author | Matheus Gabriel Alves Silva <matheusgasource@gmail.com> | 2023-12-17 12:23:33 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 17:23:33 +0200 |
commit | 919c40660fd27157b391b5832d2a577d5afef4cb (patch) | |
tree | 95f99b2f7761b1b9dbf937cfd24e4d9cc549128c | |
parent | 45668633fdb522a925c3dafc1ecf426f539efb27 (diff) |
build : Check the ROCm installation location (#4485)
* build : Check the ROCm installation location
* more generic approach
* fixup! It was returning the path instead of the command output
* fixup! Trailing whitespace
-rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -439,9 +439,15 @@ ggml-opencl.o: ggml-opencl.cpp ggml-opencl.h endif # LLAMA_CLBLAST ifdef LLAMA_HIPBLAS - ROCM_PATH ?= /opt/rocm - HIPCC ?= $(ROCM_PATH)/bin/hipcc - GPU_TARGETS ?= $(shell $(ROCM_PATH)/llvm/bin/amdgpu-arch) + + ifeq ($(wildcard /opt/rocm),) + ROCM_PATH ?= /usr + GPU_TARGETS ?= $(shell $(shell which amdgpu-arch)) + else + ROCM_PATH ?= /opt/rocm + GPU_TARGETS ?= $(shell $(ROCM_PATH)/llvm/bin/amdgpu-arch) + endif + HIPCC ?= $(ROCM_PATH)/bin/hipcc LLAMA_CUDA_DMMV_X ?= 32 LLAMA_CUDA_MMV_Y ?= 1 LLAMA_CUDA_KQUANTS_ITER ?= 2 |