rocr: Disable WaitAny() in AsyncEventsLoop()

- Add the new path to avoid WaitAny() calls  in AsyncEventsLoopp() with
HSA_WAIT_ANY_DEBUG key. The new path is selected by default.
The optimizaiton combines all logic of WaitAny() in a single processing loop
and avoids extra memory allocations or ref counting.  Also it won't spin
on the CPU if all events are busy.

Change-Id: I197ce60d0d023fbb672f700d6e87702686f1f55a
This commit is contained in:
German Andryeyev
2024-10-11 16:26:45 -04:00
committato da David Yat Sin
parent d90fbee9c4
commit 0fc7369ba5
4 ha cambiato i file con 134 aggiunte e 52 eliminazioni
@@ -556,6 +556,8 @@ class Runtime {
std::vector<hsa_signal_condition_t> cond_;
std::vector<hsa_signal_value_t> value_;
std::vector<hsa_amd_signal_handler> handler_;
std::vector<HsaEvent*> hsa_events_; //!< A list of HSA events for KFD wait
std::vector<uint64_t> age_; //!< The age list for KFD wait
std::vector<void*> arg_;
};