Skip to content

Commit

Permalink
ptr_raw(): fix offset when spill_lock is None
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Aug 22, 2022
1 parent f28d147 commit f426365
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/cudf/cudf/_lib/spillable_buffer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ cdef class SpillableBuffer:
return self._ptr

cdef void* ptr_raw(self, SpillLock spill_lock) except *:
if spill_lock is None:
return <void*><uintptr_t> self.ptr

# Get base buffer
cdef SpillableBuffer base
cdef size_t offset
Expand All @@ -245,9 +248,6 @@ cdef class SpillableBuffer:
base = self._view_desc["base"]
offset = self._view_desc["offset"]

if spill_lock is None:
return <void*><uintptr_t> base.ptr

with base._lock:
base.move_inplace(target="gpu")
base._last_accessed = time.monotonic()
Expand Down

0 comments on commit f426365

Please sign in to comment.