Add support for reporting vm faults through the queue error handler.

Under xnack we can now identify the queue which generated a vm fault.
This allows users to identify which queue, and therefore which
dispatch, a vm fault came from.

Change-Id: If72ff3de05800f2b811aa7842a15eedff8b5e45a


[ROCm/ROCR-Runtime commit: 59ee761f81]
This commit is contained in:
Sean Keely
2021-07-15 14:28:48 -05:00
rodzic 0a2ad007a4
commit 32766de851
3 zmienionych plików z 12 dodań i 1 usunięć
@@ -970,7 +970,7 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) {
// EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION
4, (hsa_status_t)HSA_STATUS_ERROR_ILLEGAL_INSTRUCTION,
// EC_QUEUE_WAVE_MEMORY_VIOLATION
5, HSA_STATUS_ERROR,
5, (hsa_status_t)HSA_STATUS_ERROR_MEMORY_FAULT,
// EC_QUEUE_WAVE_APERTURE_VIOLATION
6, (hsa_status_t)HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION,
// EC_QUEUE_PACKET_DISPATCH_DIM_INVALID
@@ -2758,6 +2758,10 @@ hsa_status_t hsa_status_string(
*status_string =
"HSA_EXT_STATUS_ERROR_DIRECTIVE_MISMATCH: Directive mismatch";
break;
case HSA_STATUS_ERROR_MEMORY_FAULT:
*status_string =
"HSA_STATUS_ERROR_MEMORY_FAULT: Agent attempted to access an inaccessible address.";
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}
@@ -184,6 +184,13 @@ enum {
* Agent executed an invalid shader instruction.
*/
HSA_STATUS_ERROR_ILLEGAL_INSTRUCTION = 42,
/**
* Agent attempted to access an inaccessible address.
* See hsa_amd_register_system_event_handler and
* HSA_AMD_GPU_MEMORY_FAULT_EVENT for more information on illegal accesses.
*/
HSA_STATUS_ERROR_MEMORY_FAULT = 43,
};
/**