-
Notifications
You must be signed in to change notification settings - Fork 22
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
dpnp.fmod() doesn't work properly with a scalar #1348
Closed
Closed
Conversation
This file contains 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
antonwolfy
force-pushed
the
fmod_by_scalar
branch
from
March 23, 2023 18:24
39fbb44
to
4ab2d16
Compare
antonwolfy
requested review from
npolina4,
oleksandr-pavlyk and
vlad-perevezentsev
March 23, 2023 18:25
Support more use cases for 'out' parameter
…ences Allow asarray to work on sequences of dpnp_array
* Suppport parameter out in dpnp.add() * Update tests/test_mathematical.py Co-authored-by: vlad-perevezentsev <vladislav.perevezentsev@intel.com> * Update tests/test_mathematical.py Co-authored-by: vlad-perevezentsev <vladislav.perevezentsev@intel.com> * Update tests/test_mathematical.py * Update tests/test_mathematical.py Co-authored-by: Natalia Polina <natalia.polina@intel.com> * Use internal _check_nd_call() function which is common for mathematical ones with 2 input arrays * Add more test for 'out' parameter --------- Co-authored-by: vlad-perevezentsev <vladislav.perevezentsev@intel.com> Co-authored-by: Natalia Polina <natalia.polina@intel.com>
npolina4
approved these changes
Apr 4, 2023
Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
#1883 covers that PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The PR is aimed to implement support of
dpnp.power
call where one of arguments is a scalar.Currently, since #1201, it raises not-implemented exception in dpnp. This is because dpnp was falling back on NumPy implementation in that use case, but has to call an internal kernel function from the backend.
The PR proposes to copy a scalar data from host memory into USM allocated memory, which means to create zero-dimension dpnp array from the scalar. This way the power of array with a scalar or the power of scalar with an array will be handled in the same way as power with two arrays, which already works fine in dpnp.
Note that if some input argument is a scalar and another one is an array, memory for the scalar will be allocated on the same SYCL device and with the same USM type as the array has. It's required to proceed with further computing and to be compliant with compute follows data paradigm (all input data has to reside on the same device).