SWDEV-486602 - Optimize HSA callback performance

- Don't generate callbacks for HIP events
- Don't process profiling info in the callback for HIP events
- Wait for CPU status update of the submitted commands
every 50 calls. That will allow to drain the commands and
destroy HSA signals.

Change-Id: Ib601a350e7e7c2b6c6209a172385389baccf73a9
This commit is contained in:
German Andryeyev
2024-09-20 19:19:51 -04:00
rodzic 5da72f9d52
commit 364dfb0ed1
12 zmienionych plików z 58 dodań i 54 usunięć
+3 -1
Wyświetl plik
@@ -366,7 +366,9 @@ void Command::enqueue() {
ScopedLock sl(queue_->vdev()->execution());
queue_->FormSubmissionBatch(this);
if (type() == CL_COMMAND_MARKER || type() == 0 || type() == CL_COMMAND_TASK) {
// Enqueue flushes, except profiling markers to avoid frequent expensive callbacks
if (((type() == 0) && profilingInfo().batch_flush_) ||
(type() == CL_COMMAND_MARKER) || (type() == CL_COMMAND_TASK)) {
// The current HSA signal tracking logic requires profiling enabled for the markers
EnableProfiling();
// Update batch head for the current marker. Hence the status of all commands can be