Skip to content

Fixes bug in boxing a DpnpNdArray from parent. #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

diptorupd
Copy link
Contributor

  • Have you provided a meaningful PR description?
    • When boxing a dpnp.ndarray using the reference of the parent
      stored during unboxing, there is a validation step on the strides.
      However, as a dpnp.ndarray object does not store any stride
      information when an array is unit strided the strides need to be
      calculated and validated against the strides in the Numba
      usmarraystruct object.

      The PR fixes the stride calculation that was previously done
      incorrectly.

  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@diptorupd diptorupd requested a review from ZzEeKkAa October 3, 2023 15:29
Copy link
Contributor

@ZzEeKkAa ZzEeKkAa left a comment

Choose a reason for hiding this comment

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

LGTM

@diptorupd diptorupd force-pushed the fix/boxing_dpnpndarray_from_parent branch 2 times, most recently from 592ea61 to a81927d Compare October 3, 2023 15:58
    - When boxing a dpnp.ndarray using the reference of the parent
      stored during unboxing, there is a validation step on the strides.
      However, as a dpnp.ndarray object does not store any stride
      information when an array is unit strided the strides need to be
      calculated and validated against the strides in the Numba
      usmarraystruct object.

      The PR fixes the stride calculation that was previously done
      incorrectly.
@diptorupd diptorupd force-pushed the fix/boxing_dpnpndarray_from_parent branch from a81927d to 10a8028 Compare October 3, 2023 16:44
@diptorupd diptorupd enabled auto-merge October 3, 2023 16:49
@diptorupd diptorupd disabled auto-merge October 3, 2023 18:34
@diptorupd diptorupd merged commit 39b5a5c into main Oct 3, 2023
@diptorupd diptorupd deleted the fix/boxing_dpnpndarray_from_parent branch October 3, 2023 18:34
github-actions bot added a commit that referenced this pull request Oct 3, 2023
…_parent

Fixes bug in boxing a DpnpNdArray from parent. 39b5a5c
github-actions bot pushed a commit that referenced this pull request Oct 3, 2023
…_parent

Fixes bug in boxing a DpnpNdArray from parent. 39b5a5c
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.

2 participants