зеркало из https://github.com/microsoft/hat.git
Don't print hiprtc log if compilation succeeds (#48)
* temporarily disable printing of hiprtc program log * try longer term fix per https://github.com/ROCm-Developer-Tools/HIP/blob/develop/docs/markdown/hip_rtc.md?plain=1#L56 * check status before printing (log_size.value would be 1) Co-authored-by: Lisa Ong <onglisa@microsoft.com>
This commit is contained in:
Родитель
228c83f783
Коммит
354df3dfcc
|
@ -309,12 +309,14 @@ def hiprtcGetProgramLog(prog):
|
|||
log_size = ctypes.c_size_t()
|
||||
status = _libhiprtc.hiprtcGetProgramLogSize(prog, ctypes.byref(log_size))
|
||||
hiprtcCheckStatus(status)
|
||||
|
||||
log = "0" * log_size.value
|
||||
e_log = log.encode('utf-8')
|
||||
status = _libhiprtc.hiprtcGetProgramLog(prog, e_log)
|
||||
hiprtcCheckStatus(status)
|
||||
return e_log.decode('utf-8')
|
||||
if status: # only print if there is an error
|
||||
log = "0" * log_size.value
|
||||
e_log = log.encode('utf-8')
|
||||
status = _libhiprtc.hiprtcGetProgramLog(prog, e_log)
|
||||
hiprtcCheckStatus(status)
|
||||
return e_log.decode('utf-8')
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
_libhiprtc.hiprtcGetCodeSize.restype = int
|
||||
|
|
Загрузка…
Ссылка в новой задаче