Skip to content

Fix event dependency bugs and initial displacement initialization - #3072

Merged
antonwolfy merged 5 commits into
masterfrom
fix-depends-and-disp-init
Sep 28, 2026
Merged

antonwolfy merged 5 commits into
masterfrom
fix-depends-and-disp-init

Conversation

@ndgrigorian

@ndgrigorian ndgrigorian commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

This PR fixes bugs in libtensor:

  • copy_for_reshape default-constructed events unnecessarily
  • fill dropped its depends when constructing strides on device
  • Stride simplification did not consistently set initial displacements to 0
  • 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?

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

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

@coveralls

coveralls commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.484% (+0.002%) from 78.482% — fix-depends-and-disp-init into master

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev11=py314ha0e2e8e_9 ran successfully.
Passed: 1376
Failed: 0
Skipped: 6

Comment thread dpnp/tensor/libtensor/source/copy_for_reshape.cpp
The strided kernel of `full` was launched waiting only on the event which copies the packed shape and strides to the device, dropping dependent events passed to the binding

removed unnecessary events added to `copy_for_reshape`

`simplify_iteration_three_strides` and `simplify_iteration_four_strides`
zeroed only `disp1` and `disp2`, which is not the case for other stride simplifications
@ndgrigorian
ndgrigorian force-pushed the fix-depends-and-disp-init branch from cd335ce to fe516a1 Compare September 25, 2026 17:03
antonwolfy and others added 2 commits September 28, 2026 10:43
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ndgrigorian, I have only the small nit with PR number in changelog, for which pushed the fix.

@vlad-perevezentsev, please check if any new comment, otherwise we are ready to merge that PR.

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more comments from my side
LGTM
Thank you @ndgrigorian

@antonwolfy
antonwolfy merged commit 147a64a into master Sep 28, 2026
123 of 125 checks passed
@antonwolfy
antonwolfy deleted the fix-depends-and-disp-init branch September 28, 2026 12:19
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
)

This PR fixes bugs in libtensor:
* `copy_for_reshape` default-constructed events unnecessarily
* `fill` dropped its `depends` when constructing strides on device
* Stride simplification did not consistently set initial displacements
to 0 147a64a
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