SWDEV-424249 - Check if HwEvent is available

Allocate marker only if HW event doesn't exist for the last command.

Change-Id: I3e7284202365a9c75313fb5403f0c1908ab51d1e


[ROCm/clr commit: 596b496c16]
Этот коммит содержится в:
German Andryeyev
2023-09-28 15:00:40 -04:00
родитель 1502016756
Коммит ee34d05add
+9 -1
Просмотреть файл
@@ -121,7 +121,15 @@ void HostQueue::finish(bool cpu_wait) {
return;
}
}
if (nullptr == command || command->type() != CL_COMMAND_MARKER ||
// If command doesn't contain HW event and runtime didn't request CPU wait,
// then force marker submit
bool force_marker = false;
if (AMD_DIRECT_DISPATCH && (command != nullptr) && !cpu_wait) {
void* hw_event =
(command->NotifyEvent() != nullptr) ? command->NotifyEvent()->HwEvent() : command->HwEvent();
force_marker = (hw_event == nullptr);
}
if (nullptr == command || force_marker ||
vdev()->isHandlerPending() || vdev()->isFenceDirty()) {
if (nullptr != command) {
command->release();