You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement asynchronous fill method using dpctl kernels (#2055)
* Enhance `dpnp_array.fill` method
Leverages dpctl's strided fill and memset for setting contiguous memory to 0
* Fix missing disclaimer in dpnp_arraycreation.py
* Import `dpnp_array` directly
* Skip `test_fill_with_numpy_scalar_ndarray`
New fill implementation does not permit NumPy array values, consistent with fill_diagonal
* Add dependencies to zeros and full kernels in `dpnp_fill`
* Remove redundant validation of first `dpnp_fill` argument
* Improve `dpnp_fill` array/scalar path logic
* Disallow inputs to `dpnp_fill` on separate queues
* Adjust skip message for `test_fill_with_numpy_scalar_ndarray`
* Tweak error messages in `dpnp_fill`
* Add tests for new `fill` method
* Update docstring for `fill` method
* Fix pre-commit in cupy fill tests
* Change `asarray` to `astype` in `dpnp_fill`
NumPy arrays are no longer permitted and queue coercion does not occur in the `fill` method, so `astype` is sufficient
* Expand TEST_SCOPE to include `test_fill.py`
* Remove redundant check from `dpnp_fill`
* Use `_cast_fill_val` private function from `dpctl.tensor._ctors`
* Add tests per PR review by @antonwolfy
* Improve validation of `val` for `fill` method
* Add to permit NumPy bools as `dpnp_fill` scalar fill values
* Use `dpnp.bool` in `dpnp_fill` and make `isinstance` check more efficient
* Replace branching for `fill` scalar type with `_cast_fill_value`
* Add additional tests for `fill`
`test_fill_non_scalar` now checks for strings and `test_fill_bool` added to verify bools are properly cast to 1
---------
Co-authored-by: Anton <[email protected]> 29239b6
0 commit comments