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.
Bu işleme şunda yer alıyor:
Kudchadker, Saleel
2025-04-25 08:46:44 -07:00
işlemeyi yapan: GitHub
ebeveyn ce24936970
işleme 072fb0804e
5 değiştirilmiş dosya ile 39 ekleme ve 24 silme
+5 -1
Dosyayı Görüntüle
@@ -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);
}
// ================================================================================================