@@ -29,7 +29,7 @@ cdef class StridedMemoryView:
29
29
device_id: int = None # -1 for CPU
30
30
device_accessible: bool = None
31
31
readonly: bool = None
32
- obj : Any = None
32
+ exporting_obj : Any = None
33
33
34
34
def __init__ (self , obj = None , stream_ptr = None ):
35
35
if obj is not None :
@@ -50,7 +50,7 @@ cdef class StridedMemoryView:
50
50
+ f" device_id={self.device_id},\n "
51
51
+ f" device_accessible={self.device_accessible},\n "
52
52
+ f" readonly={self.readonly},\n "
53
- + f" obj ={get_simple_repr(self.obj )})" )
53
+ + f" exporting_obj ={get_simple_repr(self.exporting_obj )})" )
54
54
55
55
56
56
cdef str get_simple_repr(obj):
@@ -173,7 +173,7 @@ cdef StridedMemoryView view_as_dlpack(obj, stream_ptr, view=None):
173
173
buf.device_id = device_id
174
174
buf.device_accessible = device_accessible
175
175
buf.readonly = is_readonly
176
- buf.obj = obj
176
+ buf.exporting_obj = obj
177
177
178
178
cdef const char * used_name = (
179
179
DLPACK_VERSIONED_TENSOR_USED_NAME if versioned else DLPACK_TENSOR_USED_NAME)
@@ -252,7 +252,7 @@ cdef StridedMemoryView view_as_cai(obj, stream_ptr, view=None):
252
252
raise BufferError(" stream=None is ambiguous with view()" )
253
253
254
254
cdef StridedMemoryView buf = StridedMemoryView() if view is None else view
255
- buf.obj = obj
255
+ buf.exporting_obj = obj
256
256
buf.ptr, buf.readonly = cai_data[" data" ]
257
257
buf.shape = cai_data[" shape" ]
258
258
# TODO: this only works for built-in numeric types
0 commit comments