Skip to content

Commit

Permalink
Fix lsplatform function to use python's stream
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-perevezentsev committed Mar 25, 2022
1 parent f35b2e6 commit fe8b34b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dpctl/_sycl_platform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def lsplatform(verbosity=0):
cdef DPCTLPlatformVectorRef PVRef = NULL
cdef size_t v = 0
cdef size_t size = 0
cdef const char * info_str = NULL
cdef DPCTLSyclPlatformRef PRef = NULL

if not isinstance(verbosity, int):
Expand All @@ -347,8 +348,11 @@ def lsplatform(verbosity=0):
if v != 0:
print("Platform ", i, "::")
PRef = DPCTLPlatformVector_GetAt(PVRef, i)
DPCTLPlatformMgr_PrintInfo(PRef, v)
info_str = DPCTLPlatformMgr_PrintInfo(PRef,v)
py_info = <bytes> info_str
DPCTLCString_Delete(info_str)
DPCTLPlatform_Delete(PRef)
print(py_info.decode("utf-8"),end='')
DPCTLPlatformVector_Delete(PVRef)


Expand Down

0 comments on commit fe8b34b

Please sign in to comment.