-
Couldn't load subscription status.
- Fork 13.4k
SYCL: Rename oneMKL to oneMath #12192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
a856351
dccc9f8
3577bc0
4482516
2c79721
64b5a14
bc851c8
9002b4d
09dfe89
948f3c5
1c8a949
5f2525a
995aea3
1caa2d9
0b6f9a9
6af33c9
06fe2ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |
| **oneAPI** is an open ecosystem and a standard-based specification, supporting multiple architectures including but not limited to intel CPUs, GPUs and FPGAs. The key components of the oneAPI ecosystem include: | ||
|
|
||
| - **DPCPP** *(Data Parallel C++)*: The primary oneAPI SYCL implementation, which includes the icpx/icx Compilers. | ||
| - **oneAPI Libraries**: A set of highly optimized libraries targeting multiple domains *(e.g. oneMKL and oneDNN)*. | ||
| - **oneAPI Libraries**: A set of highly optimized libraries targeting multiple domains *(e.g. Intel oneMKL, oneMath and oneDNN)*. | ||
| - **oneAPI LevelZero**: A high performance low level interface for fine-grained control over intel iGPUs and dGPUs. | ||
| - **Nvidia & AMD Plugins**: These are plugins extending oneAPI's DPCPP support to SYCL on Nvidia and AMD GPU targets. | ||
|
|
||
|
|
@@ -227,30 +227,10 @@ Upon a successful installation, SYCL is enabled for the available intel devices, | |
|
|
||
| **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. | ||
|
|
||
|
|
||
| **oneMKL for cuBlas**: The current oneMKL releases *(shipped with the oneAPI base-toolkit)* do not contain the cuBLAS backend. A build from source of the upstream [oneMKL](https://github.com/oneapi-src/oneMKL) with the *cuBLAS* backend enabled is thus required to run it on Nvidia GPUs. | ||
|
|
||
| ```sh | ||
| git clone https://github.com/oneapi-src/oneMKL | ||
| cd oneMKL | ||
| 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 | ||
| cmake --build buildWithCublas --config Release | ||
| ``` | ||
|
|
||
| - **Adding support to AMD GPUs** | ||
|
|
||
| **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. | ||
|
|
||
| **oneMKL for rocBlas**: The current oneMKL releases *(shipped with the oneAPI base-toolkit)* doesn't contain the rocBLAS backend. A build from source of the upstream [oneMKL](https://github.com/oneapi-src/oneMKL) with the *rocBLAS* backend enabled is thus required to run it on AMD GPUs. | ||
|
|
||
| ```sh | ||
| git clone https://github.com/oneapi-src/oneMKL | ||
| cd oneMKL | ||
| # Find your HIPTARGET with rocminfo, under the key 'Name:' | ||
| cmake -B buildWithrocBLAS -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DENABLE_MKLGPU_BACKEND=OFF -DENABLE_MKLCPU_BACKEND=OFF -DENABLE_ROCBLAS_BACKEND=ON -DHIPTARGETS=${HIPTARGET} -DTARGET_DOMAINS=blas | ||
| cmake --build buildWithrocBLAS --config Release | ||
| ``` | ||
|
|
||
| 3. **Verify installation and environment** | ||
|
|
||
| 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`]: | |
|
|
||
| ### II. Build llama.cpp | ||
|
|
||
| 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`. | ||
|
||
|
|
||
| #### Intel GPU | ||
|
|
||
| ``` | ||
|
|
@@ -316,12 +298,6 @@ cmake --build build --config Release -j -v | |
| #### Nvidia GPU | ||
|
|
||
| ```sh | ||
| # Export relevant ENV variables | ||
| export LD_LIBRARY_PATH=/path/to/oneMKL/buildWithCublas/lib:$LD_LIBRARY_PATH | ||
| export LIBRARY_PATH=/path/to/oneMKL/buildWithCublas/lib:$LIBRARY_PATH | ||
| export CPLUS_INCLUDE_DIR=/path/to/oneMKL/buildWithCublas/include:$CPLUS_INCLUDE_DIR | ||
| export CPLUS_INCLUDE_DIR=/path/to/oneMKL/include:$CPLUS_INCLUDE_DIR | ||
|
|
||
| # Build LLAMA with Nvidia BLAS acceleration through SYCL | ||
| # Setting GGML_SYCL_DEVICE_ARCH is optional but can improve performance | ||
| GGML_SYCL_DEVICE_ARCH=sm_80 # Example architecture | ||
|
|
@@ -339,11 +315,6 @@ cmake --build build --config Release -j -v | |
| #### AMD GPU | ||
|
|
||
| ```sh | ||
| # Export relevant ENV variables | ||
| export LD_LIBRARY_PATH=/path/to/oneMKL/buildWithrocBLAS/lib:$LD_LIBRARY_PATH | ||
| export LIBRARY_PATH=/path/to/oneMKL/buildWithrocBLAS/lib:$LIBRARY_PATH | ||
| export CPLUS_INCLUDE_DIR=/path/to/oneMKL/buildWithrocBLAS/include:$CPLUS_INCLUDE_DIR | ||
|
|
||
| # Build LLAMA with rocBLAS acceleration through SYCL | ||
|
|
||
| ## AMD | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.