SWDEV-272496 - Detect callbacks and force AQL barrier
HIP tests require HIP callbacks to be processed in another thread. This change will use a thread from HSA signal callbacks to make sure a HIP callback was done asynchronously. Also process the callback before changing the status of command Change-Id: Icef85d0e0f808663882cf6881ff1be3e5eca29ac
This commit is contained in:
@@ -2853,9 +2853,18 @@ void VirtualGPU::flush(amd::Command* list, bool wait) {
|
||||
if (skip_cpu_wait) {
|
||||
// Search for the last command in the batch to track GPU state
|
||||
amd::Command* current = list;
|
||||
// HIP tests expect callbacks processed from another thread, hence force AQL barrier always, so
|
||||
// HSA signal callback will process HIP callback asynchronously
|
||||
if (list->Callback() != nullptr) {
|
||||
hasPendingDispatch_ = true;
|
||||
}
|
||||
while (current->getNext() != nullptr) {
|
||||
current = current->getNext();
|
||||
if (current->Callback() != nullptr) {
|
||||
hasPendingDispatch_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable profiling, so runtime can track TS
|
||||
profilingBegin(*current);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user