Disable flush on marker

Change-Id: I04d0fd995fb4b29a6bc372e1543902a053017d6a
This commit is contained in:
German Andryeyev
2020-06-19 18:04:25 -04:00
committed by Saleel Kudchadker
parent 0eebbb4f87
commit 44c1df802e
3 changed files with 8 additions and 5 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
// Events are the same, which indicates the stream is empty and likely
// eventRecord is called on another stream. For such cases insert and measure a
// marker.
amd::Command* command = new amd::Marker(*event_->command().queue(), false);
amd::Command* command = new amd::Marker(*event_->command().queue(), kMarkerDisableFlush);
command->enqueue();
command->awaitCompletion();
ms = static_cast<float>(static_cast<int64_t>(command->event().profilingInfo().end_ -
@@ -127,7 +127,7 @@ hipError_t Event::streamWait(amd::HostQueue* hostQueue, uint flags) {
amd::Command::EventWaitList eventWaitList;
eventWaitList.push_back(event_);
amd::Command* command = new amd::Marker(*hostQueue, false, eventWaitList);
amd::Command* command = new amd::Marker(*hostQueue, kMarkerDisableFlush, eventWaitList);
if (command == NULL) {
return hipErrorOutOfMemory;
}
@@ -240,7 +240,7 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) {
amd::HostQueue* queue = hip::getQueue(stream);
amd::Command* command = queue->getLastQueuedCommand(true);
if (command == nullptr) {
command = new amd::Marker(*queue, false);
command = new amd::Marker(*queue, kMarkerDisableFlush);
command->enqueue();
}