Skip to content

Enable third party tests for dpnp.ndarray #1964

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 7 commits into from
Aug 9, 2024

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Aug 2, 2024

The PR is about to enable scope of third party tests intended to validate dpnp.ndarray constructor.

The PR also proposes some code changes to pass the new test scope and be aligned with NumPy behavior:

  • To use only dpctl.tensor constructor for usm_ndarray instead of dpt.asaray call in code of dpnp array constructor
  • To use dpnp_array._create_from_usm_ndarray function in implementation of dpnp container
  • To allow passing an integer scalar to shape setter
  • To prohibit extending dpnp array with any custom attribute

The configuration of pre-commit pylint hook is extended to disable c-extension-no-member check, because it produces only false-positive error in dpnp code. It was already previously disable per specific dpnp interface files, but not moved to global pylint configuration.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@antonwolfy antonwolfy self-assigned this Aug 2, 2024
Copy link
Contributor

github-actions bot commented Aug 2, 2024

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

@antonwolfy antonwolfy marked this pull request as ready for review August 2, 2024 11:36
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev left a comment

Choose a reason for hiding this comment

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

Looks good
Thank you @antonwolfy

@antonwolfy antonwolfy merged commit 92faa20 into master Aug 9, 2024
23 of 31 checks passed
@antonwolfy antonwolfy deleted the enable-third-party-ndarray-tests branch August 9, 2024 12:46
github-actions bot added a commit that referenced this pull request Aug 9, 2024
* Enable all supported use cases and address missing one

* Use dpnp_array._create_from_usm_ndarray() within dpnp container

* Allow shape setter to work with integer scalar

* Applied pre-commit hook

* Removed commented leftovers 92faa20
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