SWDEV-492563 - Fix Ocl issues

1. Fix LDSSize type to be uint32_t.
2. Prevent clWaitForEvents running on complete events whose
   HostQueue have been destructed.

Change-Id: I829e915f56b37db2ba76bb876c9656166534f154
This commit is contained in:
Tao Sang
2024-10-23 10:32:46 -04:00
zatwierdzone przez Tao Sang
rodzic e23ff0520b
commit 82dff9a67d
2 zmienionych plików z 7 dodań i 3 usunięć
+5 -2
Wyświetl plik
@@ -94,14 +94,17 @@ RUNTIME_ENTRY(cl_int, clWaitForEvents, (cl_uint num_events, const cl_event* even
}
// Make sure all the events are associated with the same context
const amd::Context* context = &as_amd(event)->context();
amd::Event* amdEvent = as_amd(event);
if (amdEvent->status() == CL_COMPLETE) continue;
const amd::Context* context = &amdEvent->context();
if (prevContext != NULL && prevContext != context) {
return CL_INVALID_CONTEXT;
}
prevContext = context;
// Flush the command queues associated with event1...eventN
amd::HostQueue* queue = as_amd(event)->command().queue();
amd::HostQueue* queue = amdEvent->command().queue();
if (queue != NULL && prevQueue != queue) {
queue->flush();
}