From 473eb1094726526efa9db8bec2e2f32661a5e01e Mon Sep 17 00:00:00 2001 From: Aaryaman Vasishta Date: Sat, 18 Nov 2023 14:55:09 +0900 Subject: [PATCH 1/2] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4de06476569f9..72171d51613d1 100644 --- a/README.md +++ b/README.md @@ -410,19 +410,27 @@ Building the program with BLAS support may lead to some performance improvements This provides BLAS acceleration on HIP-supported AMD GPUs. Make sure to have ROCm installed. You can download it from your Linux distro's package manager or from here: [ROCm Quick Start (Linux)](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html). - Windows support is coming soon... - Using `make`: ```bash make LLAMA_HIPBLAS=1 ``` - - Using `CMake`: + - Using `CMake` for Linux: ```bash mkdir build cd build CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++ cmake .. -DLLAMA_HIPBLAS=ON cmake --build . ``` + - Using `CMake` for Windows: + ```bash + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -G "Ninja" -DAMDGPU_TARGETS=gfx1100 -DLLAMA_HIPBLAS=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. + cmake --build . + ``` + Make sure that `AMDGPU_TARGETS` is set to the GPU arch you want to compile for. The above example uses `gfx1100` that corresponds to Radeon RX 7900XTX/XT/GRE. You can find a list of targets [here](https://llvm.org/docs/AMDGPUUsage.html#processors) + 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. If your GPU is not officially supported you can use the environment variable [`HSA_OVERRIDE_GFX_VERSION`] set to a similar GPU, for example 10.3.0 on RDNA2 or 11.0.0 on RDNA3. From bd2a828742d3732f0585d4b50549183542eab12b Mon Sep 17 00:00:00 2001 From: Aaryaman Vasishta Date: Mon, 20 Nov 2023 14:35:52 +0900 Subject: [PATCH 2/2] Update README.md Co-authored-by: Jared Van Bortel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72171d51613d1..e14886737121b 100644 --- a/README.md +++ b/README.md @@ -426,7 +426,7 @@ Building the program with BLAS support may lead to some performance improvements ```bash mkdir build cd build - cmake -DCMAKE_BUILD_TYPE=Release -G "Ninja" -DAMDGPU_TARGETS=gfx1100 -DLLAMA_HIPBLAS=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. + cmake -G Ninja -DAMDGPU_TARGETS=gfx1100 -DLLAMA_HIPBLAS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. cmake --build . ``` Make sure that `AMDGPU_TARGETS` is set to the GPU arch you want to compile for. The above example uses `gfx1100` that corresponds to Radeon RX 7900XTX/XT/GRE. You can find a list of targets [here](https://llvm.org/docs/AMDGPUUsage.html#processors)