File tree Expand file tree Collapse file tree 2 files changed +0
-13
lines changed
numba_cuda/numba/cuda/cext Expand file tree Collapse file tree 2 files changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -120,34 +120,28 @@ MOD_INIT(_devicearray) {
120120 int error = 0 ;
121121
122122
123- printf (" In init\n " );
124123 MOD_DEF (m, " _devicearray" , " No docs" , NULL )
125124 if (m == NULL )
126125 goto error_occurred;
127126
128- printf (" About to create capsule\n " );
129127 c_api = PyCapsule_New ((void *)_DeviceArray_API, NUMBA_DEVICEARRAY_IMPORT_NAME " ._DEVICEARRAY_API" , NULL );
130128 if (c_api == NULL )
131129 goto error_occurred;
132130
133- printf (" About to check if type ready\n " );
134131 DeviceArrayType.tp_new = PyType_GenericNew;
135132 if (PyType_Ready (&DeviceArrayType) < 0 )
136133 goto error_occurred;
137134
138135
139- printf (" About to add object\n " );
140136 Py_INCREF (&DeviceArrayType);
141137 error = PyModule_AddObject (m, " DeviceArray" , (PyObject*)(&DeviceArrayType));
142138 if (error)
143139 goto error_occurred;
144140
145- printf (" About to get module dict\n " );
146141 d = PyModule_GetDict (m);
147142 if (d == NULL )
148143 goto error_occurred;
149144
150- printf (" About to set item\n " );
151145 error = PyDict_SetItemString (d, " _DEVICEARRAY_API" , c_api);
152146 /* Decref and set c_api to NULL, Py_XDECREF in error_occurred will have no
153147 * effect. */
@@ -156,8 +150,6 @@ MOD_INIT(_devicearray) {
156150 if (error)
157151 goto error_occurred;
158152
159-
160- printf (" Success\n " );
161153 return MOD_SUCCESS_VAL (m);
162154
163155error_occurred:
Original file line number Diff line number Diff line change @@ -947,24 +947,19 @@ import_devicearray(void)
947947 if (devicearray == NULL ) {
948948 return -1 ;
949949 }
950- printf (" Imported device array\n " );
951950
952951 PyObject *d = PyModule_GetDict (devicearray);
953952 if (d == NULL ) {
954- printf (" Couldn't get dict of device array module\n " );
955953 Py_DECREF (devicearray);
956954 return -1 ;
957955 }
958- printf (" Got dict of device array module\n " );
959956
960957 PyObject *c_api = PyDict_GetItemString (d, " _DEVICEARRAY_API" );
961958 if (PyCapsule_IsValid (c_api, NUMBA_DEVICEARRAY_IMPORT_NAME " ._DEVICEARRAY_API" )) {
962- printf (" Capsule is valid\n " );
963959 DeviceArray_API = (void **)PyCapsule_GetPointer (c_api, NUMBA_DEVICEARRAY_IMPORT_NAME " ._DEVICEARRAY_API" );
964960 Py_DECREF (devicearray);
965961 return 0 ;
966962 } else {
967- printf (" Capsule is not valid.\n " );
968963 Py_DECREF (devicearray);
969964 return -1 ;
970965 }
You can’t perform that action at this time.
0 commit comments