We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f032154 + 701c05b commit a6d16f2Copy full SHA for a6d16f2
dpctl/tensor/_copy_utils.py
@@ -213,6 +213,11 @@ def _copy_same_shape(dst, src):
213
"""Assumes src and dst have the same shape."""
214
# check that memory regions do not overlap
215
if ti._array_overlap(dst, src):
216
+ if src._pointer == dst._pointer and (
217
+ src is dst
218
+ or (src.strides == dst.strides and src.dtype == dst.dtype)
219
+ ):
220
+ return
221
_copy_overlapping(src=src, dst=dst)
222
return
223
0 commit comments