Skip to content

Commit ac0e1f3

Browse files
ZzEeKkAaDiptorup Deb
authored andcommitted
Run tests for every sycl selector
1 parent 3f84781 commit ac0e1f3

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

conda-recipe/run_test.bat

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
2-
IF %ERRORLEVEL% NEQ 0 exit /B 1
1+
set "ONEAPI_DEVICE_SELECTOR="
2+
3+
for /F "USEBACKQ tokens=* delims=" %%F in (
4+
`python -c "import dpctl; print(\"\n\".join([dev.backend.name+\":\"+dev.device_type.name for dev in dpctl.get_devices() if dev.device_type.name in [\"cpu\",\"gpu\"]]))"`
5+
) do (
6+
set "ONEAPI_DEVICE_SELECTOR=%%F"
7+
8+
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
9+
IF %ERRORLEVEL% NEQ 0 exit /B 1
10+
)
311

412
exit /B 0

conda-recipe/run_test.sh

100644100755
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
#!/bin/bash
22

33
set -euxo pipefail
4+
unset ONEAPI_DEVICE_SELECTOR
45

5-
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
6+
for selector in $(python -c "import dpctl; print(\" \".join([dev.backend.name+\":\"+dev.device_type.name for dev in dpctl.get_devices() if dev.device_type.name in [\"cpu\",\"gpu\"]]))")
7+
do
8+
export "ONEAPI_DEVICE_SELECTOR=$selector"
9+
unset NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
610

7-
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
11+
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
812

9-
pytest -q -ra --disable-warnings -vv \
10-
--pyargs numba_dpex.tests.kernel_tests.test_atomic_op::test_atomic_fp_native
13+
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
14+
15+
pytest -q -ra --disable-warnings -vv \
16+
--pyargs numba_dpex.tests.kernel_tests.test_atomic_op::test_atomic_fp_native
17+
done
1118

1219
exit 0

0 commit comments

Comments
 (0)