From 8864e53265d7c50d6105200febfb85ed8dccd207 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Wed, 20 Apr 2022 09:26:53 -0700 Subject: [PATCH] SWDEV-333237 - Disable cache status Enable Cache status only for ROC_EVENT_NO_FLUSH Change-Id: I0de4c5af2226bccd66fd704be23c2db33050f2e2 --- rocclr/device/rocm/rocdevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index e562fb48dd..d8eae84e98 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -2657,7 +2657,9 @@ void Device::getHwEventTime(const amd::Event& event, uint64_t* start, uint64_t* // ================================================================================================ bool Device::IsCacheFlushed(Device::CacheState state) const { - return (static_cast(state) == cache_state_.load(std::memory_order_relaxed)); + + return ROC_EVENT_NO_FLUSH ? + (static_cast(state) == cache_state_.load(std::memory_order_relaxed)) : true; } // ================================================================================================