@@ -859,13 +859,21 @@ static PyObject *box_from_arystruct_parent(arystruct_t *arystruct,
859
859
struct PyUSMArrayObject * arrayobj = NULL ;
860
860
npy_intp itemsize = 0 ;
861
861
862
- DPEXRT_DEBUG (drt_debug_print ("DPEXRT-DEBUG: In try_to_return_parent.\n" ));
862
+ DPEXRT_DEBUG (
863
+ drt_debug_print ("DPEXRT-DEBUG: In box_from_arystruct_parent.\n" ));
863
864
864
- if (!(arrayobj = PyUSMNdArray_ARRAYOBJ (arystruct -> parent )))
865
+ if (!(arrayobj = PyUSMNdArray_ARRAYOBJ (arystruct -> parent ))) {
866
+ DPEXRT_DEBUG (
867
+ drt_debug_print ("DPEXRT-DEBUG: Arrayobj cannot be boxed from "
868
+ "parent as parent pointer is NULL.\n" ));
865
869
return NULL ;
870
+ }
866
871
867
- if ((void * )UsmNDArray_GetData (arrayobj ) != arystruct -> data )
872
+ if ((void * )UsmNDArray_GetData (arrayobj ) != arystruct -> data ) {
873
+ DPEXRT_DEBUG (drt_debug_print ("DPEXRT-DEBUG: Arrayobj cannot be boxed "
874
+ "from parent as data pointer is NULL.\n" ));
868
875
return NULL ;
876
+ }
869
877
870
878
if (UsmNDArray_GetNDim (arrayobj ) != ndim )
871
879
return NULL ;
@@ -985,6 +993,10 @@ DPEXRT_sycl_usm_ndarray_to_python_acqref(arystruct_t *arystruct,
985
993
// return back to Python memory that was allocated inside Numba and let
986
994
// Python manage the lifetime of the memory.
987
995
if (arystruct -> meminfo ) {
996
+ DPEXRT_DEBUG (
997
+ drt_debug_print ("DPEXRT-DEBUG: Set the base of the boxed array "
998
+ "from arystruct's meminfo pointer at %s, line %d\n" ,
999
+ __FILE__ , __LINE__ ));
988
1000
// wrap into MemInfoObject
989
1001
if (!(miobj = PyObject_New (MemInfoObject , & MemInfoType ))) {
990
1002
PyErr_Format (PyExc_ValueError ,
0 commit comments