Repository navigation
Overview
The highlight of this release: dpnp achieves 100% compliance with the Python array API specification (revision 2025.12).
This release introduces the dpnp.scipy.sparse namespace with a csr_matrix class and the cg, gmres and minres iterative solvers in dpnp.scipy.sparse.linalg.
This release adds support for Python 3.15 and for free-threaded Python builds.
This release is compatible with NumPy 2.5.4.
To align with NumPy 2.5 and the Python array API, dpnp.meshgrid, dpnp.broadcast_arrays, dpnp.atleast_1d, dpnp.atleast_2d, dpnp.atleast_3d and dpnp.ogrid now return a tuple instead of a list, and dpnp.row_stack and the support for 2-element vectors in dpnp.cross are removed.
This release requires DPC++ compiler 2026.1.1 or newer and dpctl 0.23.0 or newer.
Detailed Changes
Added
- Added C API functions for
dpnp.tensor.usm_ndarraysetters and getters to avoid ABI breakage ifdpnp.tensor.usm_ndarrayis modified #2866 - Added support for buffer protocol objects as advanced index keys in
dpnp.ndarray#2889 - Added
--includesand--include-diroptions to thedpnpCLI #2916 - Added
dpnp-config.cmaketo makefind_package(Dpnp)work out of the box, and an example which uses it #2941 - Added implementation of
dpnp.lib.stride_tricks.as_strided#2991 - Added
dpnp.tensor.broadcast_shapesto align with the 2025.12 version of the Python array API #3009 - Added support for free-threaded Python builds #3026
- Added the
dpnp.scipy.sparsenamespace withdpnp.scipy.sparse.csr_matrixanddpnp.scipy.sparse.issparse, and implementation ofdpnp.scipy.sparse.linalg.LinearOperator,dpnp.scipy.sparse.linalg.aslinearoperator,dpnp.scipy.sparse.linalg.cg,dpnp.scipy.sparse.linalg.gmresanddpnp.scipy.sparse.linalg.minres#2841 - Added
dpnp.broadcastclass implementation #2901 - Added the
ndmaxkeyword todpnp.arrayfor compatibility with NumPy #3044 - Added
UsmNDArray_RemoveQueueRefC API function to release a queue reference obtained fromUsmNDArray_GetQueueRef#3042 - Added a
rattler-build-compatible conda recipe (conda-recipe/rattler_recipe.yaml) alongside the existingconda-buildrecipe #3031 - Added support for the
"nuc"(nuclear) norm indpnp.linalg.cond#3084 - Added support for Python 3.15 #3098
Changed
- Changed
dpnp.meshgridanddpnp.tensor.meshgridto return a tuple instead of a list, aligning with NumPy 2.5+ behavior and 2025.12 version of the Python array API standard #2854 - Updated
searchsortedimplementations to align with the 2025.12 array API spec #2902 - Updated tests to align with NumPy 2.4.5 compatibility #2920
- Replaced
.pxiincludes indpnp.tensorwith modular.pxd/.pyxCython imports #2913 - Reimplemented
dpnp.eyeanddpnp.tensor.eyewith a branchless kernel #2937 - Cleaned up Python bindings for indexing functions, renaming
usm_ndarray_takeandusm_ndarray_puttopy_takeandpy_putand refactoring validation #2935 - Updated
dpnp.linalg.eiganddpnp.linalg.eigvalsdocumentation to reflect NumPy's always-complex eigenvalue output for general matrices #2953 - Clarified support for negative axes in
dpnp.transpose/dpnp.permute_dimsdocumentation #2940 - Allowed
dpnp.takeanddpnp.compressto cast the result into anoutarray of a different but same-kind dtype #2959 - Clarified the summary in
dpnp.reshapeanddpnp.ndarray.reshapedocstrings #2964 - Changed
dpnp.atleast_1d,dpnp.atleast_2d,dpnp.atleast_3d, anddpnp.ogridto return a tuple of arrays instead of a list #2965 - Improved performance of
dpnp.fftfunctions for complex strided input by avoiding oversized allocations and extra copies #2939 - Refreshed
dpnpdocumentation styling with the Furo theme #2934 - Switched the API reference rendering in the documentation from
sphinx.ext.napoleontonumpydoc#3059 - Updated Python Array API specification version supported to
2025.12#2899 - Replaced references to the
dpnp.amax/dpnp.aminaliases with the canonicaldpnp.max/dpnp.minin docstrings and code internally #2990 - Aligned the signature of
dpnp.tensor.expand_dimswith the Python array API by makingaxisa required argument #2988 - Removed dead code branches guarded by outdated oneMKL and DPC++ compiler version checks #2999
- Replaced the deprecated
nd_item::barrier()member calls in theaccumulatorsandgemmkernels with the SYCL 2020sycl::group_barrier()free function #3006 - Changed
dpnp.broadcast_arraysanddpnp.tensor.broadcast_arraysto return a tuple instead of a list, aligning with the 2025.12 Python array API spec #2944 - Bumped the default minimum required DPC++ compiler version to
2026.1.1and migrated to the OpenCL ICD loader from the conda-forgeocl-icd-system(Linux) andkhronos-opencl-icd-loader(Windows) packages #2905 - Bumped the minimum required
dpctlversion to0.23.0#2948 - Linked the
dpnp_backend_clibrary against only the MKL SYCL domains it uses (BLAS,RNG,VM) #3012 dpnpuses pybind11 3.1.0 #3015- Reworked the ASV benchmarks and added end-to-end workload benchmarks derived from dpBench #2996
- Stopped timing NumPy in the ASV benchmarks, which now measure only dpnp #3095
- Reduced allocations in
dpnp.linalg.normby reusing the reduction result as thesqrtoutput buffer in the 2-norm and Frobenius-norm branches #3062 - Changed
dpnp.tensor.top_kwithmode="largest"to no longer returnNaNvalues (or complex values with aNaNcomponent) ahead of finite values, matching theNaN-last order ofdpnp.tensor.sort#3066 - Avoided a copy of
dpnp.einsumresult into C-order by building the product in the requested layout directly #3069 - Updated the implementation of
dpnp.putmaskby adding dedicated contiguous and strided SYCL kernels #3014 - Changed
dpnp.sort,dpnp.argsort, and theirdpnp.ndarray/dpnp.tensorcounterparts to placeNaNvalues last instead of first when sorting in descending order #3066 - Documented and made explicit support for
copy=None("copy only if needed") indpnp.nan_to_num#3083 - Changed
dpnp.linalg.pinvto compute the default tolerance from the machine epsilon of the data type used for the computation, and to return a floating-point result for an empty integer or boolean array #3090 - Avoided a full-size copy of a broadcast input in
dpnp.nansum,dpnp.nanprod,dpnp.nancumsumanddpnp.nancumprodby replacingNaNvalues only in the distinct elements of the input #3108
Deprecated
- Deprecated setting the shape via the
shapeattribute ofdpnp.ndarrayanddpnp.tensor.usm_ndarray. Usedpnp.reshape/dpnp.tensor.reshape(or thereshapemethod) instead #2967 - Deprecated
dpnp.config.__DPNP_QUEUE_GPU__,dpnp.config.__DPNP_OUTPUT_NUMPY__anddpnp.config.__DPNP_OUTPUT_DPCTL_DEFAULT_SHARED__, which have no effect; reading or setting them now emits aDeprecationWarning#3107
Removed
- Removed support for arrays of 2-element vectors in
dpnp.cross, which now requires (arrays of) 3-element vectors and raisesValueErrorotherwise #2950 - Removed
dpnp.row_stackin favor ofdpnp.vstack#2957 - Removed all references to the unimplemented
dpnp.ndarray.resizemethod from the documentation #2989 - Removed an obsolete oneAPI 2021.x workaround from the Windows conda build script that manually prepended
BUILD_PREFIXpaths onto theLIBandINCLUDE#3013
Fixed
- Fixed a crash at process exit on Windows when
dpnpis built with oneMKL 2026.0, caused by the destructor of the oneMKLmt19937random number engine running while the library is being unloaded #2871 - Fixed incorrect in-place advanced indexing for 4D arrays when using
rangeorlistas index keys #2872 - Fixed
conda buildcommand syntax in GitHub workflows and documentation to useconda-build#2888 - Fixed incorrect
dpnp.tensor.acoshresult forcomplex(±0, NaN)special case to match the Python Array API specification #2914 - Fixed fork PR documentation workflow failures by implementing conditional publishing strategy: upstream PRs publish to GitHub Pages with comment, fork PRs upload artifacts #2910
- Fixed missing
libtensorheaders in the installeddpnppackage #2915 - Fixed boolean mask indexing to raise
IndexErrorwhen mask dimensions don't match the indexed array dimensions, aligning with NumPy behavior. Previously, incompatible boolean masks silently returned incorrect results instead of raising an error #2929 - Fixed a bug in
astypewhere casting floating point types to unsigned integral types could cause an intermediate signed integral type to overflow, leading to incorrect results #2930 - Fixed incorrect
dpnp.tensor.expm1result forcomplex(±0, 0)special case on CPU to match the Python Array API specification #2926 - Fixed tests which expected lists from
dpctlfunctions which now return tuples (i.e.,dpctl.SyclDevice.create_sub_devices) #2945 - Fixed
PytestRemovedIn10Warningraised bypytest9.1.0 by converting class-scoped fixtures to class methods #2952 - Fixed
dpnp.linalg.svd(..., hermitian=True)returning a non-unitaryvhfor singular input arrays due to a zero sign appearing #2954 - Fixed scalar conversion of size-one
dpnp.tensor.usm_ndarray(e.g.int(),float(), indexing) which failed with NumPy 2.5 after the in-placendarray.shapeassignment was deprecated #2958 - Fixed
dpnp.mgridanddpnp.ogridto return consistent results between single-slice and tuple-of-slices syntax when the step is a complex number with a non-integer magnitude (e.g.2.5j) #2971 - Fixed
icx/icpxwarning duringconda buildby stripping the GCC-only-fno-merge-constantsflag injected by conda-forge intoCFLAGS/CXXFLAGS#2978 - Fixed
dpnp.asnumpyanddpnp.ndarray.asnumpyignoring theorderkeyword, which caused a non-contiguous source array to be returned with a non-contiguous layout even whenorder="C"was requested #2980 - Fixed a flood of deprecation warnings from the DPC++/SYCL headers when building
dpnp.tensoron Windows #2993 - Fixed
dpnp.tensor.acoshanddpnp.tensor.acosreturning infinity for complex numbers with large negative real parts #2928 - Fixed
__array_namespace_info__().devices()and.default_device()to return Python array API compatible device objects #2979 - Fixed
dpnp.interpwith an empty input arrayxto return an empty array with the correct dtype #2985 - Fixed
dpnp.interpreturningnanwhen querying at an exact knot point whose adjacentfpvalue isinf#2986 - Fixed missing strides validation in
dpnp.tensor.usm_ndarrayconstructor when allocating new memory #2927 - Fixed
dpnp.bincountraising aValueErroron an empty input array instead of returning an emptyintparray #3018 - Fixed
dpnp.tensor.top_kaborting fork=0by returning empty result arrays without launching a zero-sized kernel #3022 - Fixed comparison functions (
dpnp.equal,dpnp.not_equal,dpnp.less,dpnp.less_equal,dpnp.greater,dpnp.greater_equal) anddpnp.divideraisingOverflowErrorwhen comparing an integer array against a Python integer scalar outside the array dtype's range #3017 - Fixed a crash in boolean-mask advanced indexing (
dpnp.ndarrayget/set item) when the selection is empty (e.g. a scalarFalseindex that injects a length-0 axis) #3019 - Released the GIL before the remaining blocking OneMKL BLAS and LAPACK calls to prevent host tasks contention, completing the work started in #2850 #3027
- Fixed
dpnp.repeatraising an unclearTypeErrorfor a nested sequence ofrepeats#3024 - Fixed
dpnp.ndarray.viewignoring the USM element offset of a sliced array, which also causeddpnp.einsumto silently return wrong results for a single sliced operand with no summed index #3037 - Fixed
dpnp.allanddpnp.anyaborting when reducing over an empty axis (e.g. an array with a zero-length dimension) #3021 - Released the GIL before the blocking OneMKL DFT calls in the FFT extension #3040
- Fixed
astypecasting an out-of-range floating point value to a signed narrow integer type saturating to the destination min/max instead of wrapping like NumPy, generalizing the earlier unsigned-only fix #3033 - Fixed
dpnp.insertsilently ignoring out-of-bounds negative indices in a multi-elementobj, so a mix of in-bounds and out-of-bounds indices now consistently raisesIndexError#3041 - Fixed a per-call
sycl::queueleak inusm_ndarray::get_queue()/get_device()#3042 - Fixed
dpnp.linspacereturningnanfor equal infinite endpoints #3043 - Fixed
dpnp.cumsum,dpnp.cumprod, and theirnan/cumulative_*variants (includingdpnp.tensor.cumulative_sum/cumulative_prod) silently returning incorrect results when accumulating along an axis of an array with more than one row #3063 - Fixed
dpnp.einsumreturning a result whose memory layout differs from NumPy for the defaultorder="K", and ignoringoutandorderfor a contraction over a size-0 dimension #3058 - Fixed operations on a boolean array whose bytes are not
0x00/0x01#3055 - Fixed the
dpnp.ndarrayconstructor returning a view at the wrong address #3068 - Fixed the strided kernel of
dpnp.fullanddpnp.tensor.fullnot waiting on the events passed to the binding #3072 - Fixed the list of events the copy kernels of
dpnp.reshape,dpnp.tensor.reshape,dpnp.rollanddpnp.tensor.rollwait on being padded with default-constructed events #3072 - Fixed
simplify_iteration_three_stridesandsimplify_iteration_four_stridesaccumulating into their third and fourth output displacements without zeroing them first, which required the caller to initialize them #3072 - Fixed
dpnp.ndarray.flatindexing and assignment edge cases, adding support for slices, ellipsis, and integer/boolean array indices #3045 - Fixed
dpnp.nanmediandropping kept dimensions of size 1, which produced a wrong result shape #3081 - Fixed incorrect results of
dpnp.tensor.vecdotin some cases with strided outputs and ofdpnp.tensorreductions,dpnp.tensor.vecdotanddpnp.tensor.matmulon large inputs with some data types #3082 - Fixed
dpnp.mediananddpnp.nanmedianraising aValueErrorfor a tupleaxiswhen a kept dimension has size 0 #3081 - Fixed a
RuntimeErrorraised bydpnp.tensorkernels launched over more thanINT_MAXwork-items when built with DPC++ compiler 2026.2 or newer, by also passing-fno-sycl-id-queries-fit-in-intto the linker #3089 - Fixed
dpnp.__all__missingndarrayand__array_namespace_info__and listingmean,medianandmintwice #3100 - Fixed
dpnp.repeatanddpnp.tensor.repeatsilently returning wrong results foruint64repeats above theint64maximum #3115 - Fixed importing
dpnp.scipy.sparsere-enabling the GIL on free-threaded Python builds, because its pybind11 extension did not declare free-threading support #3101 - Fixed the CuPy-based
dpnp.scipytests underdpnp/tests/third_party/cupyx/scipy_tests/missing from thedpnppackage, so they never ran against an installed package #3102 - Fixed a
RuntimeErrorraised by kernels of theblas,statistics,ufuncandwindowextensions and of the legacy backend launched over more thanINT_MAXwork-items when built with DPC++ compiler 2026.2 or newer #3104 - Fixed the Linux conda build producing a wheel with an invalid
manylinux___x86_64platform tag when thecondaCLI is not onPATH#3126
Contributors
- Abhishek Bagusetty (@abagusetty)
- Anton Volkov (@antonwolfy)
- Evseniia Komarova (@ekomarova)
- Jordan Harlow (@jharlow-intel)
- Nikita Grigorian (@ndgrigorian)
- Vahid Tavanashad (@vtavana)
- Vladislav Perevezentsev (@vlad-perevezentsev)
Full Changelog: 0.20.0...0.21.0