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
Dieser Commit ist enthalten in:
German Andryeyev verfasst und David Yat Sin committed 2024-10-25 14:37:02 -04:00
1 Ursprung d90fbee9c4
Commit 0fc7369ba5
4 Dateien geändert
+134 -52

Keine Dateien entsprechen Ihrer Suche

+6
Datei anzeigen
@@ -250,6 +250,9 @@ class Flag {
var = os::GetEnvVar("HSA_ALLOCATE_QUEUE_DEV_MEM");
dev_mem_queue_ = (var == "1") ? true : false;
var = os::GetEnvVar("HSA_WAIT_ANY_DEBUG");
wait_any_ = (var == "1") ? true : false;
}
void parse_masks(uint32_t maxGpu, uint32_t maxCU) {
@@ -257,6 +260,8 @@ class Flag {
parse_masks(var, maxGpu, maxCU);
}
bool wait_any() const { return wait_any_; }
bool check_flat_scratch() const { return check_flat_scratch_; }
bool enable_vm_fault_message() const { return enable_vm_fault_message_; }
@@ -389,6 +394,7 @@ class Flag {
bool image_print_srd_;
bool enable_mwaitx_;
bool enable_ipc_mode_legacy_;
bool wait_any_;
bool dev_mem_queue_;
SDMA_OVERRIDE enable_sdma_;