Uh oh!
There was an error while loading. Please reload this page.
Permit "same_kind" casting for usm_ndarray element-wise in-place operators - #1827
Conversation
f81119f to
13fde04CompareDeleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_9 ran successfully. |
2 similar comments
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_9 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_9 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_10 ran successfully. |
This method permits casting behavior equivalent to `"same_kind"` when using in-place operators by introducing the `_inplace_op` method Expands this to `__imatmul__` as well through use of the already-implemented `dtype` keyword
f1ac695 to
79208c8CompareRaises `ValueError` otherwise
…re both inputs are broadcast to a new shape
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_13 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_14 ran successfully. |
Also clean up and make some tests for in-place operators more efficient
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_16 ran successfully. |
ndgrigorian
commented
Sep 10, 2024
@oleksandr-pavlyk |
Uh oh!
There was an error while loading. Please reload this page.
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_17 ran successfully. |
Uh oh!
There was an error while loading. Please reload this page.
oleksandr-pavlyk
left a comment
There was a problem hiding this comment.
Overall this change looks good to me, modulo a nit! Thank you @ndgrigorian
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_18 ran successfully. |
vtavana
commented
Sep 11, 2024
I ran |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_19 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_20 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_21 ran successfully. |
oleksandr-pavlyk
left a comment
There was a problem hiding this comment.
LGTM! Thank you @ndgrigorian
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.
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 pull request proposes a new implementation for in-place element-wise operators which permits casting equivalent to
"same_kind"This allows such operations as
This PR maintains the inclusion of (conditionally used) in-place kernels in element-wise operators when
dpt.bin_op(x, y, out=x)for somebin_opwhich has an in-place implementation.Resolves#1757