Intel oneAPI SYCL Runtime
The `intel-sycl-rt` package provides the Intel® oneAPI DPC++/C++ SYCL Compiler Runtime, essential for executing DPC++/SYCL applications. It is a core component of the Intel oneAPI Toolkit, enabling Python libraries like `dpctl` and `numba-dppy` to leverage SYCL-compatible hardware. Current version is 2025.3.3, with releases typically aligning with oneAPI toolkit updates.
Common errors
-
dpctl.SyclQueueCreationError: Could not create SyclQueue (or similar 'No SYCL devices found' errors)
cause SYCL runtime or devices are not discoverable, often due to missing environment setup or incorrect drivers.fixSource your oneAPI `setvars.sh` script (e.g., `source /opt/intel/oneapi/setvars.sh`) before running Python applications. Verify Intel GPU drivers are installed and up to date. -
ImportError: DLL load failed while importing _sycl_service: The specified module could not be found. (Windows) or cannot open shared object file: No such file or directory (Linux)
cause The underlying SYCL runtime libraries are not in the system's PATH (Windows) or LD_LIBRARY_PATH (Linux), preventing dependent Python modules (like `dpctl`) from loading.fixEnsure `intel-sycl-rt` is installed and the oneAPI environment variables are set correctly by sourcing `setvars.sh`. On Linux, ensure `LD_LIBRARY_PATH` includes the SYCL runtime directories. On Windows, verify `PATH`.
Warnings
- gotcha The SYCL runtime often requires specific environment variables (e.g., `ONEAPI_ROOT`, `DPCPP_HOME`) to be sourced from the oneAPI `setvars.sh` script for proper discovery by Python libraries like `dpctl`.
- breaking Mixing `intel-sycl-rt` from different oneAPI toolkit versions or using it with Python libraries (e.g., `dpctl`) compiled against an incompatible oneAPI version can lead to runtime errors or device detection failures.
- gotcha For GPU acceleration, ensure you have the correct and up-to-date Intel GPU drivers installed. Outdated or missing drivers will prevent SYCL devices from being detected and used.
Install
-
pip install intel-sycl-rt
Imports
- N/A
This package provides a C++/SYCL runtime component and is not designed for direct Python import.
Quickstart
import dpctl
# Check if a SYCL device is available
if dpctl.has_sycl_devices():
# Get a default SYCL device (e.g., GPU if available, otherwise CPU)
device = dpctl.select_default_device()
print(f"Selected SYCL device: {device.name}")
# The SYCL runtime is now implicitly active and available to dpctl.
# For actual computation, you would typically use libraries like dpnp or numba-dppy.
print("SYCL runtime is operational via dpctl. Ensure oneAPI environment is sourced.")
else:
print("No SYCL devices found. Ensure intel-sycl-rt is installed, oneAPI environment is sourced, and drivers are correct.")