Skip to content

Commit fe8b34b

Browse files
Fix lsplatform function to use python's stream
1 parent f35b2e6 commit fe8b34b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dpctl/_sycl_platform.pyx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ def lsplatform(verbosity=0):
323323
cdef DPCTLPlatformVectorRef PVRef = NULL
324324
cdef size_t v = 0
325325
cdef size_t size = 0
326+
cdef const char * info_str = NULL
326327
cdef DPCTLSyclPlatformRef PRef = NULL
327328

328329
if not isinstance(verbosity, int):
@@ -347,8 +348,11 @@ def lsplatform(verbosity=0):
347348
if v != 0:
348349
print("Platform ", i, "::")
349350
PRef = DPCTLPlatformVector_GetAt(PVRef, i)
350-
DPCTLPlatformMgr_PrintInfo(PRef, v)
351+
info_str = DPCTLPlatformMgr_PrintInfo(PRef,v)
352+
py_info = <bytes> info_str
353+
DPCTLCString_Delete(info_str)
351354
DPCTLPlatform_Delete(PRef)
355+
print(py_info.decode("utf-8"),end='')
352356
DPCTLPlatformVector_Delete(PVRef)
353357

354358

0 commit comments

Comments
 (0)