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); }