Skip to content

Commit 2004644

Browse files
authored
ci : add env variable in ggml-ci and document the same in SYCL.md (#12736)
1 parent 5f696e8 commit 2004644

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ci/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ if [ ! -z ${GG_BUILD_SYCL} ]; then
5959
export ONEAPI_DEVICE_SELECTOR="level_zero:0"
6060
# Enable sysman for correct memory reporting
6161
export ZES_ENABLE_SYSMAN=1
62+
# to circumvent precision issues on CPY operations
63+
export SYCL_PROGRAM_COMPILE_OPTIONS="-cl-fp32-correctly-rounded-divide-sqrt"
6264
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_SYCL=1 -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON"
6365
fi
6466

docs/backend/SYCL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ cmake -B build -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -
302302
cmake --build build --config Release -j -v
303303
```
304304

305+
It is possible to come across some precision issues when running tests that stem from using faster
306+
instructions, which can be circumvented by setting the environment variable `SYCL_PROGRAM_COMPILE_OPTIONS`
307+
as `-cl-fp32-correctly-rounded-divide-sqrt`
308+
305309
#### Nvidia GPU
306310

307311
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=
322326
cmake --build build --config Release -j -v
323327
```
324328

329+
It is possible to come across some precision issues when running tests that stem from using faster
330+
instructions, which can be circumvented by passing the `-fno-fast-math` flag to the compiler.
331+
325332
#### AMD GPU
326333

327334
The SYCL backend depends on [oneMath](https://github.com/uxlfoundation/oneMath) for Nvidia and AMD devices.

0 commit comments

Comments
 (0)