diff --git a/level_zero/core/source/device/bcs_split.h b/level_zero/core/source/device/bcs_split.h index a8b7c12a78..3684628016 100644 --- a/level_zero/core/source/device/bcs_split.h +++ b/level_zero/core/source/device/bcs_split.h @@ -74,6 +74,7 @@ struct BcsSplit { NEO::TransferDirection direction, std::function appendCall) { ze_result_t result = ZE_RESULT_SUCCESS; + const bool hasStallingCmds = !hasRelaxedOrderingDependencies; auto markerEventIndexRet = this->events.obtainForSplit(Context::fromHandle(cmdList->getCmdListContext()), MemoryConstants::pageSize64k / sizeof(typename CommandListCoreFamilyImmediate::GfxFamily::TimestampPacketType)); if (!markerEventIndexRet.has_value()) { @@ -120,7 +121,7 @@ struct BcsSplit { result = appendCall(localDstPtr, localSrcPtr, localSize, eventHandle); if (cmdList->flushTaskSubmissionEnabled()) { - cmdList->executeCommandListImmediateWithFlushTaskImpl(performMigration, false, hasRelaxedOrderingDependencies, false, cmdQsForSplit[i]); + cmdList->executeCommandListImmediateWithFlushTaskImpl(performMigration, hasStallingCmds, hasRelaxedOrderingDependencies, false, cmdQsForSplit[i]); } else { cmdList->executeCommandListImmediateImpl(performMigration, cmdQsForSplit[i]); } diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp index c900404e81..f0fa4f7bbc 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_cmdqueue_xe_hpc_core.cpp @@ -984,6 +984,17 @@ HWTEST2_F(CommandQueueCommandsXeHpc, givenFlushTaskSubmissionEnabledAndSplitBcsC EXPECT_EQ(static_cast(static_cast(testL0Device.get())->bcsSplit.cmdQs[3])->getCsr()->peekTaskCount(), 1u); EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies); + commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, false, false); + EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies); + EXPECT_FALSE(ultCsr->latestFlushedBatchBuffer.hasStallingCmds); + + directSubmission->relaxedOrderingEnabled = false; + + commandList0->appendMemoryCopy(dstPtr, srcPtr, size, nullptr, 0, nullptr, false, false); + + EXPECT_FALSE(ultCsr->latestFlushedBatchBuffer.hasRelaxedOrderingDependencies); + EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasStallingCmds); + context->freeMem(srcPtr); context->freeMem(dstPtr); }