refactor: call synchronized dispatch functions only when enabled

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek 2025-04-25 14:32:33 +00:00 committed by Compute-Runtime-Automation
parent c41ac0ad4c
commit 7f777814d9
1 changed files with 6 additions and 3 deletions

View File

@ -419,8 +419,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernel(ze_kernel_h
if (launchParams.isCooperative && this->implicitSynchronizedDispatchForCooperativeKernelsAllowed) {
enableSynchronizedDispatch(NEO::SynchronizedDispatchMode::full);
}
appendSynchronizedDispatchInitializationSection();
if (this->synchronizedDispatchMode != NEO::SynchronizedDispatchMode::disabled) {
appendSynchronizedDispatchInitializationSection();
}
Event *event = nullptr;
if (hEvent) {
@ -441,7 +442,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernel(ze_kernel_h
handleInOrderDependencyCounter(event, isInOrderNonWalkerSignalingRequired(event) && !(event && event->isCounterBased() && event->isUsingContextEndOffset()), false);
}
appendSynchronizedDispatchCleanupSection();
if (this->synchronizedDispatchMode != NEO::SynchronizedDispatchMode::disabled) {
appendSynchronizedDispatchCleanupSection();
}
addToMappedEventList(event);
if (NEO::debugManager.flags.EnableSWTags.get()) {