libhsakmt: Fix processing of memory fault events
AMDKFD_IOC_WAIT_EVENTS with multiple events and wait_for_all = 0
returns success after any of the events have signaled. So we can't
blindly assume that a memory fault event that was in the list has
actually signaled. Check the gpu_id as an indicator whether there
really was a memory fault before processing it further.
Change-Id: I6cc311bfc184c631beaf684027176a6ca42e05c1
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
[ROCm/ROCR-Runtime commit: 9271e69ddf]
Αυτή η υποβολή περιλαμβάνεται σε:
@@ -313,7 +313,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtWaitOnMultipleEvents(HsaEvent *Events[],
|
||||
else {
|
||||
result = HSAKMT_STATUS_SUCCESS;
|
||||
for (HSAuint32 i = 0; i < NumEvents; i++) {
|
||||
if (Events[i]->EventData.EventType == HSA_EVENTTYPE_MEMORY) {
|
||||
if (Events[i]->EventData.EventType == HSA_EVENTTYPE_MEMORY &&
|
||||
event_data[i].memory_exception_data.gpu_id) {
|
||||
Events[i]->EventData.EventData.MemoryAccessFault.VirtualAddress = event_data[i].memory_exception_data.va;
|
||||
result = gpuid_to_nodeid(event_data[i].memory_exception_data.gpu_id, &Events[i]->EventData.EventData.MemoryAccessFault.NodeId);
|
||||
if (result != HSAKMT_STATUS_SUCCESS)
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user