Skip to content

Commit

Permalink
fix regression in shares_memory for zero size arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Nov 10, 2020
1 parent eeca386 commit 75df1ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cupy/_misc/memory_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_memory_ptrs(x):


def shares_memory(a, b, max_work=None):
if a is b:
if a is b and a.size != 0:
return True
if max_work == 'MAY_SHARE_BOUNDS':
return _memory_range.may_share_bounds(a, b)
Expand Down

0 comments on commit 75df1ee

Please sign in to comment.