From 811c26a1c8634b6ce55d42a5741d79393d7267b1 Mon Sep 17 00:00:00 2001 From: ardfork <134447697+ardfork@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:24:33 +0000 Subject: [PATCH] Suggest setting AMDGPU_TARGETS Currently, when building llama.cpp with CMake and hipBLAS option, it will build for gfx900, gfx906, gfx908, gfx90a, gfx1030 if using 5.6.1 or older. And, build for gfx906 if using ROCm 5.7.0 or 5.7.1. The former raised multiple issues that CMake build wasn't working for RDNA3 cards, and once ROCm 5.7.0 or 5.7.1 is available in popular linux distributions, it will surely raise issues for most AMD cards owner. This issue was fixed upstream 3 days ago, it will do something similar to this suggestion. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c9e36ad0..379cccbbf 100644 --- a/README.md +++ b/README.md @@ -419,8 +419,8 @@ Building the program with BLAS support may lead to some performance improvements ```bash mkdir build cd build - CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++ cmake .. -DLLAMA_HIPBLAS=ON - cmake --build . + CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++ cmake .. -DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS=native + cmake --build . --config Release ``` The environment variable [`HIP_VISIBLE_DEVICES`](https://rocm.docs.amd.com/en/latest/understand/gpu_isolation.html#hip-visible-devices) can be used to specify which GPU(s) will be used.