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":
207207 const DPCTLSyclDeviceRef DRef,
208208 int device_identifier)
209209 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)
211211 cdef DPCTLSyclContextRef DPCTLDeviceMgr_GetCachedContext(
212212 const DPCTLSyclDeviceRef DRef)
213213 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
6565 DPCTLDevice_IsCPU,
6666 DPCTLDevice_IsGPU,
6767 DPCTLDevice_IsHost,
68+ DPCTLDeviceMgr_GetDeviceInfoStr,
6869 DPCTLDeviceMgr_GetDevices,
6970 DPCTLDeviceMgr_GetPositionInDevices,
7071 DPCTLDeviceMgr_GetRelativeId,
71- DPCTLDeviceMgr_PrintDeviceInfo,
7272 DPCTLDeviceSelector_Delete,
7373 DPCTLDeviceSelector_Score,
7474 DPCTLDeviceVector_Delete,
@@ -286,7 +286,11 @@ cdef class SyclDevice(_SyclDevice):
286286 def print_device_info (self ):
287287 """ Print information about the SYCL device.
288288 """
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" ))
290294
291295 cdef DPCTLSyclDeviceRef get_device_ref(self ):
292296 """ Returns the DPCTLSyclDeviceRef pointer for this class.
You can’t perform that action at this time.
0 commit comments