SWDEV-521647 - Fix tracking of hw_event (#206)

- When a command may possibly have two packets(like device heap
  initializer), and if there is no signal on the main kernel packet the
tracking was broken as it marked HW event of the command as the first
packet signal.
- Make sure if no completion signal is attached to the second packet
  then clear the HW event for the command.
This commit is contained in:
Kudchadker, Saleel
2025-04-25 08:46:44 -07:00
gecommit door GitHub
bovenliggende ce24936970
commit 072fb0804e
5 gewijzigde bestanden met toevoegingen van 39 en 24 verwijderingen
+5 -1
Bestand weergeven
@@ -2863,7 +2863,11 @@ bool Device::IsHwEventReady(const amd::Event& event, bool wait, uint32_t hip_eve
bool active_wait = !(hip_event_flags & kHipEventBlockingSync) && ActiveWait();
return WaitForSignal(reinterpret_cast<ProfilingSignal*>(hw_event)->signal_, active_wait);
}
return (hsa_signal_load_relaxed(reinterpret_cast<ProfilingSignal*>(hw_event)->signal_) == 0);
auto signal = reinterpret_cast<ProfilingSignal*>(hw_event)->signal_;
ClPrint(amd::LOG_INFO, amd::LOG_SIG, "Check HW event = 0x%lx", signal.handle);
return (hsa_signal_load_relaxed(signal) == 0);
}
// ================================================================================================