Skip to content
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

Reworked dpnp.copyto() implementation through existing calls #1516

Merged
merged 10 commits into from
Aug 22, 2023

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Aug 9, 2023

The PR proposes to redesign existing implementation of dpnp.copyto() through existing functions instead of separate kernel. Also it adds missing support of all input parameters, which allows to completely remove fallback on numpy for the function.

Additionally, more tests are added to cover the functionality.

  • 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 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2023

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

tests/__init__.py Outdated Show resolved Hide resolved
@vtavana
Copy link
Collaborator

vtavana commented Aug 11, 2023

The following tests failed on nuc04, do they pass for you?

FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_broadcast - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_raises_shape[dst_shape1-src_shape1] - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_squeeze_broadcast - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-no] - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-equiv] - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-safe] - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-same_kind] - AssertionError: Only cupy raises error
FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-unsafe] - AssertionError: Only cupy raises error

@antonwolfy
Copy link
Contributor Author

The following tests failed on nuc04, do they pass for you?

FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_broadcast - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_raises_shape[dst_shape1-src_shape1] - Failed: DID NOT RAISE <class 'ValueError'> FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestBasic::test_copyto_squeeze_broadcast - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-no] - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-equiv] - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-safe] - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-same_kind] - AssertionError: Only cupy raises error FAILED tests/third_party/cupy/manipulation_tests/test_basic.py::TestCopytoFromNumpyScalar::test_copyto2[0-unsafe] - AssertionError: Only cupy raises error

No, but the issue is in dpctl, I've raised #1334 to address the problem.

@antonwolfy antonwolfy marked this pull request as ready for review August 14, 2023 07:51
@vlad-perevezentsev vlad-perevezentsev self-requested a review August 22, 2023 11:14
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.

LGTM
Thank you @antonwolfy

@antonwolfy antonwolfy merged commit 17d7921 into master Aug 22, 2023
@antonwolfy antonwolfy deleted the impove_dopyto_impl branch August 22, 2023 11:33
@oleksandr-pavlyk
Copy link
Contributor

👍

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