From 4e047235f07bc81e10a3d3cf2e8e66b5f38e5c2c Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 30 Aug 2018 12:17:57 -0400
Subject: [PATCH] P4 to Git Change 1600056 by
skudchad@skudchad_test2_win_opencl on 2018/08/30 12:04:10
SWDEV-145570 - [HIP] Fix elapsed time calc for hipEvent
ReviewBoardURL = http://ocltc.amd.com/reviews/r/15717/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#6 edit
---
hipamd/api/hip/hip_event.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hipamd/api/hip/hip_event.cpp b/hipamd/api/hip/hip_event.cpp
index 197eac0579..d01273cdb5 100644
--- a/hipamd/api/hip/hip_event.cpp
+++ b/hipamd/api/hip/hip_event.cpp
@@ -119,7 +119,8 @@ hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop) {
HIP_RETURN(hipErrorInvalidValue);
}
- *ms = static_cast(eStop->event_->profilingInfo().submitted_ - eStart->event_->profilingInfo().submitted_)/1000000.f;
+ *ms = static_cast(static_cast(eStop->event_->profilingInfo().submitted_ -
+ eStart->event_->profilingInfo().submitted_))/1000000.f;
HIP_RETURN(hipSuccess);
}