Skip to content

Commit

Permalink
WIP dpnp.empty_like(), dpnp.zeros_like() and dpnp.ones_like()
Browse files Browse the repository at this point in the history
  • Loading branch information
chudur-budur committed Feb 27, 2023
1 parent 8840a5a commit 0fcad68
Show file tree
Hide file tree
Showing 3 changed files with 1,033 additions and 571 deletions.
14 changes: 0 additions & 14 deletions numba_dpex/core/types/usm_ndarray_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ def __init__(
):
self.usm_type = usm_type
self.addrspace = addrspace
print(
"---> numba_dpex.core.types.usm_ndarray_type.USMNdArray.__init__():dtype =",
dtype,
)

if queue is not None and device != "unknown":
if not isinstance(device, str):
Expand Down Expand Up @@ -77,24 +73,14 @@ def __init__(
self.device = self.queue.sycl_device.filter_string

if not dtype:
print(
"---> numba_dpex.core.types.usm_ndarray_type.USMNdArray.__init__():here.1"
)
dummy_tensor = dpctl.tensor.empty(
sh=1, order=layout, usm_type=usm_type, sycl_queue=self.queue
)
# convert dpnp type to numba/numpy type
_dtype = dummy_tensor.dtype
self.dtype = from_dtype(_dtype)
else:
print(
"---> numba_dpex.core.types.usm_ndarray_type.USMNdArray.__init__():here.2"
)
self.dtype = dtype
print(
"---> numba_dpex.core.types.usm_ndarray_type.USMNdArray.__init__():self.dtype =",
self.dtype,
)

if name is None:
type_name = "usm_ndarray"
Expand Down
Loading

0 comments on commit 0fcad68

Please sign in to comment.