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:
+4
-7
@@ -324,12 +324,6 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
}
|
||||
}
|
||||
|
||||
if(startEvent != nullptr) {
|
||||
amd::Command* startCommand = new hip::TimerMarker(*queue);
|
||||
startCommand->enqueue();
|
||||
eStart->addMarker(queue, startCommand);
|
||||
}
|
||||
|
||||
amd::NDRangeKernelCommand* command = new amd::NDRangeKernelCommand(
|
||||
*queue, waitList, *kernel, ndrange, sharedMemBytes,
|
||||
params, gridId, numGrids, prevGridSum, allGridSum, firstDevice);
|
||||
@@ -345,11 +339,14 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
|
||||
|
||||
command->enqueue();
|
||||
|
||||
if(startEvent != nullptr) {
|
||||
eStart->addMarker(queue, command);
|
||||
command->retain();
|
||||
}
|
||||
if(stopEvent != nullptr) {
|
||||
eStop->addMarker(queue, command);
|
||||
command->retain();
|
||||
}
|
||||
|
||||
command->release();
|
||||
|
||||
return hipSuccess;
|
||||
|
||||
Reference in New Issue
Block a user