From c952deaace73c7fa22c2c47794e3cf005fc42bb3 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Wed, 2 Jun 2021 09:03:17 -0700 Subject: [PATCH] SWDEV-286092 - Enable handler for marker always For DD, send a NOP packet so that we leverage the handler to indicate completion. Change-Id: Ie57ea0124a8497d39cc49da1c4575c2cd86b9319 [ROCm/clr commit: 9d0846e73261f24772161cd1a30b4b83b5a60959] --- projects/clr/rocclr/platform/command.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/platform/command.cpp b/projects/clr/rocclr/platform/command.cpp index b8dfb244ae..7fccab9e60 100644 --- a/projects/clr/rocclr/platform/command.cpp +++ b/projects/clr/rocclr/platform/command.cpp @@ -328,14 +328,19 @@ void Command::enqueue() { // when multiple threads submit/flush/update the batch at the same time ScopedLock sl(queue_->vdev()->execution()); queue_->FormSubmissionBatch(this); - if ((type() == CL_COMMAND_MARKER || type() == 0) && !profilingInfo().marker_ts_) { + if ((type() == CL_COMMAND_MARKER || type() == 0)) { // 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 // updated upon the marker completion SetBatchHead(queue_->GetSubmittionBatch()); - // Flush the current batch, but skip the wait on CPU if possible to avoid a stall - queue_->vdev()->flush(queue_->GetSubmittionBatch()); + if (profilingInfo().marker_ts_) { + setStatus(CL_SUBMITTED); + submit(*queue_->vdev()); + } else { + // Flush the current batch, but skip the wait on CPU if possible to avoid a stall + queue_->vdev()->flush(queue_->GetSubmittionBatch()); + } // The batch will be tracked with the marker now queue_->ResetSubmissionBatch(); } else {