From 8e08880cc3429cbb8ec65ca046e9a33aeffa61f2 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Wed, 16 Jun 2021 22:11:26 -0700 Subject: [PATCH] SWDEV-247372 - Add logging for debug Change-Id: Id5a27034005a7deba37072d8a4c6f250104a96c8 --- rocclr/device/rocm/rocdevice.cpp | 1 + rocclr/platform/commandqueue.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index 711d782eaf..0551e0e983 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -2524,6 +2524,7 @@ bool Device::IsHwEventReady(const amd::Event& event, bool wait) const { void* hw_event = (event.NotifyEvent() != nullptr) ? event.NotifyEvent()->HwEvent() : event.HwEvent(); if (hw_event == nullptr) { + ClPrint(amd::LOG_INFO, amd::LOG_SIG, "No HW event"); return false; } else if (wait) { WaitForSignal(reinterpret_cast(hw_event)->signal_); diff --git a/rocclr/platform/commandqueue.cpp b/rocclr/platform/commandqueue.cpp index 998dcb5048..ea80a82dea 100644 --- a/rocclr/platform/commandqueue.cpp +++ b/rocclr/platform/commandqueue.cpp @@ -120,6 +120,7 @@ void HostQueue::finish() { // Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status static constexpr bool kWaitCompletion = true; if (!device().IsHwEventReady(command->event(), kWaitCompletion)) { + ClPrint(LOG_DEBUG, LOG_CMD, "HW Event not ready, awaiting completion instead"); command->awaitCompletion(); } command->release();