Skip to content

Merge master into include-dpctl-tensor#2776

Merged
vlad-perevezentsev merged 19 commits intoinclude-dpctl-tensorfrom
update_tensor_branch
Feb 19, 2026
Merged

Merge master into include-dpctl-tensor#2776
vlad-perevezentsev merged 19 commits intoinclude-dpctl-tensorfrom
update_tensor_branch

Conversation

@vlad-perevezentsev
Copy link
Contributor

This PR synchronizes the include-dpctl-tensor branch with the current master branch

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

antonwolfy and others added 19 commits January 27, 2026 11:57
The PR removes TODO implementation stub for `in1d`, because it was
dropped in NumPy 2.4 release and so no plans to add it to dpnp either.

Also this PR refreshes third party tests with recent updates in the
remote repo.
The PR aligns with recent change in NumPy and adds more clarity on the
description of the `file` positional argument on `dpnp.fromfile`
documentation.
…#2748)

The PR updates GitHub action with testing dpnp conda package.
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
The PR aligns with NumPy 2.4 change and adds support for tuple of
integers passed with `axis` argument in `dpnp.trim_zeros`

- [x] Have you provided a meaningful PR description?
- [x] Have you added a test, reproducer or referred to an issue with a
reproducer?
- [x] Have you tested your changes locally for CPU and GPU devices?
- [x] Have you made sure that new changes do not introduce compiler
warnings?
- [ ] Have you checked performance impact of proposed changes?
- [x] Have you added documentation for your changes, if necessary?
- [x] Have you added your changes to the changelog?
The PR changes implementation of `strides` property in `dpnp.ndarray` to
align with NumPy and CuPy and to return bytes displacement in memory
(previously and in dpctl it returns elements displacement).
…eginf` (#2754)

The PR extends implementation of `dpnp.nan_to_num` function to align
with NumPy and CuPy which supports `nan`, `posinf`, and `neginf`
keywords as any array through broadcasting.

This PR adds handling for a common path where at least one of the
keywords has non-scalar value.
The path does not assume a dedicated SYCL kernel, instead proposes to
rely on implementation through existing python functions. That can be
improved in the future if required.
This PR bumps `anaconda-client` version from 1.14.1 to 1.14.0.

Otherwise the upload step in `Conda package` workflow is failing with:
```bash
Traceback (most recent call last):
  File "/home/runner/miniconda3/envs/upload/bin/anaconda", line 6, in <module>
    from anaconda_cli_base.cli import app
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/site-packages/anaconda_cli_base/cli.py", line 229, in <module>
    load_registered_subcommands(app)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/site-packages/anaconda_cli_base/plugins.py", line 282, in load_registered_subcommands
    subcommand_entry_points = _load_entry_points_for_group(PLUGIN_GROUP_NAME)
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/site-packages/anaconda_cli_base/plugins.py", line 57, in _load_entry_points_for_group
    module: typer.Typer = entry_point.load()
                          ~~~~~~~~~~~~~~~~^^
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/importlib/metadata/__init__.py", line 179, in load
    module = import_module(match.group('module'))
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/upload/lib/python3.13/site-packages/binstar_client/__init__.py", line 16, in <module>
    from pkg_resources import parse_version as pv
ModuleNotFoundError: No module named 'pkg_resources'
```
Due to the latest version `82.0.0` of `setuptools` package is using now
in the env.
This PR introduce the plugin feature to capture and format pytest
warnings to process it in internal CI.
These changes will not add any overhead to existing pytest scope. This
feature can be fully enabled/disabled by env var -
`DPNP_INFRA_WARNINGS_ENABLE`
…2767)

The PR fixes the issue with failing `TestTrimZeros::test_multiple_axes`
test when running on a device without fp64 support.
…2765)

The PR bumps run dependencies on DPC++ compiler and OneMKL packages in
scope of 2026.0 release enabling.

Also it includes the workaround for the CMake compiler issue on Windows,
which has to be removed once the compiler resolve that.
The PR propose to improve implementation and to use `dpnp.sort` call
when
- input array has number of dimensions > 1
- input array has previously not supported integer dtype
- `axis` keyword is passed (previously not supported)
- sequence of `kth` is passed (previously not supported)
In case of `ndim > 1` previously the implementation from legacy backend
was used, which is significantly slow (see performance comparation
below). It used a copy of input data into the shared USM memory and
included computations on the host.

This PR proposes to reuse `dpnp.sort` for all the above cases.
While in case when the legacy implementation is stable and fast (for 1D
input array), it will remain, because it relays on `std::nth_element`
from OneDPL.

The benchmark results were collected on PVC with help of the below code:
```python
import dpnp, numpy as np
from dpnp.tests.helper import generate_random_numpy_array

a = generate_random_numpy_array(10**7, dtype=np.float64, seed_value=117)
ia = dpnp.array(a)
%timeit x = dpnp.partition(ia, 513); x.sycl_queue.wait()
```

Below tables contains data in case of 1D input array (shape=(10**7,)),
where the implementation path was kept the same, plus adding support of
missing integer dtypes using fallback on the sort function:
| Implementation | int32 | uint32 | int64 | uint64 | float32 | float64 |
complex64 | complex128 |

|--------|--------|--------|--------|--------|--------|--------|--------|--------|
| old (legacy backend) | 7.46 ms | not supported | 9.46 ms | not
supported | 7.39 ms | 8.92 ms | 10.9 ms | 21.2 ms |
| new (backend + sort) | 7.34 ms | 10.8 ms | 9.48 ms | 12.5 ms | 7.37 ms
| 8.89 ms | 11 ms | 21.2 ms |

The following code was used for 2D input array with shape=(10**4,
10**4):
```python
import dpnp, numpy as np
from dpnp.tests.helper import generate_random_numpy_array

a = generate_random_numpy_array((10**4, 10**4), dtype=np.float64, seed_value=117)
ia = dpnp.array(a)
%timeit x = dpnp.partition(ia, 1513); x.sycl_queue.wait()
```

In that case the new implementation is fully based on the sort call:
| Implementation | int32 | int64 | float32 | float64 | complex64 |
complex128 |
|--------|--------|--------|--------|--------|--------|--------|
| old (legacy backend) | 6.4 s | 6.89 s | 7.36 s | 7.66 s | 8.61 s | 10
s |
| new (sort) | 57.4 ms | 64.7 ms | 62.2 ms | 68 ms | 77 ms | 151 ms |
There is no real dependency on `onemkl-sycl-stats` package. DPNP doesn't
consume any function from it.
The PR drops the unnecessary run dependency on this oneMKL conda
package.
The PR updates CMakeLists.txt to pull pybind11 `3.0.2` up from `3.0.1`.
On Linux, the DPC++ compiler headers are automatically treated as system
headers. But it is not the case on Windows.
Due to that, there is a ton of deprecation warnings generated inside the
compiler headers when building dpnp extensions on Windows.

This PR updates CMake files of the extensions to add include of DPC++
compiler headers explicitly and to mark the compiler and dpctl headers
as system one to suppress the warning inside them.
@vlad-perevezentsev vlad-perevezentsev self-assigned this Feb 18, 2026
@vlad-perevezentsev vlad-perevezentsev marked this pull request as ready for review February 18, 2026 16:48
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions
Copy link
Contributor

Array API standard conformance tests for dpnp=0.20.0dev3=py313h509198e_6 ran successfully.
Passed: 1354
Failed: 3
Skipped: 7

@vlad-perevezentsev vlad-perevezentsev merged commit 464ddc1 into include-dpctl-tensor Feb 19, 2026
87 of 92 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the update_tensor_branch branch February 19, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments