Skip to content

Commit 9002b4d

Browse files
committed
Remove step to build oneMath from build instructions
1 parent bc851c8 commit 9002b4d

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

docs/backend/SYCL.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,30 +227,10 @@ Upon a successful installation, SYCL is enabled for the available intel devices,
227227

228228
**oneAPI Plugin**: In order to enable SYCL support on Nvidia GPUs, please install the [Codeplay oneAPI Plugin for Nvidia GPUs](https://developer.codeplay.com/products/oneapi/nvidia/download). User should also make sure the plugin version matches the installed base toolkit one *(previous step)* for a seamless "oneAPI on Nvidia GPU" setup.
229229

230-
231-
**oneMath for cuBlas**: The current Intel oneMKL releases *(shipped with the oneAPI base-toolkit)* do not contain the cuBLAS backend. [oneMath](https://github.com/uxlfoundation/oneMath) is used instead to dispatch to *cuBLAS* on Nvidia GPUs.
232-
233-
```sh
234-
git clone https://github.com/uxlfoundation/oneMath
235-
cd oneMath
236-
cmake -B buildWithCublas -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DENABLE_MKLGPU_BACKEND=OFF -DENABLE_MKLCPU_BACKEND=OFF -DENABLE_CUBLAS_BACKEND=ON -DTARGET_DOMAINS=blas -DCMAKE_INSTALL_PREFIX:PATH=install
237-
cmake --build buildWithCublas --target install --config Release
238-
```
239-
240230
- **Adding support to AMD GPUs**
241231

242232
**oneAPI Plugin**: In order to enable SYCL support on AMD GPUs, please install the [Codeplay oneAPI Plugin for AMD GPUs](https://developer.codeplay.com/products/oneapi/amd/download). As with Nvidia GPUs, the user should also make sure the plugin version matches the installed base toolkit.
243233

244-
**oneMath for rocBlas**: The current Intel oneMKL releases *(shipped with the oneAPI base-toolkit)* do not contain the rocBLAS backend. [oneMath](https://github.com/uxlfoundation/oneMath) is used instead to dispatch to *rocBLAS* on AMD GPUs.
245-
246-
```sh
247-
git clone https://github.com/uxlfoundation/oneMath
248-
cd oneMath
249-
# Find your HIP_TARGETS with rocminfo, under the key 'Name:'
250-
cmake -B buildWithrocBLAS -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DENABLE_MKLGPU_BACKEND=OFF -DENABLE_MKLCPU_BACKEND=OFF -DENABLE_ROCBLAS_BACKEND=ON -DHIP_TARGETS=${HIP_TARGETS} -DTARGET_DOMAINS=blas -DCMAKE_INSTALL_PREFIX:PATH=install
251-
cmake --build buildWithrocBLAS --target install --config Release
252-
```
253-
254234
3. **Verify installation and environment**
255235

256236
In order to check the available SYCL devices on the machine, please use the `sycl-ls` command.
@@ -291,6 +271,8 @@ For AMD GPUs we should expect at least one SYCL-HIP device [`hip:gpu`]:
291271

292272
### II. Build llama.cpp
293273

274+
The SYCL backend depends on [oneMath](https://github.com/uxlfoundation/oneMath). By default it is automatically built along with the project. A specific build can be provided by setting the CMake flag `-DoneMath_DIR=/path/to/oneMath/install/lib/cmake/oneMath`.
275+
294276
#### Intel GPU
295277

296278
```
@@ -321,10 +303,10 @@ cmake --build build --config Release -j -v
321303
GGML_SYCL_DEVICE_ARCH=sm_80 # Example architecture
322304

323305
# Option 1: Use FP32 (recommended for better performance in most cases)
324-
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=NVIDIA -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DoneMath_DIR=/path/to/oneMath/buildWithCublas/install/lib/cmake/oneMath
306+
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=NVIDIA -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
325307

326308
# Option 2: Use FP16
327-
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=NVIDIA -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DoneMath_DIR=/path/to/oneMath/buildWithCublas/install/lib/cmake/oneMath -DGGML_SYCL_F16=ON
309+
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=NVIDIA -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON
328310

329311
# build all binary
330312
cmake --build build --config Release -j -v
@@ -339,7 +321,7 @@ cmake --build build --config Release -j -v
339321
# Use FP32, FP16 is not supported
340322
# Find your GGML_SYCL_DEVICE_ARCH with rocminfo, under the key 'Name:'
341323
GGML_SYCL_DEVICE_ARCH=gfx90a # Example architecture
342-
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=AMD -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DoneMath_DIR=/path/to/oneMath/buildWithrocBLAS/install/lib/cmake/oneMath
324+
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=AMD -DGGML_SYCL_DEVICE_ARCH=${GGML_SYCL_DEVICE_ARCH} -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
343325

344326
# build all binary
345327
cmake --build build --config Release -j -v

0 commit comments

Comments
 (0)