Skip to content

Commit c274840

Browse files
Merge pull request #795 from IntelPython/avoid-extra-copy-call
[BUGFIX] Excessive number of copy kernel calls
1 parent 8e06a6c commit c274840

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dpctl/tensor/_copy_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def _copy_from_usm_ndarray_to_usm_ndarray(dst, src):
201201

202202
if dst.ndim == src.ndim and dst.shape == src.shape:
203203
_copy_same_shape(dst, src)
204+
return
204205

205206
try:
206207
common_shape = _broadcast_shapes(dst.shape, src.shape)

0 commit comments

Comments
 (0)