From de1bb5a4adf869db586242a60965a565f1e12471 Mon Sep 17 00:00:00 2001 From: Yann Follet Date: Tue, 10 Dec 2024 01:32:10 +0000 Subject: [PATCH] Add build command for CUDA with path example --- docs/build.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/build.md b/docs/build.md index 26e673788..8f4b33fd8 100644 --- a/docs/build.md +++ b/docs/build.md @@ -127,6 +127,12 @@ This provides GPU acceleration using an NVIDIA GPU. Make sure to have the CUDA t cmake --build build --config Release ``` +- Using `CMake` with path : + + ```bash + rm -rf build & /usr/local/bin/cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc + /usr/local/bin/cmake --build build --config Release -j + ``` The environment variable [`CUDA_VISIBLE_DEVICES`](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars) can be used to specify which GPU(s) will be used. The environment variable `GGML_CUDA_ENABLE_UNIFIED_MEMORY=1` can be used to enable unified memory in Linux. This allows swapping to system RAM instead of crashing when the GPU VRAM is exhausted. In Windows this setting is available in the NVIDIA control panel as `System Memory Fallback`.