feat(common): add hiprtc to hip_check

This commit is contained in:
Anthony Berg 2025-07-01 00:33:01 +02:00
parent 2241da1532
commit 86821d659c

View File

@ -1,4 +1,4 @@
from hip import hip, hipblas
from hip import hip, hiprtc, hipblas
def hip_check(call_request):
@ -12,6 +12,8 @@ def hip_check(call_request):
result = result[0]
if isinstance(err, hip.hipError_t) and err != hip.hipError_t.hipSuccess:
raise RuntimeError(str(err))
elif isinstance(err, hiprtc.hiprtcResult) and err != hiprtc.hiprtcResult.HIPRTC_SUCCESS:
raise RuntimeError(str(err))
elif isinstance(err, hipblas.hipblasStatus_t) and err != hipblas.hipblasStatus_t.HIPBLAS_STATUS_SUCCESS:
raise RuntimeError(str(err))
return result