]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ci : add env variable in ggml-ci and document the same in SYCL.md (#12736)
authorAtharva Dubey <redacted>
Thu, 3 Apr 2025 12:12:39 +0000 (13:12 +0100)
committerGitHub <redacted>
Thu, 3 Apr 2025 12:12:39 +0000 (15:12 +0300)
ci/run.sh
docs/backend/SYCL.md

index 4d9c2dc482ec91cd5394bd93f60f06cbea8588c6..ebd662b38bf888d4d1a79af38c2f4a67a361caaa 100755 (executable)
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -59,6 +59,8 @@ if [ ! -z ${GG_BUILD_SYCL} ]; then
     export ONEAPI_DEVICE_SELECTOR="level_zero:0"
     # Enable sysman for correct memory reporting
     export ZES_ENABLE_SYSMAN=1
+    # to circumvent precision issues on CPY operations
+    export SYCL_PROGRAM_COMPILE_OPTIONS="-cl-fp32-correctly-rounded-divide-sqrt"
     CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=1 -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
 fi
 
index 19fe8a9d2212614ac7b95d33ab82d3bc63134ec1..f1204dded0b1108b362ae484df92be5920be2472 100644 (file)
@@ -302,6 +302,10 @@ cmake -B build -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -
 cmake --build build --config Release -j -v
 ```
 
+It is possible to come across some precision issues when running tests that stem from using faster
+instructions, which can be circumvented by setting the environment variable `SYCL_PROGRAM_COMPILE_OPTIONS`
+as `-cl-fp32-correctly-rounded-divide-sqrt`
+
 #### Nvidia GPU
 
 The SYCL backend depends on [oneMath](https://github.com/uxlfoundation/oneMath) for Nvidia and AMD devices.
@@ -322,6 +326,9 @@ cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=NVIDIA -DGGML_SYCL_DEVICE_ARCH=
 cmake --build build --config Release -j -v
 ```
 
+It is possible to come across some precision issues when running tests that stem from using faster
+instructions, which can be circumvented by passing the `-fno-fast-math` flag to the compiler.
+
 #### AMD GPU
 
 The SYCL backend depends on [oneMath](https://github.com/uxlfoundation/oneMath) for Nvidia and AMD devices.