Don't create a marker for start event in hipModuleLaunchKernel

And also don't optimize the case where start==stop event to compute
elapsed time since the command can be a NDRange one.
HIP directed test will need to be fixed for that.

Change-Id: I64fadd6ab8ab1a490e7a2b7165a591df5a5cf3a2
This commit is contained in:
Christophe Paquot
2020-02-17 14:16:31 -08:00
parent 52e6e35bf4
commit 1f5ae789bb
2 changed files with 6 additions and 13 deletions
+2 -6
View File
@@ -86,12 +86,8 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
return hipErrorNotReady;
}
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;
}
ms = static_cast<float>(static_cast<int64_t>(eStop.event_->profilingInfo().end_ -
event_->profilingInfo().start_))/1000000.f;
return hipSuccess;
}