Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
impove_dopyto_implIntelPython/dpnp:impove_dopyto_implCopy head branch name to clipboard
Aug 22, 2023
Merged

Reworked dpnp.copyto() implementation through existing calls#1516
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
impove_dopyto_implIntelPython/dpnp:impove_dopyto_implCopy head branch name to clipboard

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
Contributor

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
dpnp/dpnp_iface_manipulation.py Show resolved Hide resolved
tests/third_party/cupy/manipulation_tests/test_basic.py Outdated Show resolved Hide resolved
@vlad-perevezentsev vlad-perevezentsev self-requested a review August 22, 2023 11:14
Copy link
Contributor

@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.