diff --git a/projects/clr/rocclr/platform/command.cpp b/projects/clr/rocclr/platform/command.cpp index b6f496930a..522f95cd03 100644 --- a/projects/clr/rocclr/platform/command.cpp +++ b/projects/clr/rocclr/platform/command.cpp @@ -240,11 +240,11 @@ void Command::enqueue() { Agent::postEventCreate(as_cl(static_cast(this)), type_); } + ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this); + queue_->append(*this); if (IS_HIP) { queue_->setLastQueuedCommand(this); } - ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this); - queue_->append(*this); queue_->flush(); if ((queue_->device().settings().waitCommand_ && (type_ != 0)) || ((commandWaitBits_ & 0x2) != 0)) {