Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8e0213d
Remove `in1d` stub from documentation (#2744)
antonwolfy Jan 27, 2026
b910c92
Improve description of `dpnp.fromfile` (#2745)
antonwolfy Jan 27, 2026
869ccb8
Increase timeout to allow to complete Windows tests without rerunning…
antonwolfy Jan 28, 2026
258b3cd
Weekly pre-commit autoupdate (#2750)
github-actions[bot] Jan 31, 2026
d11f5b5
Support tuple of integers for `axis` in `dpnp.trim_zeros` (#2746)
antonwolfy Jan 31, 2026
1f7f4d9
Bump github/codeql-action from 4.31.11 to 4.32.0 (#2751)
dependabot[bot] Feb 1, 2026
f4591e1
Bump github/codeql-action from 4.32.0 to 4.32.2 (#2759)
dependabot[bot] Feb 7, 2026
2f796e0
Align strides with numpy (#2747)
antonwolfy Feb 9, 2026
06a74cd
Extend `nan_to_num` with broadcast support of `nan`, `posinf`, and `n…
antonwolfy Feb 9, 2026
70832ef
Bump `anaconda-client` version to `1.14.1` (#2763)
antonwolfy Feb 10, 2026
af6205f
Add infra pytest warnings plugin (#2757)
vchamarthi Feb 11, 2026
4bc43a9
Bump github/codeql-action from 4.32.2 to 4.32.3 (#2769)
dependabot[bot] Feb 14, 2026
35d88b8
`TestTrimZeros::test_multiple_axes` to pass on a device without fp64 …
antonwolfy Feb 16, 2026
9d6d5a5
Bump max versions in run dependencies on DPC++ compiler and OneMKL (#…
antonwolfy Feb 16, 2026
9c4aed2
Improve `dpnp.partition` implementation (#2766)
antonwolfy Feb 16, 2026
ed23079
Remove unused `onemkl-sycl-stats` run dependency (#2771)
antonwolfy Feb 17, 2026
c73e472
Use Pybind11 `3.0.2` to build dpnp (#2773)
antonwolfy Feb 17, 2026
30f5fd1
Suppress the compiler warnings marking them as external (#2770)
antonwolfy Feb 17, 2026
b69ffb3
Merge master into include-dpctl-tensor
vlad-perevezentsev Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
test-env-name: 'test'
rerun-tests-on-failure: 'true'
rerun-tests-max-attempts: 2
rerun-tests-timeout: 40
rerun-tests-timeout: 45

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ repos:
hooks:
- id: actionlint
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.25.1
rev: 0.25.4
hooks:
- id: gersemi
exclude: "dpnp/backend/cmake/Modules/"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* Updated `dpnp.fix` to reuse `dpnp.trunc` internally [#2722](https://github.com/IntelPython/dpnp/pull/2722)
* Changed the build scripts and documentation due to `python setup.py develop` deprecation notice [#2716](https://github.com/IntelPython/dpnp/pull/2716)
* Clarified behavior on repeated `axes` in `dpnp.tensordot` and `dpnp.linalg.tensordot` functions [#2733](https://github.com/IntelPython/dpnp/pull/2733)
* Improved documentation of `file` argument in `dpnp.fromfile` [#2745](https://github.com/IntelPython/dpnp/pull/2745)
* Aligned `dpnp.trim_zeros` with NumPy 2.4 to support a tuple of integers passed with `axis` keyword [#2746](https://github.com/IntelPython/dpnp/pull/2746)
* Aligned `strides` property of `dpnp.ndarray` with NumPy and CuPy implementations [#2747](https://github.com/IntelPython/dpnp/pull/2747)
* Extended `dpnp.nan_to_num` to support broadcasting of `nan`, `posinf`, and `neginf` keywords [#2754](https://github.com/IntelPython/dpnp/pull/2754)
* Changed `dpnp.partition` implementation to reuse `dpnp.sort` where it brings the performance benefit [#2766](https://github.com/IntelPython/dpnp/pull/2766)
* `dpnp` uses pybind11 3.0.2 [#27734](https://github.com/IntelPython/dpnp/pull/2773)
* Modified CMake files for the extension to explicitly mark DPC++ compiler and dpctl headers as system ones and so to suppress the build warning generated inside them [#2770](https://github.com/IntelPython/dpnp/pull/2770)

### Deprecated

Expand All @@ -59,6 +66,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* Removed the obsolete interface from DPNP to Numba JIT [#2647](https://github.com/IntelPython/dpnp/pull/2647)
* Removed the `newshape` parameter from `dpnp.reshape`, which has been deprecated since dpnp 0.17.0. Pass it positionally or use `shape=` on newer versions [#2670](https://github.com/IntelPython/dpnp/pull/2670)
* Removed unused `pytest` configuration from `pyproject.toml` [#2729](https://github.com/IntelPython/dpnp/pull/2729)
* Dropped a conda run dependency on `onemkl-sycl-stats` package [#2771](https://github.com/IntelPython/dpnp/pull/2771)

### Fixed

Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
# 8. Paths stored in the CMake System Package Registry
# 9. Paths specified by the PATHS option (assumed hard-coded guesses)
set(path_to_cmake_dir ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules)
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
# TODO: use the commented logic once the compiler resolves CMake issue CMPLRLLVM-73484
# find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir})
find_package(IntelSYCL QUIET)
if(SYCL_LIBRARY_FOUND)
find_package(IntelSYCL REQUIRED)
else()
# compiler CMake might have an issue and can't find SYCL_LIBRARY properly
# then use vendored CMake with fixed logic
find_package(IntelSYCL REQUIRED PATHS ${path_to_cmake_dir} NO_DEFAULT_PATH)
endif()
find_package(TBB REQUIRED PATHS ${path_to_cmake_dir})

set(MKL_ARCH "intel64")
Expand All @@ -86,8 +95,8 @@ find_package(Python 3.10...<3.15 REQUIRED COMPONENTS Development.Module NumPy)
include(FetchContent)
FetchContent_Declare(
pybind11
URL https://github.com/pybind/pybind11/archive/refs/tags/v3.0.1.tar.gz
URL_HASH SHA256=741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca
URL https://github.com/pybind/pybind11/archive/refs/tags/v3.0.2.tar.gz
URL_HASH SHA256=2f20a0af0b921815e0e169ea7fec63909869323581b89d7de1553468553f6a2d
FIND_PACKAGE_ARGS NAMES pybind11
)
FetchContent_MakeAvailable(pybind11)
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if DEFINED OVERRIDE_INTEL_IPO (
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
)

FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21) DO @(
FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21 22.0.0 22) DO @(
REM set DIR_HINT if directory exists
IF EXIST "%BUILD_PREFIX%\Library\lib\clang\%%V\" (
set "SYCL_INCLUDE_DIR_HINT=%BUILD_PREFIX%\Library\lib\clang\%%V"
Expand Down
3 changes: 1 addition & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2027.0a0") %}
{% set required_compiler_and_mkl_version = "2025.0" %}
{% set required_dpctl_version = "0.22.0*" %}

Expand Down Expand Up @@ -49,7 +49,6 @@ requirements:
- {{ pin_compatible('onemkl-sycl-dft', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('onemkl-sycl-lapack', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('onemkl-sycl-rng', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('onemkl-sycl-stats', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('onemkl-sycl-vm', min_pin='x.x', max_pin='x') }}
- numpy
- intel-gpu-ocl-icd-system
Expand Down
1 change: 0 additions & 1 deletion doc/reference/set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Boolean operations
:toctree: generated/
:nosignatures:

in1d
intersect1d
isin
setdiff1d
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ if(SYCL_COMPILER)
)
#TODO Make an input file to configure and update the lib current version
if(WIN32)
set(sycl_lib_suffix "8")
set(sycl_lib_suffix "9")
else()
set(sycl_lib_suffix "")
endif()
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/blas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/fft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/indexing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
13 changes: 12 additions & 1 deletion dpnp/backend/extensions/lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ set_target_properties(
PROPERTIES CMAKE_POSITION_INDEPENDENT_CODE ON
)

target_include_directories(
${python_module_name}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../common
)

target_include_directories(
${python_module_name}
PRIVATE
Expand All @@ -88,7 +93,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/statistics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/ufunc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(_dpnp_sycl_targets)
# make fat binary
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
8 changes: 7 additions & 1 deletion dpnp/backend/extensions/window/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/dpnp/backend/include
${CMAKE_SOURCE_DIR}/dpctl/tensor/libtensor/include
)
target_include_directories(${python_module_name} PUBLIC ${Dpctl_INCLUDE_DIR})

# treat below headers as system to suppress the warnings there during the build
target_include_directories(
${python_module_name}
SYSTEM
PRIVATE ${SYCL_INCLUDE_DIR} ${Dpctl_INCLUDE_DIRS} ${Dpctl_TENSOR_INCLUDE_DIR}
)

if(WIN32)
target_compile_options(
Expand Down
89 changes: 13 additions & 76 deletions dpnp/backend/kernels/dpnp_krnl_sorting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,90 +70,27 @@ DPCTLSyclEventRef dpnp_partition_c(DPCTLSyclQueueRef q_ref,

sycl::queue q = *(reinterpret_cast<sycl::queue *>(q_ref));

if (ndim == 1) // 1d array with C-contiguous data
{
_DataType *arr = static_cast<_DataType *>(array1_in);
_DataType *result = static_cast<_DataType *>(result1);
_DataType *arr = static_cast<_DataType *>(array1_in);
_DataType *result = static_cast<_DataType *>(result1);

auto policy = oneapi::dpl::execution::make_device_policy<
dpnp_partition_c_kernel<_DataType>>(q);
auto policy = oneapi::dpl::execution::make_device_policy<
dpnp_partition_c_kernel<_DataType>>(q);

// fill the result array with data from input one
q.memcpy(result, arr, size * sizeof(_DataType)).wait();
// fill the result array with data from input one
q.memcpy(result, arr, size * sizeof(_DataType)).wait();

// make a partial sorting such that:
// note, a loop for a multidemension input array (size_ > 1) is an
// experimental and it isn't tested properly as for now
for (size_t i = 0; i < size_; i++) {
_DataType *bufptr = result + i * shape_[0];

// for every slice it makes a partial sorting such that:
// 1. result[0 <= i < kth] <= result[kth]
// 2. result[kth <= i < size] >= result[kth]
// event-blocking call, no need for wait()
std::nth_element(policy, result, result + kth, result + size,
std::nth_element(policy, bufptr, bufptr + kth, bufptr + size,
dpnp_less_comp());
return event_ref;
}

DPNPC_ptr_adapter<_DataType> input1_ptr(q_ref, array1_in, size, true);
DPNPC_ptr_adapter<_DataType> input2_ptr(q_ref, array2_in, size, true);
DPNPC_ptr_adapter<_DataType> result1_ptr(q_ref, result1, size, true, true);
_DataType *arr = input1_ptr.get_ptr();
_DataType *arr2 = input2_ptr.get_ptr();
_DataType *result = result1_ptr.get_ptr();

auto arr_to_result_event = q.memcpy(result, arr, size * sizeof(_DataType));
arr_to_result_event.wait();

_DataType *matrix = new _DataType[shape_[ndim - 1]];

for (size_t i = 0; i < size_; ++i) {
size_t ind_begin = i * shape_[ndim - 1];
size_t ind_end = (i + 1) * shape_[ndim - 1] - 1;

for (size_t j = ind_begin; j < ind_end + 1; ++j) {
size_t ind = j - ind_begin;
matrix[ind] = arr2[j];
}
std::partial_sort(matrix, matrix + shape_[ndim - 1],
matrix + shape_[ndim - 1], dpnp_less_comp());
for (size_t j = ind_begin; j < ind_end + 1; ++j) {
size_t ind = j - ind_begin;
arr2[j] = matrix[ind];
}
}

shape_elem_type *shape = reinterpret_cast<shape_elem_type *>(
sycl::malloc_shared(ndim * sizeof(shape_elem_type), q));
auto memcpy_event = q.memcpy(shape, shape_, ndim * sizeof(shape_elem_type));

memcpy_event.wait();

sycl::range<2> gws(size_, kth + 1);
auto kernel_parallel_for_func = [=](sycl::id<2> global_id) {
size_t j = global_id[0];
size_t k = global_id[1];

_DataType val = arr2[j * shape[ndim - 1] + k];

for (size_t i = 0; i < static_cast<size_t>(shape[ndim - 1]); ++i) {
if (result[j * shape[ndim - 1] + i] == val) {
_DataType change_val1 = result[j * shape[ndim - 1] + i];
_DataType change_val2 = result[j * shape[ndim - 1] + k];
result[j * shape[ndim - 1] + k] = change_val1;
result[j * shape[ndim - 1] + i] = change_val2;
}
}
};

auto kernel_func = [&](sycl::handler &cgh) {
cgh.depends_on({memcpy_event});
cgh.parallel_for<class dpnp_partition_c_kernel<_DataType>>(
gws, kernel_parallel_for_func);
};

auto event = q.submit(kernel_func);

event.wait();

delete[] matrix;
sycl::free(shape, q);

return event_ref;
}

Expand Down
Loading
Loading