File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ cdef extern from "dpctl_sycl_device_manager.h":
207
207
const DPCTLSyclDeviceRef DRef,
208
208
int device_identifier)
209
209
cdef size_t DPCTLDeviceMgr_GetNumDevices(int device_identifier)
210
- cdef void DPCTLDeviceMgr_PrintDeviceInfo (const DPCTLSyclDeviceRef DRef)
210
+ cdef const char * DPCTLDeviceMgr_GetDeviceInfoStr (const DPCTLSyclDeviceRef DRef)
211
211
cdef DPCTLSyclContextRef DPCTLDeviceMgr_GetCachedContext(
212
212
const DPCTLSyclDeviceRef DRef)
213
213
cdef int64_t DPCTLDeviceMgr_GetRelativeId(const DPCTLSyclDeviceRef DRef)
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ from ._backend cimport ( # noqa: E211
65
65
DPCTLDevice_IsCPU,
66
66
DPCTLDevice_IsGPU,
67
67
DPCTLDevice_IsHost,
68
+ DPCTLDeviceMgr_GetDeviceInfoStr,
68
69
DPCTLDeviceMgr_GetDevices,
69
70
DPCTLDeviceMgr_GetPositionInDevices,
70
71
DPCTLDeviceMgr_GetRelativeId,
71
- DPCTLDeviceMgr_PrintDeviceInfo,
72
72
DPCTLDeviceSelector_Delete,
73
73
DPCTLDeviceSelector_Score,
74
74
DPCTLDeviceVector_Delete,
@@ -286,7 +286,11 @@ cdef class SyclDevice(_SyclDevice):
286
286
def print_device_info (self ):
287
287
""" Print information about the SYCL device.
288
288
"""
289
- DPCTLDeviceMgr_PrintDeviceInfo(self ._device_ref)
289
+ cdef const char * info_str = DPCTLDeviceMgr_GetDeviceInfoStr(
290
+ self ._device_ref
291
+ )
292
+ py_info = < bytes> info_str
293
+ print (py_info.decode(" utf-8" ))
290
294
291
295
cdef DPCTLSyclDeviceRef get_device_ref(self ):
292
296
""" Returns the DPCTLSyclDeviceRef pointer for this class.
You can’t perform that action at this time.
0 commit comments