Always print error message with the returned error code before abort

Change-Id: I8479abc586937a50c90b2785c4ce7364e6e9732b


[ROCm/clr commit: 4a901f3dd3]
This commit is contained in:
Aryan Salmanpour
2020-07-06 15:11:05 -04:00
parent bf3fd89566
commit 8d083a3c61
2 changed files with 4 additions and 2 deletions
@@ -2198,7 +2198,8 @@ bool Device::SetClockMode(const cl_set_device_clock_mode_input_amd setClockModeI
static void callbackQueue(hsa_status_t status, hsa_queue_t* queue, void* data) {
if (status != HSA_STATUS_SUCCESS && status != HSA_STATUS_INFO_BREAK) {
// Abort on device exceptions.
DevLogPrintfError("Device::callbackQueue aborting with status: %d \n", status);
ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS, "Device::callbackQueue aborting with status: 0x%x",
status);
abort();
}
}
@@ -1903,7 +1903,8 @@ void VirtualGPU::submitMigrateMemObjects(amd::MigrateMemObjectsCommand& vcmd) {
static void callbackQueue(hsa_status_t status, hsa_queue_t* queue, void* data) {
if (status != HSA_STATUS_SUCCESS && status != HSA_STATUS_INFO_BREAK) {
// Abort on device exceptions.
DevLogPrintfError("VirtualGPU::callbackQueue aborting with status: %d \n", status);
ClPrint(amd::LOG_NONE, amd::LOG_ALWAYS, "VirtualGPU::callbackQueue aborting with status: 0x%x",
status);
abort();
}
}