From: Akarshan Biswas Date: Tue, 25 Mar 2025 09:38:14 +0000 (+0530) Subject: ci: Initial SYCL setup (#1157) X-Git-Tag: upstream/0.0.1898~90 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=882cd39c333235a6fcafa52083b1a3ea5d7f4b53;p=pkg%2Fggml%2Fsources%2Fggml ci: Initial SYCL setup (#1157) --- diff --git a/ci/run.sh b/ci/run.sh index 49f95fb8..237f8039 100644 --- a/ci/run.sh +++ b/ci/run.sh @@ -10,6 +10,9 @@ # # with CUDA support # GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt # +# # With SYCL support +# GG_BUILD_SYCL=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt +# if [ -z "$2" ]; then echo "usage: $0 " @@ -43,6 +46,17 @@ if [ ! -z ${GG_BUILD_METAL} ]; then CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON" fi +if [ ! -z ${GG_BUILD_SYCL} ]; then + if [ -z ${ONEAPI_ROOT} ]; then + echo "Not detected ONEAPI_ROOT, please install oneAPI base toolkit and enable it by:" + echo "source /opt/intel/oneapi/setvars.sh" + exit 1 + fi + export ONEAPI_DEVICE_SELECTOR="level_zero:0" + export ZES_ENABLE_SYSMAN=1 + CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=1 -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON" +fi + ## helpers # download a file if it does not exist or if it is outdated @@ -312,8 +326,9 @@ fi ret=0 - -test $ret -eq 0 && gg_run ctest_debug +if [ -z ${GG_BUILD_SYCL}]; then + test $ret -eq 0 && gg_run ctest_debug +fi test $ret -eq 0 && gg_run ctest_release if [ ! -z ${GG_BUILD_METAL} ]; then