-
Notifications
You must be signed in to change notification settings - Fork 32
Add dpctl.tensor._tensor_elementwise_impl._divide_by_scalar utility function and use it in statistical functions
#1820
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
Conversation
This brings significant performance improvement for Lloyd algorithm benchmark.
…enominator in `TrueDivideFunctor`
The scalar is expected to overflow to infinity when cast to the array's type and the result should be 0 (for a finite numerator)
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
|
Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_392 ran successfully. |
dpctl.tensor._tensor_elementwise_impl._divide_by_scalar utility functiondpctl.tensor._tensor_elementwise_impl._divide_by_scalar utility function and use it in statistical functions
dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp
Outdated
Show resolved
Hide resolved
dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp
Outdated
Show resolved
Hide resolved
dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp
Outdated
Show resolved
Hide resolved
dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp
Outdated
Show resolved
Hide resolved
dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp
Outdated
Show resolved
Hide resolved
|
Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_393 ran successfully. |
Apply review suggestions
775ba90 to
6bde41f
Compare
|
Array API standard conformance tests for dpctl=0.18.0dev0=py310hdf72452_393 ran successfully. |
This PR proposes adding a utility function
_divide_by_scalarto the_tensor_elementwise_implsub-module.This function improves the performance of division where the denominator is a Python scalar by avoiding a call to
asarrayand allocating device memory.This function is also deployed to the statistical functions.
Slips in a change to remove a superfluous
wait()from_clip.py