From 5b60eee02ef6df81ac0d78dad134883b992cbc81 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Tue, 12 May 2020 09:37:56 -0700 Subject: [PATCH] SWDEV-235495 Fix elapsed time calculation This issue happens because we getLastQueuedCommand when recording the event and do end_ - start_ so it takes the ticks for the completion of the last command before event record. This may not happen if one records a marker command for hipEventRecord Change-Id: I1d6b06a5befb3b93f16b67692c59dca25c982e0f --- hipamd/rocclr/hip_event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/rocclr/hip_event.cpp b/hipamd/rocclr/hip_event.cpp index f2738169a8..dddadd1bfd 100644 --- a/hipamd/rocclr/hip_event.cpp +++ b/hipamd/rocclr/hip_event.cpp @@ -91,7 +91,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) { } ms = static_cast(static_cast(eStop.event_->profilingInfo().end_ - - event_->profilingInfo().start_))/1000000.f; + event_->profilingInfo().end_))/1000000.f; return hipSuccess; }