From: Yilong Guo Date: Sun, 30 Jun 2024 16:05:44 +0000 (-0700) Subject: sycl : add build instruction (#870) X-Git-Tag: upstream/0.0.1642~561 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=052f2e93a94906d597eaf697a4c72ece33f3504b;p=pkg%2Fggml%2Fsources%2Fggml sycl : add build instruction (#870) --- diff --git a/README.md b/README.md index af7ac97c..1a255440 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,18 @@ cmake -DGGML_CUDA=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.1/bin/nvcc .. cmake -DCMAKE_C_COMPILER="$(hipconfig -l)/clang" -DCMAKE_CXX_COMPILER="$(hipconfig -l)/clang++" -DGGML_HIPBLAS=ON ``` +## Using SYCL + +```bash +# linux +source /opt/intel/oneapi/setvars.sh +cmake -G "Ninja" -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL=ON .. + +# windows +"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" +cmake -G "Ninja" -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx -DGGML_SYCL=ON .. +``` + ## Compiling for Android Download and unzip the NDK from this download [page](https://developer.android.com/ndk/downloads). Set the NDK_ROOT_PATH environment variable or provide the absolute path to the CMAKE_ANDROID_NDK in the command below.