From f4032401cf263b53da036b1cc5cdb0d5237a840b Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Tue, 6 Jul 2021 14:09:22 -0400 Subject: [PATCH] SWDEV-289378 - Avoid CPU TS overwrite if GPU TS is available Change-Id: I444ec284669b6a6fff31182e213b47c562c90192 --- rocclr/device/rocm/rocvirtual.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/device/rocm/rocvirtual.hpp b/rocclr/device/rocm/rocvirtual.hpp index fcf75b094e..277289731b 100644 --- a/rocclr/device/rocm/rocvirtual.hpp +++ b/rocclr/device/rocm/rocvirtual.hpp @@ -135,7 +135,7 @@ class Timestamp : public amd::HeapObject { // Timestamp value can be updated by HW profiling if current command had a stall. // Although CPU TS should be still valid in this situation, there are cases in VM mode // when CPU timeline is out of sync with GPU timeline and shifted time can be reported - if (end_ != 0) { + if (end_ == 0) { end_ = amd::Os::timeNanos(); } }