{"id":23132,"library":"onemkl-sycl-blas","title":"Intel oneMKL SYCL BLAS","description":"Intel oneAPI Math Kernel Library (oneMKL) BLAS routines for SYCL devices. Provides a SYCL implementation of BLAS operations using Intel oneMKL. Current version 2026.0.0; release follows Intel oneAPI release cadence (usually annual).","status":"active","version":"2026.0.0","language":"python","source_language":"en","source_url":"https://github.com/oneapi-src/oneMKL","tags":["blas","sycl","intel","oneapi","linear-algebra","gpu"],"install":[{"cmd":"pip install onemkl-sycl-blas","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"SYCL device management and queue creation","package":"dpctl","optional":false},{"reason":"Array inputs/outputs","package":"numpy","optional":false}],"imports":[{"note":"Direct import from onemkl_sycl_blas may fail; use the underscore-prefixed internal module.","wrong":"from onemkl_sycl_blas import blas","symbol":"blas","correct":"from onemkl._blas import blas"},{"note":"Enums are located in onemkl._blas, not in a separate enums module.","wrong":"from onemkl_sycl_blas.enums import ColumnMajor","symbol":"ColumnMajor, RowMajor","correct":"from onemkl._blas import ColumnMajor, RowMajor"}],"quickstart":{"code":"import dpctl\nimport numpy as np\nfrom onemkl._blas import blas, ColumnMajor\n\n# Create a SYCL queue (use default GPU)\nqueue = dpctl.SyclQueue()\n\n# Prepare matrices (ColumnMajor order required!)\nm, n, k = 4, 4, 4\nalpha = np.float64(1.0)\nbeta = np.float64(0.0)\nA = np.random.rand(m, k).astype(np.float64)\nB = np.random.rand(k, n).astype(np.float64)\nC = np.zeros((m, n), dtype=np.float64)\n\n# Compute C = alpha * A * B + beta * C\nblas.gemm(queue, ColumnMajor, 'N', 'N', m, n, k, alpha, A, m, B, k, beta, C, m)\nprint(C)","lang":"python","description":"Basic GEMM operation using oneMKL SYCL BLAS. Note: matrices must be in column-major order."},"warnings":[{"fix":"Replace `import onemkl_sycl_blas` with `from onemkl._blas import blas`.","message":"v2025.0.0 changed the internal module path from `onemkl_sycl_blas` to `onemkl._blas`. All imports using the old path will fail.","severity":"breaking","affected_versions":">=2025.0.0"},{"fix":"Ensure arrays are column-major (use `np.asfortranarray()`) or transpose correctly.","message":"All BLAS routines expect column-major layout (Fortran order). Passing row-major arrays will produce incorrect results without error.","severity":"gotcha","affected_versions":"all"},{"fix":"Consult the Intel oneMKL documentation for supported routines.","message":"The library does not support all BLAS operations (e.g., SPMV, TRSV). Check documentation before assuming availability.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate from `dpnp` to `numpy` + `dpctl`.","message":"v2024.x and earlier used `dpnp` arrays. `dpnp` is deprecated; use `numpy` arrays with `dpctl` queue instead.","severity":"deprecated","affected_versions":"<2025.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install onemkl-sycl-blas` and use `from onemkl._blas import blas`.","cause":"Package was renamed/restructured in v2025.0.0.","error":"ModuleNotFoundError: No module named 'onemkl_sycl_blas'"},{"fix":"Ensure a SYCL device is available (e.g., `dpctl.lsplatform()` shows devices) and pass a valid queue.","cause":"Using a default queue without a SYCL device (e.g., no GPU or Level Zero runtime).","error":"RuntimeError: Queue must be created with a SYCL device"},{"fix":"Use `np.asfortranarray()` or ensure `order='F'` when creating arrays.","cause":"Array is not in column-major order or is a view.","error":"ValueError: Input array is not contiguous in memory"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}