-
Notifications
You must be signed in to change notification settings - Fork 22
Reworked dpnp.copyto() implementation through existing calls #1516
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70cd566
Reworked dpnp.copyto() implementation through existing calls
antonwolfy 87d12f3
Extended public CI scope with two more files
antonwolfy 9e669b4
Unmuted tests around dpnp.copyto()
antonwolfy 95d3520
Fixed typos in description
antonwolfy 93660b2
Left part of dpnp_copyto implementations in backend since used by FFT
antonwolfy b62c638
Removed leftover in cython for DPNP_FN_COPYTO
antonwolfy b0237dc
Removed unnecessary import
antonwolfy e5cc7c0
Applied review comments
antonwolfy 2a07c8c
Mute not working tests
antonwolfy e3d7c3f
Mute tests for dpnp.power() which are failing in CI
antonwolfy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,7 @@ | ||
import numpy | ||
|
||
import dpnp | ||
from tests import testing | ||
from tests.third_party.cupy import testing as cupy_testing | ||
|
||
from .helper import has_support_aspect64 | ||
|
||
numpy.testing.assert_allclose = testing.assert_allclose | ||
numpy.testing.assert_array_equal = testing.assert_array_equal | ||
numpy.testing.assert_equal = testing.assert_equal | ||
|
||
# patch for shaped_arange func to exclude calls of astype and reshape | ||
# necessary because new data container does not support these functions yet | ||
|
||
orig_shaped_arange = cupy_testing.shaped_arange | ||
orig_shaped_reverse_arange = cupy_testing.shaped_reverse_arange | ||
|
||
|
||
def _shaped_arange(shape, xp=dpnp, dtype=dpnp.float64, order="C"): | ||
if dtype is dpnp.float64: | ||
dtype = dpnp.float32 if not has_support_aspect64() else dtype | ||
res = xp.array( | ||
orig_shaped_arange(shape, xp=numpy, dtype=dtype, order=order), | ||
dtype=dtype, | ||
) | ||
return res | ||
|
||
|
||
def _shaped_reverse_arange(shape, xp=dpnp, dtype=dpnp.float32): | ||
res = xp.array( | ||
orig_shaped_reverse_arange(shape, xp=numpy, dtype=dtype), dtype=dtype | ||
) | ||
return res | ||
|
||
|
||
cupy_testing.shaped_arange = _shaped_arange | ||
cupy_testing.shaped_reverse_arange = _shaped_reverse_arange |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.