Debian Unstable compatibility for HIP (#620)

* Support rocm on Debian unstable

* Update Makefile
This commit is contained in:
DaniAndTheWeb 2024-01-20 03:11:04 +00:00 committed by GitHub
parent c939bbf7c6
commit 9ab904562e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,10 +198,17 @@ ggml_v3-cuda.o: otherarch/ggml_v3-cuda.cu otherarch/ggml_v3-cuda.h
endif # LLAMA_CUBLAS endif # LLAMA_CUBLAS
ifdef LLAMA_HIPBLAS ifdef LLAMA_HIPBLAS
ROCM_PATH ?= /opt/rocm ifeq ($(wildcard /opt/rocm),)
HCC := $(ROCM_PATH)/llvm/bin/clang ROCM_PATH ?= /usr
HCXX := $(ROCM_PATH)/llvm/bin/clang++ GPU_TARGETS ?= $(shell $(shell which amdgpu-arch))
GPU_TARGETS ?= gfx803 gfx900 gfx906 gfx908 gfx90a gfx1030 gfx1100 $(shell $(ROCM_PATH)/llvm/bin/amdgpu-arch) HCC := $(ROCM_PATH)/bin/hipcc
HCXX := $(ROCM_PATH)/bin/hipcc
else
ROCM_PATH ?= /opt/rocm
GPU_TARGETS ?= gfx803 gfx900 gfx906 gfx908 gfx90a gfx1030 gfx1100 $(shell $(ROCM_PATH)/llvm/bin/amdgpu-arch)
HCC := $(ROCM_PATH)/llvm/bin/clang
HCXX := $(ROCM_PATH)/llvm/bin/clang++
endif
LLAMA_CUDA_DMMV_X ?= 32 LLAMA_CUDA_DMMV_X ?= 32
LLAMA_CUDA_MMV_Y ?= 1 LLAMA_CUDA_MMV_Y ?= 1
LLAMA_CUDA_KQUANTS_ITER ?= 2 LLAMA_CUDA_KQUANTS_ITER ?= 2