Skip to content

Merge master into include-dpctl-tensor#2843

Open
vlad-perevezentsev wants to merge 36 commits intoinclude-dpctl-tensorfrom
update-include-dpctl-tensor
Open

Merge master into include-dpctl-tensor#2843
vlad-perevezentsev wants to merge 36 commits intoinclude-dpctl-tensorfrom
update-include-dpctl-tensor

Conversation

@vlad-perevezentsev
Copy link
Copy Markdown
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?

dependabot bot and others added 30 commits February 24, 2026 10:03
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
The PR updates marks observing `RuntimeWarning` as expected to suppress
them.
Also the PR update DLPack tests to avoid raising the warning in SYCL
queue relating tests.
This PR adds `dpnp.scipy.linalg.lu()` with support for all three output
modes: default `(P, L, U)`, `permute_l=True (PL, U)`, and
`p_indices=True` `(p, L, U)`, including batched inputs.

Fixes: #2786
This PR updates the code to consistently use the `dpnp.exceptions`
module as the single source of the exceptions where it's applicable.
This PR implements few improvements for LU function in
`dpnp.scipy.linalg` namespace:
* resolved issue with `Returns` section formatting in `lu` function
* changed to proper `func:` role for the functions cross-references in
`See also` section
* used `Warnings` section name instead of `Warning`
* changed `{None, bool}` to `bool` for overwrite_a, check_finite, and
overwrite_b parameters
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
This PR follows up #2792 and marks one more `RuntimeWarning` warning as
expected due to possible overflow.
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
…ration (#2813)

## Summary

- Migrate clang-format from `pocc/pre-commit-hooks` to
`pre-commit/mirrors-clang-format` v22.1.0
- Update `.clang-format` config to maintain consistent code style across
versions
- Configure pylint to properly handle C extension modules (numpy, dpctl)
- Remove manual clang-format-12 installation from GitHub workflow
- Reformat all C++ files with clang-format v22
- Add reformatting commit to `.git-blame-ignore-revs`

## Changes

### Pre-commit configuration
- Switch to `pre-commit/mirrors-clang-format` (v22.1.0) for better
version pinning and consistency across environments
- Add `--disable=c-extension-no-member` to pylint to avoid false
positives on C extension objects

### Code style
- Update `.clang-format`: Set `AfterControlStatement: Never` to preserve
existing brace placement style
- Reformat all C++ source files with clang-format v22 (net -159 lines
due to template parameter formatting improvements)

### Pylint configuration
- Add `extension-pkg-allow-list = ["numpy"]` to help pylint understand
numpy better
- Add `generated-members` patterns to handle dynamically created
attributes on numpy types

### CI/CD
- Remove obsolete `apt-get install clang-format-12` step from pre-commit
workflow
…2812)

The `create_data()` function had an early return when `usm_data` was
already a dpnp memory class instance, which skipped setting the `ptr`
attribute. This caused all array views to report the same base pointer,
making `arr[0].data.ptr == arr[1].data.ptr` even though they point to
different memory locations.

The PR proposes a fix ensuring `ptr` is always set to `x._pointer`,
which points to the start of the array's data (including any offset for
views), rather than `usm_data._pointer` which points to the base buffer.

Additionally, always create a new memory wrapper instance to avoid
shared state when the same `usm_data` is used for multiple views.

This PR closes #2781.

- [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?
- [ ] Have you added documentation for your changes, if necessary?
- [x] Have you added your changes to the changelog?
Previously `dpnp.diagonal()` returned incorrect strides when the
diagonal was empty (e.g., when offset >= array width). The stride was
set to itemsize instead of the correct `st_n + st_m`.

This PR:
* fixes stride calculation to consistently use (st_n + st_m)
* simplifies implementation using unified formula to calculate resulting
shape, strides, and offset
* extends tests coverage including scenarios with empty diagonals,
views, and non-contiguous arrays

The PR closes #2761.
This PR proposes updating QR tests to avoid direct element-wise
comparisons which became unstable with oneMKL 2026.0 due to sign and
phase differences in otherwise valid QR results

Since QR factorization is not unique, different MKL and NumPy versions
may return results that differ by sign or complex phase while still
representing a correct decomposition

To make the tests more stable this PR proposes using invariant-based
validation for `mode="raw"` and `mode="r"` based on the unitarity of the
Q factor (Q^H Q = I) and the resulting QR identity
R^H @ R = A^H @ A
This PR moves all SYCL kernel functors from extensions/ to kernels/
directory, improving the project structure.

Moved kernels:
- statistics: histogram, sliding_window1d functors
- indexing: choose functor
- window: bartlett, blackman, hamming, hanning, kaiser functors

The PR also improves the code coverage report, since the SYCL kernels
can be easy excluded from the report now.
The PR adds ndarray subclassing support via `ndarray.view()` method.

It implements the `type` parameter in `dpnp.ndarray.view()` to enable
custom subclasses, matching NumPy/CuPy behavior. Also includes proper
`__array_finalize__` hook invocation for metadata propagation.

The implementation is done through `_view_impl()` helper using
'array_class' parameter to avoid shadowing builtin 'type'.
The tests scope is extended with new 7 tests for verifying subclassing
support and enabling `TestSubclassArrayView` class from third party
tests.

This PR closes #2764.
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
This PR fixes test failures when testing with
`DPNP_TEST_ALL_INT_TYPES=1` against conda-forge's NumPy, where float16
precision is used in various scenarios requiring relaxed tolerances.
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
The PR updates CMakeLists.txt to bump pybind11 `3.0.3` up from `3.0.2`
version.
This PR ensures that default dtype selection respects device-specific
capabilities across multiple functions.

The PR includes changes:
- `dpnp.identity`: Remove redundant default dtype handling. The function
now delegates dtype resolution to dpnp.eye(), which already handles
device-aware default types correctly.
- `dpnp.gradient`: Pass sycl_queue parameter to default_float_type()
calls to ensure the selected float type is compatible with the device
where the array resides. This prevents issues when converting integer
arrays on devices with different dtype support.

The PR also updates SYCL queue tests to fix the parametrization to
generate device-dtype pairs using a new get_all_dev_dtypes() helper.
Each device is now tested only with dtypes it actually supports (e.g.,
devices without fp64 support won't test fp64), preventing false failures
and unnecessary test combinations.
dependabot bot and others added 5 commits April 7, 2026 17:10
This PR updates the `.pre-commit-config.yaml` using `pre-commit
autoupdate`.
The PR updates `conda-index` version to `0.10.0`.
@vlad-perevezentsev vlad-perevezentsev changed the title Update include dpctl tensor Merge master into include-dpctl-tensor Apr 10, 2026
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.

3 participants