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:
foreman
2019-07-08 18:14:01 -04:00
parent 270c652d0f
commit 3439e27f6d
+6 -2
View File
@@ -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;
}