Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
lapack
✓ from onemkl_sycl_lapack import lapack
✗ import onemkl._onemkl_lapack
Basic LU factorization using onemkl SYCL LAPACK with dpctl for device memory and queue management.
import dpctl
import numpy as np
from onemkl._onemkl_lapack import getrf
# Create a SYCL queue on a GPU (or default device)
queue = dpctl.SyclQueue()
# Allocate matrices as device arrays (dpctl.tensor)
a = np.array([[1., 2.], [3., 4.]], dtype=np.float64)
# Convert to device memory
a_dev = dpctl.tensor.from_numpy(a, queue=queue)
# Perform LU factorization (getrf)
# Note: output arrays are modified in-place
m = a_dev.shape[0]
n = a_dev.shape[1]
pivots = dpctl.tensor.empty(m, dtype=np.int64, queue=queue)
# The function signature: getrf(queue, m, n, a, lda, pivots)
getrf(queue, m, n, a_dev, m, pivots)
print("LU factorization completed on device.")
Debug
Known issues
breakingAll LAPACK routines now require a SYCL queue as the first argument. In older versions, the queue was optional or implicit.fixUpdate calls: `getrf(m, n, a, lda, pivots)` -> `getrf(queue, m, n, a, lda, pivots)`
affects: <=2025.x vs >=2026.0.0
deprecatedDirect import from `onemkl_sycl_lapack` is deprecated. Use `onemkl._onemkl_lapack` or higher-level wrapper.fixChange imports to `from onemkl._onemkl_lapack import ...`
affects: >=2026.0.0
gotchaInput arrays must be device-accessible (dpctl.tensor) not numpy arrays on host. Passing host memory may cause silent errors or segmentation faults.fixUse `dpctl.tensor.from_numpy(numpy_array, queue=queue)` to transfer data to device.
affects: all
gotchaThe LAPACK routines modify input arrays in-place. Be sure to copy data if original is needed later.fixCall `dpctl.tensor.copy(input)` before passing to routine.
affects: all
Upgrade
Version history
2026.0.0latest on PyPI · released Apr 24, 2026
Audit
Dependencies
numpyoptionalArray input/output compatibility
dpctloptionalSYCL device management (required for GPU execution)