Skip to content

Commit 24696b5

Browse files
committed
feedback: switch to UR_CHECK_ERROR
1 parent bb4f997 commit 24696b5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

source/adapters/hip/device.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -730,17 +730,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
730730
// can't distinguish this condition from us doing something wrong, we can't
731731
// handle it gracefully.
732732
hipDeviceProp_t Props;
733-
detail::ur::assertion(hipGetDeviceProperties(&Props, hDevice->get()) ==
734-
hipSuccess);
733+
UR_CHECK_ERROR(hipGetDeviceProperties(&Props, hDevice->get()));
735734
if (strcmp(Props.gcnArchName, "gfx1031") == 0) {
736735
return ReturnValue(0);
737736
}
738737

739738
size_t FreeMemory = 0;
740739
size_t TotalMemory = 0;
741-
detail::ur::assertion(hipMemGetInfo(&FreeMemory, &TotalMemory) ==
742-
hipSuccess,
743-
"failed hipMemGetInfo() API.");
740+
UR_CHECK_ERROR(hipMemGetInfo(&FreeMemory, &TotalMemory));
744741
return ReturnValue(FreeMemory);
745742
}
746743

0 commit comments

Comments
 (0)