Skip to content

Commit 70816dc

Browse files
Merge pull request #303 from KernelTuner/hip_error_messages
More user-friendly error messages for HIP backend
2 parents 8b9eb45 + 46cfb66 commit 70816dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel_tuner/backends/hip.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def hip_check(call_result):
4040
if len(result) == 1:
4141
result = result[0]
4242
if isinstance(err, hip.hipError_t) and err != hip.hipError_t.hipSuccess:
43-
raise RuntimeError(str(err))
43+
_, error_name = hip.hipGetErrorName(err)
44+
_, error_str = hip.hipGetErrorString(err)
45+
raise RuntimeError(f"{error_name}: {error_str}")
4446
return result
4547

4648

0 commit comments

Comments
 (0)