Skip to content

Commit 27ee8b3

Browse files
sommerlukasndgrigorian
authored andcommitted
Skip test if oneAPI Base Toolkit isn't available
As the library aren't included in .bc format in version 2025.2 and earlier, we need to skip the test if no oneAPI Base Toolkit is installed. Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
1 parent aa16cd8 commit 27ee8b3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dpctl/tests/test_sycl_program.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"""Defines unit test cases for the SyclProgram and SyclKernel classes"""
1818

1919
import os
20+
import shutil
2021

2122
import pytest
2223

@@ -271,6 +272,12 @@ def test_create_program_from_sycl_source():
271272
except dpctl.SyclQueueCreationError:
272273
pytest.skip("No OpenCL queue is available")
273274

275+
if not shutil.which("icpx"):
276+
# In version 2025.2 and before, the packages do not contain the
277+
# libraries in the .bc format necessary for RTC. Therefore,
278+
# installation of the base toolkit is required.
279+
pytest.skip("oneAPI Base Toolkit not installed")
280+
274281
if not q.get_sycl_device().can_compile("sycl"):
275282
pytest.skip("SYCL source compilation not supported")
276283

@@ -381,6 +388,12 @@ def test_create_program_from_invalid_src_sycl():
381388
except dpctl.SyclQueueCreationError:
382389
pytest.skip("No OpenCL queue is available")
383390

391+
if not shutil.which("icpx"):
392+
# In version 2025.2 and before, the packages do not contain the
393+
# libraries in the .bc format necessary for RTC. Therefore,
394+
# installation of the base toolkit is required.
395+
pytest.skip("oneAPI Base Toolkit not installed")
396+
384397
if not q.get_sycl_device().can_compile("sycl"):
385398
pytest.skip("SYCL source compilation not supported")
386399

0 commit comments

Comments
 (0)