P4 to Git Change 1960615 by gandryey@gera-win10 on 2019/07/08 18:05:10
SWDEV-79445 - HIP generic changes and code clean-up - Correct elapsed time calculation. Use event start and end. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#13 edit
This commit is contained in:
@@ -88,8 +88,12 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
|
||||
return hipErrorNotReady;
|
||||
}
|
||||
|
||||
ms = static_cast<float>(static_cast<int64_t>(eStop.event_->profilingInfo().submitted_ -
|
||||
event_->profilingInfo().submitted_))/1000000.f;
|
||||
if (event_ != eStop.event_) {
|
||||
ms = static_cast<float>(static_cast<int64_t>(eStop.event_->profilingInfo().end_ -
|
||||
event_->profilingInfo().start_))/1000000.f;
|
||||
} else {
|
||||
ms = 0.f;
|
||||
}
|
||||
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user