Implement kernels for in-place pow, remainder, and bitwise operators#1447
Merged
ndgrigorian merged 20 commits intomasterfrom Oct 25, 2023
Merged
Implement kernels for in-place pow, remainder, and bitwise operators#1447ndgrigorian merged 20 commits intomasterfrom
pow, remainder, and bitwise operators#1447ndgrigorian merged 20 commits intomasterfrom
Conversation
Fixed in-place remainder for devices that do not support 64-bit floating point data types
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1447/index.html |
Collaborator
|
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_50 ran successfully. |
|
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_51 ran successfully. |
Collaborator
Author
|
@oleksandr-pavlyk It appears that the test commit splitting |
Removed utility include
…ed in it Removed "using dpctl::tensor::py_internal::init_abs`, since this imports `init_abs` into the current namespace from `dpctl::tensor::py_internal`, but this namespace is the current namespace and so the import is a no-op. Also added brief docstring for the common init module.
Instead, moved common functions into anonymous namespace as inline, which is C++ way of expressing that multiple definitions of the same function may exist in different C++ translation units, which linker unifies.
Instead of using inline keyword to allow multiple definitions of the same function in different translation units, introduced elementwise_functions_type_utils.cpp that defines these functions and a header file to use in other translatioon units. This should reduce the binary size of the produced object files and simplify the linker's job reducing the link-time.
…entwise-functions
|
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_81 ran successfully. |
oleksandr-pavlyk
approved these changes
Oct 25, 2023
6 tasks
6 tasks
antonwolfy
added a commit
to IntelPython/dpnp
that referenced
this pull request
Jan 11, 2025
The PR proposes to permit `"same_kind"` casting for element-wise in-place operators. The implementation leverages on dpctl changes added in scope of [PR#1827](IntelPython/dpctl#1827). It also adds callbacks to support in-place bit-wise operators (leverages on dpctl changes from [RR#1447](IntelPython/dpctl#1447)). The PR removes a temporary workaround from `dpnp.wrap` which depends on the implemented changes.
github-actions bot
added a commit
to IntelPython/dpnp
that referenced
this pull request
Jan 11, 2025
The PR proposes to permit `"same_kind"` casting for element-wise in-place operators. The implementation leverages on dpctl changes added in scope of [PR#1827](IntelPython/dpctl#1827). It also adds callbacks to support in-place bit-wise operators (leverages on dpctl changes from [RR#1447](IntelPython/dpctl#1447)). The PR removes a temporary workaround from `dpnp.wrap` which depends on the implemented changes. 3d02b6b
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
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.
This pull request introduces dedicated kernels for the remaining operators currently implemented by dpctl —
__ipow__,__imod__,__iand__,__ior__,__ixor__,__il_shift__, and__ir_shift__.