diff --git a/Makefile b/Makefile index 8277d837b..179b05574 100644 --- a/Makefile +++ b/Makefile @@ -242,12 +242,16 @@ endif # LLAMA_CUBLAS ifdef LLAMA_HIPBLAS ifeq ($(wildcard /opt/rocm),) ROCM_PATH ?= /usr +ifdef LLAMA_PORTABLE + GPU_TARGETS ?= gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1030 gfx1031 gfx1032 gfx1100 gfx1101 gfx1102 $(shell $(shell which amdgpu-arch)) +else GPU_TARGETS ?= $(shell $(shell which amdgpu-arch)) +endif 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) + GPU_TARGETS ?= gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1030 gfx1031 gfx1032 gfx1100 gfx1101 gfx1102 $(shell $(ROCM_PATH)/llvm/bin/amdgpu-arch) HCC := $(ROCM_PATH)/llvm/bin/clang HCXX := $(ROCM_PATH)/llvm/bin/clang++ endif