SWDEV-307915 - hipHccModuleLaunchKernel correct event timing

Change-Id: I397a3d6cf0cf8639666befb9ed7a357c6753741c


[ROCm/clr commit: 8d30df5ccf]
This commit is contained in:
anusha GodavarthySurya
2021-10-25 21:46:46 -07:00
parent ad0dc7dd0e
commit 81fa107364
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -98,12 +98,13 @@ class Event {
hipError_t recordCommand(amd::Command*& command, amd::HostQueue* queue);
hipError_t enqueueRecordCommand(hipStream_t stream, amd::Command* command, bool record);
hipError_t addMarker(hipStream_t stream, amd::Command* command, bool record);
void BindCommand(amd::Command& command) {
void BindCommand(amd::Command& command, bool record) {
amd::ScopedLock lock(lock_);
if (event_ != nullptr) {
event_->release();
}
event_ = &command.event();
recorded_ = record;
command.retain();
}
+2 -2
View File
@@ -390,7 +390,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
if (startEvent != nullptr) {
hip::Event* eStart = reinterpret_cast<hip::Event*>(startEvent);
status = eStart->addMarker(hStream, nullptr, false);
status = eStart->addMarker(hStream, nullptr, true);
if (status != hipSuccess) {
return status;
}
@@ -400,7 +400,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
if (stopEvent != nullptr) {
hip::Event* eStop = reinterpret_cast<hip::Event*>(stopEvent);
eStop->BindCommand(*command);
eStop->BindCommand(*command, true);
}
command->release();