Change error reported when receiving code 128

We used to report HSA_STATUS_ERROR_INVALID_ISA when receiving error code
128, but there are several other reasons why we could be exceeding
number of VGPRs, so updating the error code.

Change-Id: I6a6980d5b07b09c93d00dee5207a0d52399bc77e
This commit is contained in:
David Yat Sin
2023-04-06 18:59:39 +00:00
parent 511855d344
commit f43a284b8e
3 changed files with 11 additions and 1 deletions
@@ -941,7 +941,7 @@ bool AqlQueue::DynamicScratchHandler(hsa_signal_value_t error_code, void* arg) {
errorCode = HSA_STATUS_ERROR_INVALID_ARGUMENT;
} else if ((error_code & 128) == 128) { // Out of VGPRs
errorCode = HSA_STATUS_ERROR_INVALID_ISA;
errorCode = hsa_status_t(HSA_STATUS_ERROR_OUT_OF_REGISTERS);
} else if ((error_code & 0x20000000) == 0x20000000) { // Memory violation (>48-bit)
errorCode = hsa_status_t(HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION);
+5
View File
@@ -2751,6 +2751,11 @@ hsa_status_t hsa_status_string(
"enable a CU which was disabled for the process. CUs disabled for the process remain "
"disabled.";
break;
case HSA_STATUS_ERROR_OUT_OF_REGISTERS:
*status_string =
"HSA_STATUS_ERROR_OUT_OF_REGISTERS: Kernel has requested more VGPRs than are available "
"on this agent";
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}
+5
View File
@@ -202,6 +202,11 @@ enum {
* disabled.
*/
HSA_STATUS_CU_MASK_REDUCED = 44,
/**
* Exceeded number of VGPRs available on this agent
*/
HSA_STATUS_ERROR_OUT_OF_REGISTERS = 45,
};
/**