Intel® oneAPI Unified Runtime Libraries
The Intel® oneAPI Unified Runtime Libraries (`intel-cmplr-lib-ur`) package contains shared common libraries essential for providing a unified interface to device-agnostic runtimes like DPC++ across various software platforms. It is a foundational component within the Intel oneAPI ecosystem, often installed alongside common licensing and compiler-specific runtimes. The current version is 2025.3.3, with a rapid release cadence, indicating frequent updates.
Warnings
- breaking The package (and related oneAPI components) has been flagged for security concerns, specifically the 'Presence of code relocations indicates that the code segment might temporarily, at one point, become both writable and executable. That violates security policies adopted by most modern Linux distributions.' This could allow an attacker to overwrite code with a malicious program during this brief period.
- gotcha Installing patch updates for stand-alone performance libraries (e.g., IPP or MKL) over an Intel oneAPI Base Toolkit installation can unintentionally remove compilers (like dpcpp and Fortran) and other performance libraries, especially on Linux and Windows.
- gotcha Dependency conflicts can arise between oneAPI runtime components. For instance, `intel-sycl-rt` might require a specific older version of `intel-cmplr-lib-ur`, which can lead to installation failures in complex environments like PyTorch builds.
Install
-
pip install intel-cmplr-lib-ur
Imports
- None (backend library)
This library primarily provides underlying shared C/C++ libraries. Direct end-user Python imports (e.g., `import intel_cmplr_lib_ur`) are not common as it serves as a backend dependency for other oneAPI Python bindings and compilers (e.g., `dpctl`).
Quickstart
# This package provides underlying runtime libraries.
# It's primarily a dependency for other oneAPI Python libraries or C/C++ applications.
# For example, to use oneAPI accelerated NumPy-like arrays via dpnp (which depends on underlying oneAPI runtimes):
# Ensure intel-cmplr-lib-ur is installed (usually via 'pip install intel-cmplr-lib-ur')
# Then, install higher-level Python bindings like dpnp or dpctl:
# pip install dpnp dpctl
import dpnp as np
import dpctl
# Select a SYCL-enabled device (e.g., GPU if available, otherwise CPU)
try:
queue = dpctl.SyclQueue('gpu')
print("Running on GPU.")
except dpctl.SyclQueueError:
queue = dpctl.SyclQueue('cpu')
print("Running on CPU.")
a = np.asarray([1.0, 2.0, 3.0], sycl_queue=queue)
b = np.asarray([4.0, 5.0, 6.0], sycl_queue=queue)
c = a + b
print(f"Result of a + b on {queue.device.name}: {c}")