-
Notifications
You must be signed in to change notification settings - Fork 22
Use full() function from dpctl.tensor #1218
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it would be great to extend test_array_creation() test in tests/test_sycl_queue.py
and to add new test_full() in tests/test_arraycreation.py
covering basic functionality and corner cases.
The following tests needs to be excluded from ignore list, i.e. to be removed from tests/skipped_tests_gpu.tbl
file:
tests/third_party/cupy/creation_tests/test_basic.py::TestBasic::test_full
tests/third_party/cupy/creation_tests/test_basic.py::TestBasic::test_full_default_dtype
tests/third_party/cupy/creation_tests/test_basic.py::TestBasic::test_full_default_dtype_cpu_input
dpnp/dpnp_container.py
Outdated
if isinstance(fill_value, dpnp_array): | ||
fill_value = fill_value.get_array() | ||
|
||
"""Creates `dpnp_array` where every element is equal to fill_value.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docstring is blatantly wrong when fill_value
is an array. NumPy says "Return a new array of given shape and type, filled with fill_value
."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It would be nice to try numba_dpex with this change in dpnp to verify that dpnp.full
stays properly supported in JIT-ted functions.
Use full() function from dpctl.tensor module instead of DPNP backend implementation.
A cython code relating to full() call is cleaned up.