diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl index e1f7b442c5..8617b56308 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl @@ -83,7 +83,6 @@ void CommandListCoreFamilyImmediate::updateDispatchFlagsWithRequi : NEO::AdditionalKernelExecInfo::NotSet; const auto &requiredStateComputeMode = this->requiredStreamState.stateComputeMode; - dispatchFlags.requiresCoherency = (requiredStateComputeMode.isCoherencyRequired.value == 1); dispatchFlags.numGrfRequired = (requiredStateComputeMode.largeGrfMode.value == 1) ? GrfConfig::LargeGrfNumber : GrfConfig::DefaultGrfNumber; dispatchFlags.threadArbitrationPolicy = requiredStateComputeMode.threadArbitrationPolicy.value; @@ -231,7 +230,6 @@ NEO::CompletionStamp CommandListCoreFamilyImmediate::flushRegular this->getCommandListSLMEnable(), // useSLM this->isSyncModeQueue, // guardCommandBufferWithPipeControl false, // gsba32BitRequired - false, // requiresCoherency false, // lowPriority true, // implicitFlush this->csr->isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed diff --git a/level_zero/core/source/cmdqueue/cmdqueue.cpp b/level_zero/core/source/cmdqueue/cmdqueue.cpp index ab4b1ce4b7..327bc2fd22 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue.cpp +++ b/level_zero/core/source/cmdqueue/cmdqueue.cpp @@ -121,7 +121,7 @@ NEO::SubmissionStatus CommandQueueImp::submitBatchBuffer(size_t offset, NEO::Res bool isCooperative) { UNRECOVERABLE_IF(csr == nullptr); - NEO::BatchBuffer batchBuffer(this->startingCmdBuffer->getGraphicsAllocation(), offset, 0, 0, nullptr, false, false, + NEO::BatchBuffer batchBuffer(this->startingCmdBuffer->getGraphicsAllocation(), offset, 0, 0, nullptr, false, NEO::QueueThrottle::HIGH, NEO::QueueSliceCount::defaultSliceCount, this->startingCmdBuffer->getUsed(), this->startingCmdBuffer, endingCmdPtr, csr->getNumClients(), true, false); batchBuffer.disableFlatRingBuffer = true; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp index b996463afc..5825d70cc1 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp @@ -67,7 +67,6 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus DebugManagerStateRestore restorer; DebugManager.flags.UseImmediateFlushTask.set(0); - auto &gfxCoreHelper = device->getGfxCoreHelper(); auto &productHelper = device->getProductHelper(); std::unique_ptr commandList; @@ -81,7 +80,7 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus commandListImmediate.requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value = 1; commandListImmediate.requiredStreamState.frontEndState.disableEUFusion.value = 1; commandListImmediate.requiredStreamState.frontEndState.disableOverdispatch.value = 1; - commandListImmediate.requiredStreamState.stateComputeMode.isCoherencyRequired.value = 1; + commandListImmediate.requiredStreamState.stateComputeMode.isCoherencyRequired.value = 0; commandListImmediate.requiredStreamState.stateComputeMode.largeGrfMode.value = 1; commandListImmediate.requiredStreamState.stateComputeMode.threadArbitrationPolicy.value = NEO::ThreadArbitrationPolicy::RoundRobin; commandListImmediate.executeCommandListImmediateWithFlushTask(false, false, false, true); @@ -92,7 +91,6 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus productHelper.fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport, device->getHwInfo()); int expectedDisableOverdispatch = frontEndPropertiesSupport.disableOverdispatch; - int32_t expectedIsCoherencyRequired = scmPropertiesSupport.coherencyRequired ? gfxCoreHelper.forceNonGpuCoherencyWA(true) : -1; int expectedLargeGrfMode = scmPropertiesSupport.largeGrfMode ? 1 : -1; int expectedThreadArbitrationPolicy = scmPropertiesSupport.threadArbitrationPolicy ? NEO::ThreadArbitrationPolicy::RoundRobin : -1; @@ -103,7 +101,6 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus EXPECT_EQ(expectedComputeDispatchAllWalkerEnable, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); EXPECT_EQ(expectedDisableEuFusion, currentCsrStreamProperties.frontEndState.disableEUFusion.value); EXPECT_EQ(expectedDisableOverdispatch, currentCsrStreamProperties.frontEndState.disableOverdispatch.value); - EXPECT_EQ(expectedIsCoherencyRequired, currentCsrStreamProperties.stateComputeMode.isCoherencyRequired.value); EXPECT_EQ(expectedLargeGrfMode, currentCsrStreamProperties.stateComputeMode.largeGrfMode.value); EXPECT_EQ(expectedThreadArbitrationPolicy, currentCsrStreamProperties.stateComputeMode.threadArbitrationPolicy.value); @@ -116,7 +113,6 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus commandListImmediate.executeCommandListImmediateWithFlushTask(false, false, false, true); expectedLargeGrfMode = scmPropertiesSupport.largeGrfMode ? 0 : -1; - expectedIsCoherencyRequired = scmPropertiesSupport.coherencyRequired ? 0 : -1; expectedThreadArbitrationPolicy = scmPropertiesSupport.threadArbitrationPolicy ? NEO::ThreadArbitrationPolicy::AgeBased : -1; expectedComputeDispatchAllWalkerEnable = frontEndPropertiesSupport.computeDispatchAllWalker ? 0 : -1; @@ -126,7 +122,6 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus EXPECT_EQ(expectedComputeDispatchAllWalkerEnable, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); EXPECT_EQ(expectedDisableEuFusion, currentCsrStreamProperties.frontEndState.disableEUFusion.value); EXPECT_EQ(expectedDisableOverdispatch, currentCsrStreamProperties.frontEndState.disableOverdispatch.value); - EXPECT_EQ(expectedIsCoherencyRequired, currentCsrStreamProperties.stateComputeMode.isCoherencyRequired.value); EXPECT_EQ(expectedLargeGrfMode, currentCsrStreamProperties.stateComputeMode.largeGrfMode.value); EXPECT_EQ(expectedThreadArbitrationPolicy, currentCsrStreamProperties.stateComputeMode.threadArbitrationPolicy.value); } diff --git a/opencl/source/command_queue/enqueue_common.h b/opencl/source/command_queue/enqueue_common.h index af9716c56a..f7c888b95e 100644 --- a/opencl/source/command_queue/enqueue_common.h +++ b/opencl/source/command_queue/enqueue_common.h @@ -883,7 +883,6 @@ CompletionStamp CommandQueueHw::enqueueNonBlocked( multiDispatchInfo.usesSlm(), // useSLM !getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled() || commandType == CL_COMMAND_FILL_BUFFER, // guardCommandBufferWithPipeControl commandType == CL_COMMAND_NDRANGE_KERNEL, // GSBA32BitRequired - false, // requiresCoherency (QueuePriority::LOW == priority), // lowPriority implicitFlush, // implicitFlush !eventBuilder.getEvent() || getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed @@ -1143,7 +1142,6 @@ CompletionStamp CommandQueueHw::enqueueCommandWithoutKernel( false, // useSLM !getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl false, // GSBA32BitRequired - false, // requiresCoherency false, // lowPriority (enqueueProperties.operation == EnqueueProperties::Operation::Blit), // implicitFlush getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed diff --git a/opencl/source/helpers/task_information.cpp b/opencl/source/helpers/task_information.cpp index 827ece4cc1..9899243ae0 100644 --- a/opencl/source/helpers/task_information.cpp +++ b/opencl/source/helpers/task_information.cpp @@ -71,7 +71,6 @@ CompletionStamp &CommandMapUnmap::submit(TaskCountType taskLevel, bool terminate false, // useSLM !commandQueue.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl false, // GSBA32BitRequired - false, // requiresCoherency commandQueue.getPriority() == QueuePriority::LOW, // lowPriority false, // implicitFlush commandQueue.getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed @@ -209,7 +208,6 @@ CompletionStamp &CommandComputeKernel::submit(TaskCountType taskLevel, bool term slmUsed, // useSLM !commandQueue.getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl commandType == CL_COMMAND_NDRANGE_KERNEL, // GSBA32BitRequired - false, // requiresCoherency commandQueue.getPriority() == QueuePriority::LOW, // lowPriority false, // implicitFlush commandQueue.getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed @@ -388,7 +386,6 @@ CompletionStamp &CommandWithoutKernel::submit(TaskCountType taskLevel, bool term false, // useSLM !commandStreamReceiver.isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl false, // GSBA32BitRequired - false, // requiresCoherency commandQueue.getPriority() == QueuePriority::LOW, // lowPriority false, // implicitFlush commandStreamReceiver.isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp index 6106cbaac1..1658f0be76 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_1_tests.cpp @@ -893,7 +893,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleWh csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble); - commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, + commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(false, flushTaskFlags.numGrfRequired, flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled); flushTask(commandStreamReceiver); @@ -927,7 +927,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn csrCS.getSpace(csrCS.getAvailableSpace() - sizeNeededForPreamble - sizeNeededForStateBaseAddress); - commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, + commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(false, flushTaskFlags.numGrfRequired, flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled); flushTask(commandStreamReceiver); @@ -965,7 +965,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenEnoughMemoryOnlyForPreambleAn flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(mockDevice->getHardwareInfo()); - commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, + commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(false, flushTaskFlags.numGrfRequired, flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled); commandStreamReceiver.flushTask( commandStream, diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp index f21ff1d6ad..9b278a1a4e 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp @@ -1049,7 +1049,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, GivenPreambleSe auto expectedUsed = csrCS.getUsed() + sizeNeeded; expectedUsed = alignUp(expectedUsed, MemoryConstants::cacheLineSize); - commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(flushTaskFlags.requiresCoherency, flushTaskFlags.numGrfRequired, + commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(false, flushTaskFlags.numGrfRequired, flushTaskFlags.threadArbitrationPolicy, PreemptionMode::Disabled); commandStreamReceiver.flushTask(commandStream, 0, &dsh, &ioh, &ssh, taskLevel, flushTaskFlags, *pDevice); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp index 3cebee4cd5..1baadb06c8 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_3_tests.cpp @@ -87,7 +87,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas // we should be submitting via csr EXPECT_EQ(cmdBuffer->batchBuffer.commandBufferAllocation, mockCsr->commandStream.getGraphicsAllocation()); EXPECT_EQ(cmdBuffer->batchBuffer.startOffset, 0u); - EXPECT_FALSE(cmdBuffer->batchBuffer.requiresCoherency); EXPECT_FALSE(cmdBuffer->batchBuffer.lowPriority); // find BB END @@ -365,7 +364,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas auto baseAfterFirstFlushTask = commandStream.getCpuBase(); auto usedAfterFirstFlushTask = commandStream.getUsed(); - dispatchFlags.requiresCoherency = true; dispatchFlags.lowPriority = true; mockCsr->flushTask(commandStream, @@ -399,9 +397,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas EXPECT_GT(cmdBuffer2->batchBufferEndLocation, cmdBuffer1->batchBufferEndLocation); - EXPECT_FALSE(cmdBuffer1->batchBuffer.requiresCoherency); - EXPECT_TRUE(cmdBuffer2->batchBuffer.requiresCoherency); - EXPECT_FALSE(cmdBuffer1->batchBuffer.lowPriority); EXPECT_TRUE(cmdBuffer2->batchBuffer.lowPriority); @@ -425,7 +420,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInBatch DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags(); dispatchFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo()); dispatchFlags.guardCommandBufferWithPipeControl = true; - dispatchFlags.requiresCoherency = false; mockCsr->streamProperties.stateComputeMode.isCoherencyRequired.value = 0; @@ -466,7 +460,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrInBatch mockCsr->flushBatchedSubmissions(); EXPECT_FALSE(mockCsr->recordedCommandBuffer->batchBuffer.lowPriority); - EXPECT_FALSE(mockCsr->recordedCommandBuffer->batchBuffer.requiresCoherency); EXPECT_EQ(mockCsr->recordedCommandBuffer->batchBuffer.commandBufferAllocation, commandStream.getGraphicsAllocation()); EXPECT_EQ(4u, mockCsr->recordedCommandBuffer->batchBuffer.startOffset); EXPECT_EQ(1, mockCsr->flushCalledCount); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp index ca2431f907..728396d501 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp @@ -598,9 +598,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags(); dispatchFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo()); dispatchFlags.guardCommandBufferWithPipeControl = true; - dispatchFlags.requiresCoherency = true; - mockCsr->streamProperties.stateComputeMode.isCoherencyRequired.value = 1; + mockCsr->streamProperties.stateComputeMode.isCoherencyRequired.value = 0; commandStream.getSpace(4); @@ -642,7 +641,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi mockCsr->flushBatchedSubmissions(); EXPECT_FALSE(mockCsr->recordedCommandBuffer->batchBuffer.lowPriority); - EXPECT_TRUE(mockCsr->recordedCommandBuffer->batchBuffer.requiresCoherency); EXPECT_EQ(mockCsr->recordedCommandBuffer->batchBuffer.commandBufferAllocation, commandStream.getGraphicsAllocation()); EXPECT_EQ(4u, mockCsr->recordedCommandBuffer->batchBuffer.startOffset); EXPECT_EQ(1, mockCsr->flushCalledCount); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 9d01ca8455..e9d081351f 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -656,7 +656,6 @@ HWTEST_F(BcsTests, givenBufferWhenBlitCalledThenFlushCommandBuffer) { EXPECT_EQ(commandStreamOffset, csr.latestFlushedBatchBuffer.startOffset); EXPECT_EQ(0u, csr.latestFlushedBatchBuffer.chainedBatchBufferStartOffset); EXPECT_EQ(nullptr, csr.latestFlushedBatchBuffer.chainedBatchBuffer); - EXPECT_FALSE(csr.latestFlushedBatchBuffer.requiresCoherency); EXPECT_FALSE(csr.latestFlushedBatchBuffer.lowPriority); EXPECT_EQ(QueueThrottle::MEDIUM, csr.latestFlushedBatchBuffer.throttle); EXPECT_EQ(commandStream.getUsed(), csr.latestFlushedBatchBuffer.usedSize); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_dg2_and_later.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_dg2_and_later.cpp index 9bc720feef..64aead1cb2 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_dg2_and_later.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_tests_dg2_and_later.cpp @@ -97,7 +97,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskDg2AndLaterTests, givenProgramExtendedPi auto &gfxCoreHelper = pDevice->getGfxCoreHelper(); dispatchFlags.threadArbitrationPolicy = gfxCoreHelper.getDefaultThreadArbitrationPolicy(); - commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(dispatchFlags.requiresCoherency, dispatchFlags.numGrfRequired, + commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(false, dispatchFlags.numGrfRequired, dispatchFlags.threadArbitrationPolicy, PreemptionMode::Disabled); auto cmdSizeForAllCommands = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice); commandStreamReceiver.flushTask(commandStream, diff --git a/opencl/test/unit_test/command_stream/submissions_aggregator_tests.cpp b/opencl/test/unit_test/command_stream/submissions_aggregator_tests.cpp index 11bee234e8..400f31d1e8 100644 --- a/opencl/test/unit_test/command_stream/submissions_aggregator_tests.cpp +++ b/opencl/test/unit_test/command_stream/submissions_aggregator_tests.cpp @@ -388,35 +388,6 @@ TEST(SubmissionsAggregator, givenTwoCommandBufferWhereSecondContainsTheFirstComm EXPECT_EQ(12u, totalUsedSize); } -TEST(SubmissionsAggregator, givenCommandBuffersRequiringDifferentCoherencySettingWhenAggregateIsCalledThenTheyAreNotAgggregated) { - MockSubmissionAggregator submissionsAggregator; - - std::unique_ptr device(MockDevice::createWithNewExecutionEnvironment(nullptr)); - CommandBuffer *cmdBuffer = new CommandBuffer(*device); - CommandBuffer *cmdBuffer2 = new CommandBuffer(*device); - - MockGraphicsAllocation alloc1(nullptr, 1); - MockGraphicsAllocation alloc7(nullptr, 7); - - cmdBuffer->batchBuffer.requiresCoherency = true; - cmdBuffer2->batchBuffer.requiresCoherency = false; - - cmdBuffer->surfaces.push_back(&alloc1); - cmdBuffer2->surfaces.push_back(&alloc7); - - submissionsAggregator.recordCommandBuffer(cmdBuffer); - submissionsAggregator.recordCommandBuffer(cmdBuffer2); - - ResourcePackage resourcePackage; - size_t totalUsedSize = 0; - size_t totalMemoryBudget = 200; - submissionsAggregator.aggregateCommandBuffers(resourcePackage, totalUsedSize, totalMemoryBudget, 0u); - EXPECT_EQ(1u, totalUsedSize); - EXPECT_EQ(1u, resourcePackage.size()); - EXPECT_NE(cmdBuffer->inspectionId, cmdBuffer2->inspectionId); - EXPECT_EQ(1u, cmdBuffer->inspectionId); -} - TEST(SubmissionsAggregator, givenCommandBuffersRequiringDifferentThrottleSettingWhenAggregateIsCalledThenTheyAreNotAgggregated) { MockSubmissionAggregator submissionsAggregator; diff --git a/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h b/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h index 939a922cf1..54afdbd545 100644 --- a/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h +++ b/opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h @@ -97,7 +97,6 @@ struct UltCommandStreamReceiverTest bool lowPriority = false) { flushTaskFlags.blocking = block; - flushTaskFlags.requiresCoherency = requiresCoherency; flushTaskFlags.lowPriority = lowPriority; flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo()); diff --git a/opencl/test/unit_test/helpers/task_information_tests.cpp b/opencl/test/unit_test/helpers/task_information_tests.cpp index 05b3d6b34f..85be053834 100644 --- a/opencl/test/unit_test/helpers/task_information_tests.cpp +++ b/opencl/test/unit_test/helpers/task_information_tests.cpp @@ -259,7 +259,6 @@ HWTEST_F(DispatchFlagsTests, givenCommandMapUnmapWhenSubmitThenPassCorrectDispat EXPECT_FALSE(mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_FALSE(mockCsr->passedDispatchFlags.requiresCoherency); EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); @@ -288,10 +287,6 @@ HWTEST_F(DispatchFlagsTests, givenCommandComputeKernelWhenSubmitThenPassCorrectD bool flushDC = false; bool slmUsed = false; bool ndRangeKernel = false; - bool requiresCoherency = false; - for (auto &surface : surfaces) { - requiresCoherency |= surface->isCoherent; - } std::unique_ptr command(new CommandComputeKernel(*mockCmdQ, kernelOperation, surfaces, flushDC, slmUsed, ndRangeKernel, nullptr, preemptionMode, kernel, 1, nullptr)); command->submit(20, false); @@ -307,7 +302,6 @@ HWTEST_F(DispatchFlagsTests, givenCommandComputeKernelWhenSubmitThenPassCorrectD EXPECT_EQ(slmUsed, mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_EQ(ndRangeKernel, mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(requiresCoherency, mockCsr->passedDispatchFlags.requiresCoherency); EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); @@ -336,10 +330,6 @@ HWTEST_F(DispatchFlagsTests, givenClCommandCopyImageWhenSubmitThenFlushTextureCa bool flushDC = false; bool slmUsed = false; uint32_t commandType = CL_COMMAND_COPY_IMAGE; - bool requiresCoherency = false; - for (auto &surface : surfaces) { - requiresCoherency |= surface->isCoherent; - } std::unique_ptr command(new CommandComputeKernel(*mockCmdQ, kernelOperation, surfaces, flushDC, slmUsed, commandType, nullptr, preemptionMode, kernel, 1, nullptr)); command->submit(20, false); @@ -356,7 +346,6 @@ HWTEST_F(DispatchFlagsTests, givenClCommandCopyImageWhenSubmitThenFlushTextureCa EXPECT_EQ(slmUsed, mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_EQ(requiresCoherency, mockCsr->passedDispatchFlags.requiresCoherency); EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); @@ -396,7 +385,6 @@ HWTEST_F(DispatchFlagsTests, givenCommandWithoutKernelWhenSubmitThenPassCorrectD EXPECT_FALSE(mockCsr->passedDispatchFlags.useSLM); EXPECT_TRUE(mockCsr->passedDispatchFlags.guardCommandBufferWithPipeControl); EXPECT_FALSE(mockCsr->passedDispatchFlags.gsba32BitRequired); - EXPECT_FALSE(mockCsr->passedDispatchFlags.requiresCoherency); EXPECT_EQ(mockCmdQ->getPriority() == QueuePriority::LOW, mockCsr->passedDispatchFlags.lowPriority); EXPECT_FALSE(mockCsr->passedDispatchFlags.implicitFlush); EXPECT_EQ(mockCmdQ->getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), mockCsr->passedDispatchFlags.outOfOrderExecutionAllowed); diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index 65ca4e4ae7..2c13e636d8 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -238,7 +238,7 @@ CompletionStamp CommandStreamReceiverHw::flushBcsTask(LinearStream &c auto &streamToSubmit = submitCSR ? commandStreamCSR : commandStreamTask; BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, 0, taskStartAddress, nullptr, - false, false, QueueThrottle::MEDIUM, NEO::QueueSliceCount::defaultSliceCount, + false, QueueThrottle::MEDIUM, NEO::QueueSliceCount::defaultSliceCount, streamToSubmit.getUsed(), &streamToSubmit, bbEndLocation, this->getNumClients(), (submitCSR || dispatchBcsFlags.hasStallingCmds), dispatchBcsFlags.hasRelaxedOrderingDependencies}; @@ -367,7 +367,6 @@ CompletionStamp CommandStreamReceiverHw::flushTask( } const auto &hwInfo = peekHwInfo(); - auto &gfxCoreHelper = getGfxCoreHelper(); bool hasStallingCmdsOnTaskStream = false; @@ -433,8 +432,7 @@ CompletionStamp CommandStreamReceiverHw::flushTask( dispatchFlags.pipelineSelectArgs.systolicPipelineSelectSupport = this->pipelineSupportFlags.systolicMode; handlePipelineSelectStateTransition(dispatchFlags); - auto requiresCoherency = gfxCoreHelper.forceNonGpuCoherencyWA(dispatchFlags.requiresCoherency); - this->streamProperties.stateComputeMode.setPropertiesAll(requiresCoherency, dispatchFlags.numGrfRequired, + this->streamProperties.stateComputeMode.setPropertiesAll(false, dispatchFlags.numGrfRequired, dispatchFlags.threadArbitrationPolicy, device.getPreemptionMode()); csrSizeRequestFlags.l3ConfigChanged = this->lastSentL3Config != newL3Config; @@ -648,7 +646,7 @@ CompletionStamp CommandStreamReceiverHw::flushTask( size_t startOffset = submitCommandStreamFromCsr ? commandStreamStartCSR : commandStreamStartTask; auto &streamToSubmit = submitCommandStreamFromCsr ? commandStreamCSR : commandStreamTask; BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, chainedBatchBufferStartOffset, taskStartAddress, chainedBatchBuffer, - dispatchFlags.requiresCoherency, dispatchFlags.lowPriority, dispatchFlags.throttle, dispatchFlags.sliceCount, + dispatchFlags.lowPriority, dispatchFlags.throttle, dispatchFlags.sliceCount, streamToSubmit.getUsed(), &streamToSubmit, bbEndLocation, this->getNumClients(), (submitCSR || dispatchFlags.hasStallingCmds || hasStallingCmdsOnTaskStream), dispatchFlags.hasRelaxedOrderingDependencies}; @@ -1254,7 +1252,7 @@ TaskCountType CommandStreamReceiverHw::flushBcsTask(const BlitPropert uint64_t taskStartAddress = commandStream.getGpuBase() + commandStreamStart; - BatchBuffer batchBuffer{commandStream.getGraphicsAllocation(), commandStreamStart, 0, taskStartAddress, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, + BatchBuffer batchBuffer{commandStream.getGraphicsAllocation(), commandStreamStart, 0, taskStartAddress, nullptr, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, commandStream.getUsed(), &commandStream, endingCmdPtr, this->getNumClients(), hasStallingCmds, isRelaxedOrderingDispatch}; updateStreamTaskCount(commandStream, newTaskCount); @@ -1376,7 +1374,7 @@ SubmissionStatus CommandStreamReceiverHw::flushSmallTask(LinearStream uint64_t taskStartAddress = commandStreamTask.getGpuBase() + commandStreamStartTask; BatchBuffer batchBuffer{commandStreamTask.getGraphicsAllocation(), commandStreamStartTask, 0, taskStartAddress, - nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, + nullptr, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, this->getNumClients(), true, false}; this->latestSentTaskCount = taskCount + 1; @@ -2188,13 +2186,12 @@ CompletionStamp CommandStreamReceiverHw::handleImmediateFlushSendBatc uint64_t taskStartAddress = immediateCommandStream.getGpuBase() + immediateCommandStreamStart; bool hasStallingCmds = (startFromCsr || dispatchFlags.blockingAppend || dispatchFlags.hasStallingCmds); - constexpr bool immediateRequiresCoherency = false; constexpr bool immediateLowPriority = false; constexpr QueueThrottle immediateThrottle = QueueThrottle::MEDIUM; constexpr uint64_t immediateSliceCount = QueueSliceCount::defaultSliceCount; BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, chainedBatchBufferStartOffset, taskStartAddress, chainedBatchBuffer, - immediateRequiresCoherency, immediateLowPriority, immediateThrottle, immediateSliceCount, + immediateLowPriority, immediateThrottle, immediateSliceCount, streamToSubmit.getUsed(), &streamToSubmit, flushData.endPtr, this->getNumClients(), hasStallingCmds, dispatchFlags.hasRelaxedOrderingDependencies}; updateStreamTaskCount(streamToSubmit, taskCount + 1); diff --git a/shared/source/command_stream/csr_definitions.h b/shared/source/command_stream/csr_definitions.h index 2d3e85e3a2..93a4d0aa22 100644 --- a/shared/source/command_stream/csr_definitions.h +++ b/shared/source/command_stream/csr_definitions.h @@ -56,7 +56,7 @@ struct DispatchFlags { uint32_t l3CacheSettingsP, int32_t threadArbitrationPolicyP, uint32_t additionalKernelExecInfoP, KernelExecutionType kernelExecutionTypeP, MemoryCompressionState memoryCompressionStateP, uint64_t sliceCountP, bool blockingP, bool dcFlushP, bool useSLMP, bool guardCommandBufferWithPipeControlP, bool gsba32BitRequiredP, - bool requiresCoherencyP, bool lowPriorityP, bool implicitFlushP, bool outOfOrderExecutionAllowedP, bool epilogueRequiredP, + bool lowPriorityP, bool implicitFlushP, bool outOfOrderExecutionAllowedP, bool epilogueRequiredP, bool usePerDSSbackedBufferP, bool useGlobalAtomicsP, bool areMultipleSubDevicesInContextP, bool memoryMigrationRequiredP, bool textureCacheFlush, bool hasStallingCmds, bool hasRelaxedOrderingDependencies, bool stateCacheInvalidation, bool isStallingCommandsOnNextFlushRequired, bool isDcFlushRequiredOnStallingCommandsOnNextFlush) : csrDependencies(csrDependenciesP), barrierTimestampPacketNodes(barrierTimestampPacketNodesP), @@ -76,7 +76,6 @@ struct DispatchFlags { useSLM(useSLMP), guardCommandBufferWithPipeControl(guardCommandBufferWithPipeControlP), gsba32BitRequired(gsba32BitRequiredP), - requiresCoherency(requiresCoherencyP), lowPriority(lowPriorityP), implicitFlush(implicitFlushP), outOfOrderExecutionAllowed(outOfOrderExecutionAllowedP), @@ -111,7 +110,6 @@ struct DispatchFlags { bool useSLM = false; bool guardCommandBufferWithPipeControl = false; bool gsba32BitRequired = false; - bool requiresCoherency = false; bool lowPriority = false; bool implicitFlush = false; bool outOfOrderExecutionAllowed = false; diff --git a/shared/source/command_stream/submissions_aggregator.cpp b/shared/source/command_stream/submissions_aggregator.cpp index 001bda4be2..92c1b794c8 100644 --- a/shared/source/command_stream/submissions_aggregator.cpp +++ b/shared/source/command_stream/submissions_aggregator.cpp @@ -40,11 +40,6 @@ void NEO::SubmissionAggregator::aggregateCommandBuffers(ResourcePackage &resourc return; } - // check if next cmd buffer is compatible - if (primaryCommandBuffer->next->batchBuffer.requiresCoherency != primaryCommandBuffer->batchBuffer.requiresCoherency) { - return; - } - if (primaryCommandBuffer->next->batchBuffer.lowPriority != primaryCommandBuffer->batchBuffer.lowPriority) { return; } @@ -100,12 +95,12 @@ void NEO::SubmissionAggregator::aggregateCommandBuffers(ResourcePackage &resourc NEO::BatchBuffer::BatchBuffer(GraphicsAllocation *commandBufferAllocation, size_t startOffset, size_t chainedBatchBufferStartOffset, uint64_t taskStartAddress, GraphicsAllocation *chainedBatchBuffer, - bool requiresCoherency, bool lowPriority, QueueThrottle throttle, uint64_t sliceCount, + bool lowPriority, QueueThrottle throttle, uint64_t sliceCount, size_t usedSize, LinearStream *stream, void *endCmdPtr, uint32_t numCsrClients, bool hasStallingCmds, bool hasRelaxedOrderingDependencies) : commandBufferAllocation(commandBufferAllocation), startOffset(startOffset), chainedBatchBufferStartOffset(chainedBatchBufferStartOffset), taskStartAddress(taskStartAddress), chainedBatchBuffer(chainedBatchBuffer), - requiresCoherency(requiresCoherency), lowPriority(lowPriority), + lowPriority(lowPriority), throttle(throttle), sliceCount(sliceCount), usedSize(usedSize), stream(stream), endCmdPtr(endCmdPtr), numCsrClients(numCsrClients), hasStallingCmds(hasStallingCmds), hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies) {} diff --git a/shared/source/command_stream/submissions_aggregator.h b/shared/source/command_stream/submissions_aggregator.h index 29720c3296..bcffc84413 100644 --- a/shared/source/command_stream/submissions_aggregator.h +++ b/shared/source/command_stream/submissions_aggregator.h @@ -25,7 +25,6 @@ struct BatchBuffer { size_t chainedBatchBufferStartOffset, uint64_t taskStartAddress, GraphicsAllocation *chainedBatchBuffer, - bool requiresCoherency, bool lowPriority, QueueThrottle throttle, uint64_t sliceCount, @@ -42,7 +41,6 @@ struct BatchBuffer { uint64_t taskStartAddress = 0; // if task not available, use CSR stream GraphicsAllocation *chainedBatchBuffer = nullptr; - bool requiresCoherency = false; bool lowPriority = false; QueueThrottle throttle = QueueThrottle::MEDIUM; uint64_t sliceCount = QueueSliceCount::defaultSliceCount; diff --git a/shared/source/direct_submission/direct_submission_hw.inl b/shared/source/direct_submission/direct_submission_hw.inl index 984feae278..3df5bef97f 100644 --- a/shared/source/direct_submission/direct_submission_hw.inl +++ b/shared/source/direct_submission/direct_submission_hw.inl @@ -930,9 +930,6 @@ bool DirectSubmissionHw::copyCommandBufferIntoRing(BatchB template bool DirectSubmissionHw::dispatchCommandBuffer(BatchBuffer &batchBuffer, FlushStampTracker &flushStamp) { - // for now workloads requiring cache coherency are not supported - UNRECOVERABLE_IF(batchBuffer.requiresCoherency); - if (batchBuffer.ringBufferRestartRequest) { this->stopRingBuffer(false); } diff --git a/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp b/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp index ac5e93286a..a038b6a222 100644 --- a/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp +++ b/shared/source/gen12lp/gfx_core_helper_gen12lp.cpp @@ -204,11 +204,6 @@ void GfxCoreHelperHw::setExtraAllocationData(AllocationData &allocationD } } -template <> -bool GfxCoreHelperHw::forceNonGpuCoherencyWA(bool requiresCoherency) const { - return false; -} - template class GfxCoreHelperHw; template class FlatBatchBufferHelperHw; template struct MemorySynchronizationCommands; diff --git a/shared/source/helpers/gfx_core_helper.h b/shared/source/helpers/gfx_core_helper.h index c1ad205a94..c0bca817f4 100644 --- a/shared/source/helpers/gfx_core_helper.h +++ b/shared/source/helpers/gfx_core_helper.h @@ -155,7 +155,6 @@ class GfxCoreHelper { virtual uint64_t getPatIndex(CacheRegion cacheRegion, CachePolicy cachePolicy) const = 0; virtual bool isStatelessToStatefulWithOffsetSupported() const = 0; virtual void encodeBufferSurfaceState(EncodeSurfaceStateArgs &args) const = 0; - virtual bool forceNonGpuCoherencyWA(bool requiresCoherency) const = 0; virtual bool platformSupportsImplicitScaling(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const = 0; virtual size_t getBatchBufferEndSize() const = 0; virtual const void *getBatchBufferEndReference() const = 0; @@ -368,7 +367,6 @@ class GfxCoreHelperHw : public GfxCoreHelper { uint64_t getPatIndex(CacheRegion cacheRegion, CachePolicy cachePolicy) const override; bool isStatelessToStatefulWithOffsetSupported() const override; void encodeBufferSurfaceState(EncodeSurfaceStateArgs &args) const override; - bool forceNonGpuCoherencyWA(bool requiresCoherency) const override; bool platformSupportsImplicitScaling(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const override; size_t getBatchBufferEndSize() const override; const void *getBatchBufferEndReference() const override; diff --git a/shared/source/helpers/gfx_core_helper_base.inl b/shared/source/helpers/gfx_core_helper_base.inl index c92ed3dc20..d6009e3dca 100644 --- a/shared/source/helpers/gfx_core_helper_base.inl +++ b/shared/source/helpers/gfx_core_helper_base.inl @@ -606,10 +606,6 @@ void GfxCoreHelperHw::encodeBufferSurfaceState(EncodeSurfaceStateArgs EncodeSurfaceState::encodeBuffer(args); } template -bool GfxCoreHelperHw::forceNonGpuCoherencyWA(bool requiresCoherency) const { - return requiresCoherency; -} -template size_t GfxCoreHelperHw::getBatchBufferEndSize() const { return EncodeBatchBufferStartOrEnd::getBatchBufferEndSize(); } diff --git a/shared/source/os_interface/linux/drm_command_stream.inl b/shared/source/os_interface/linux/drm_command_stream.inl index 4a4480bb49..ae5758549f 100644 --- a/shared/source/os_interface/linux/drm_command_stream.inl +++ b/shared/source/os_interface/linux/drm_command_stream.inl @@ -244,7 +244,7 @@ int DrmCommandStreamReceiver::exec(const BatchBuffer &batchBuffer, ui int ret = bb->exec(static_cast(alignUp(batchBuffer.usedSize - batchBuffer.startOffset, 8)), batchBuffer.startOffset, execFlags, - batchBuffer.requiresCoherency, + false, this->osContext, vmHandleId, drmContextId, diff --git a/shared/source/os_interface/windows/wddm_device_command_stream.inl b/shared/source/os_interface/windows/wddm_device_command_stream.inl index 8486f6846f..df0a1c2157 100644 --- a/shared/source/os_interface/windows/wddm_device_command_stream.inl +++ b/shared/source/os_interface/windows/wddm_device_command_stream.inl @@ -100,7 +100,7 @@ SubmissionStatus WddmCommandStreamReceiver::flush(BatchBuffer &batchB } COMMAND_BUFFER_HEADER *pHeader = reinterpret_cast(commandBufferHeader); - pHeader->RequiresCoherency = batchBuffer.requiresCoherency; + pHeader->RequiresCoherency = false; pHeader->UmdRequestedSliceState = 0; pHeader->UmdRequestedEUCount = wddm->getRequestedEUCount(); diff --git a/shared/test/common/helpers/batch_buffer_helper.h b/shared/test/common/helpers/batch_buffer_helper.h index 30ccf01f8b..520a738cb0 100644 --- a/shared/test/common/helpers/batch_buffer_helper.h +++ b/shared/test/common/helpers/batch_buffer_helper.h @@ -18,7 +18,6 @@ struct BatchBufferHelper { chainedBatchBufferStartOffset, // chainedBatchBufferStartOffset 0, // taskStartAddress nullptr, // chainedBatchBuffer - false, // requiresCoherency false, // lowPriority QueueThrottle::MEDIUM, // throttle QueueSliceCount::defaultSliceCount, // sliceCount diff --git a/shared/test/common/helpers/dispatch_flags_helper.h b/shared/test/common/helpers/dispatch_flags_helper.h index 3ec6d75a27..0b46c776f1 100644 --- a/shared/test/common/helpers/dispatch_flags_helper.h +++ b/shared/test/common/helpers/dispatch_flags_helper.h @@ -32,7 +32,6 @@ struct DispatchFlagsHelper { false, // useSLM false, // guardCommandBufferWithPipeControl false, // gsba32BitRequired - false, // requiresCoherency false, // lowPriority false, // implicitFlush false, // outOfOrderExecutionAllowed diff --git a/shared/test/unit_test/command_stream/compute_mode_tests.h b/shared/test/unit_test/command_stream/compute_mode_tests.h index 8e8bbdb557..8d7c893768 100644 --- a/shared/test/unit_test/command_stream/compute_mode_tests.h +++ b/shared/test/unit_test/command_stream/compute_mode_tests.h @@ -56,7 +56,6 @@ struct ComputeModeRequirements : public ::testing::Test { uint32_t numGrfRequired) { auto csrHw = getCsrHw(); csrHw->hasSharedHandlesReturnValue = hasSharedHandles; - flags.requiresCoherency = requireCoherency; csrHw->streamProperties.stateComputeMode.isCoherencyRequired.value = requireCoherency; csrHw->streamProperties.stateComputeMode.isCoherencyRequired.isDirty = coherencyRequestChanged; csrHw->streamProperties.stateComputeMode.largeGrfMode.value = (numGrfRequired == GrfConfig::LargeGrfNumber); @@ -95,6 +94,6 @@ struct ComputeModeRequirements : public ::testing::Test { CommandStreamReceiver *csr = nullptr; std::unique_ptr device; - DispatchFlags flags{{}, nullptr, {}, nullptr, QueueThrottle::MEDIUM, PreemptionMode::Disabled, GrfConfig::DefaultGrfNumber, L3CachingSettings::l3CacheOn, ThreadArbitrationPolicy::NotPresent, AdditionalKernelExecInfo::NotApplicable, KernelExecutionType::NotApplicable, MemoryCompressionState::NotApplicable, QueueSliceCount::defaultSliceCount, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}; + DispatchFlags flags{{}, nullptr, {}, nullptr, QueueThrottle::MEDIUM, PreemptionMode::Disabled, GrfConfig::DefaultGrfNumber, L3CachingSettings::l3CacheOn, ThreadArbitrationPolicy::NotPresent, AdditionalKernelExecInfo::NotApplicable, KernelExecutionType::NotApplicable, MemoryCompressionState::NotApplicable, QueueSliceCount::defaultSliceCount, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}; GraphicsAllocation *alloc = nullptr; }; diff --git a/shared/test/unit_test/command_stream/compute_mode_tests_xehp_and_later.cpp b/shared/test/unit_test/command_stream/compute_mode_tests_xehp_and_later.cpp index b8f6bb3bfd..9aa83f783e 100644 --- a/shared/test/unit_test/command_stream/compute_mode_tests_xehp_and_later.cpp +++ b/shared/test/unit_test/command_stream/compute_mode_tests_xehp_and_later.cpp @@ -211,113 +211,6 @@ HWTEST2_F(ComputeModeRequirements, givenCoherencyWithSharedHandlesWhenComputeMod EXPECT_TRUE(memcmp(&expectedPcCmd, pcCmd, sizeof(PIPE_CONTROL)) == 0); } -HWTEST2_F(ComputeModeRequirements, givenCoherencyRequirementWithoutSharedHandlesWhenFlushTaskCalledThenProgramCmdOnlyIfChanged, ForceNonCoherentSupportedMatcher) { - setUpImpl(); - using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - - auto startOffset = getCsrHw()->commandStream.getUsed(); - - auto graphicAlloc = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize}); - IndirectHeap stream(graphicAlloc); - - auto flushTask = [&](bool coherencyRequired) { - flags.requiresCoherency = coherencyRequired; - startOffset = getCsrHw()->commandStream.getUsed(); - csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device); - }; - - auto findCmd = [&](bool expectToBeProgrammed, bool expectCoherent) { - HardwareParse hwParser; - hwParser.parseCommands(getCsrHw()->commandStream, startOffset); - bool foundOne = false; - - typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT expectedCoherentValue = expectCoherent ? STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED : STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT; - uint32_t expectedCoherentMask = FamilyType::stateComputeModeForceNonCoherentMask; - - for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) { - auto cmd = genCmdCast(*it); - if (cmd) { - EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent()); - EXPECT_TRUE(isValueSet(cmd->getMaskBits(), expectedCoherentMask)); - EXPECT_FALSE(foundOne); - foundOne = true; - auto pc = genCmdCast(*(++it)); - EXPECT_EQ(nullptr, pc); - } - } - EXPECT_EQ(expectToBeProgrammed, foundOne); - }; - - flushTask(false); - findCmd(true, false); // first time - - flushTask(false); - findCmd(false, false); // not changed - - flushTask(true); - findCmd(true, true); // changed - - flushTask(true); - findCmd(false, true); // not changed - - flushTask(false); - findCmd(true, false); // changed - - flushTask(false); - findCmd(false, false); // not changed - csr->getMemoryManager()->freeGraphicsMemory(graphicAlloc); -} - -HWTEST2_F(ComputeModeRequirements, givenCoherencyRequirementWithSharedHandlesWhenFlushTaskCalledThenProgramCmdsWhenNeeded, ForceNonCoherentSupportedMatcher) { - setUpImpl(); - using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; - using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL; - auto startOffset = getCsrHw()->commandStream.getUsed(); - auto graphicsAlloc = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize}); - IndirectHeap stream(graphicsAlloc); - - auto flushTask = [&](bool coherencyRequired) { - flags.requiresCoherency = coherencyRequired; - makeResidentSharedAlloc(); - - startOffset = getCsrHw()->commandStream.getUsed(); - csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device); - }; - - auto flushTaskAndFindCmds = [&](bool expectCoherent, bool areCommandsProgrammed) { - flushTask(expectCoherent); - HardwareParse hwParser; - hwParser.parseCommands(getCsrHw()->commandStream, startOffset); - bool foundOne = false; - - typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT expectedCoherentValue = expectCoherent ? STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED : STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT; - uint32_t expectedCoherentMask = FamilyType::stateComputeModeForceNonCoherentMask; - - for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) { - auto cmd = genCmdCast(*it); - if (cmd) { - EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent()); - EXPECT_TRUE(isValueSet(cmd->getMaskBits(), expectedCoherentMask)); - EXPECT_FALSE(foundOne); - foundOne = true; - auto pc = genCmdCast(*(++it)); - EXPECT_NE(nullptr, pc); - } - } - EXPECT_EQ(foundOne, areCommandsProgrammed); - }; - - flushTaskAndFindCmds(false, true); // first time - flushTaskAndFindCmds(false, false); // not changed - flushTaskAndFindCmds(true, true); // changed - flushTaskAndFindCmds(true, false); // not changed - flushTaskAndFindCmds(false, true); // changed - flushTaskAndFindCmds(false, false); // not changed - - csr->getMemoryManager()->freeGraphicsMemory(graphicsAlloc); -} - HWTEST2_F(ComputeModeRequirements, givenFlushWithoutSharedHandlesWhenPreviouslyUsedThenPcAndSCMAreNotProgrammed, ForceNonCoherentSupportedMatcher) { setUpImpl(); using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE; diff --git a/shared/test/unit_test/gen11/CMakeLists.txt b/shared/test/unit_test/gen11/CMakeLists.txt index 2892fc1a6c..6ef928025e 100644 --- a/shared/test/unit_test/gen11/CMakeLists.txt +++ b/shared/test/unit_test/gen11/CMakeLists.txt @@ -7,7 +7,6 @@ if(TESTS_GEN11) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen11.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen11.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen11_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen11.cpp diff --git a/shared/test/unit_test/gen11/coherency_tests_gen11.cpp b/shared/test/unit_test/gen11/coherency_tests_gen11.cpp deleted file mode 100644 index ea1bb02b25..0000000000 --- a/shared/test/unit_test/gen11/coherency_tests_gen11.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2019-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/command_stream/command_stream_receiver_hw.h" -#include "shared/source/gen11/hw_cmds.h" -#include "shared/source/gen11/reg_configs.h" -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/test/common/cmd_parse/hw_parse.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/mocks/mock_allocation_properties.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -struct Gen11CoherencyRequirements : public ::testing::Test { - typedef typename Gen11Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; - - struct MyCsr : public CommandStreamReceiverHw { - using CommandStreamReceiver::commandStream; - using CommandStreamReceiver::streamProperties; - MyCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw(executionEnvironment, 0, 1){}; - CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; } - }; - - void overrideCoherencyRequest(bool requestChanged, bool requireCoherency) { - csr->streamProperties.stateComputeMode.isCoherencyRequired.isDirty = requestChanged; - csr->streamProperties.stateComputeMode.isCoherencyRequired.value = requireCoherency; - flags.requiresCoherency = requireCoherency; - } - - void SetUp() override { - device.reset(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); - csr = new MyCsr(*device->executionEnvironment); - device->resetCommandStreamReceiver(csr); - } - - MyCsr *csr = nullptr; - std::unique_ptr device; - DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags(); -}; - -GEN11TEST_F(Gen11CoherencyRequirements, GivenSettingsWhenCoherencyRequestedThenProgrammingIsCorrect) { - overrideCoherencyRequest(false, false); - EXPECT_FALSE(csr->streamProperties.stateComputeMode.isDirty()); - - overrideCoherencyRequest(false, true); - EXPECT_FALSE(csr->streamProperties.stateComputeMode.isDirty()); - - overrideCoherencyRequest(true, true); - EXPECT_TRUE(csr->streamProperties.stateComputeMode.isDirty()); - - overrideCoherencyRequest(true, false); - EXPECT_TRUE(csr->streamProperties.stateComputeMode.isDirty()); -} - -GEN11TEST_F(Gen11CoherencyRequirements, GivenSettingsWhenCoherencyRequestedThenHdcModeCmdValuesAreCorrect) { - auto lriSize = sizeof(MI_LOAD_REGISTER_IMM); - char buff[MemoryConstants::pageSize]; - LinearStream stream(buff, MemoryConstants::pageSize); - - auto expectedCmd = FamilyType::cmdInitLoadRegisterImm; - expectedCmd.setRegisterOffset(gen11HdcModeRegister::address); - expectedCmd.setDataDword(DwordBuilder::build(gen11HdcModeRegister::forceNonCoherentEnableBit, true)); - - overrideCoherencyRequest(true, false); - csr->programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(lriSize, stream.getUsed()); - - auto cmd = reinterpret_cast(stream.getCpuBase()); - EXPECT_TRUE(memcmp(&expectedCmd, cmd, lriSize) == 0); - - overrideCoherencyRequest(true, true); - csr->programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(lriSize * 2, stream.getUsed()); - - cmd = reinterpret_cast(ptrOffset(stream.getCpuBase(), lriSize)); - expectedCmd.setDataDword(DwordBuilder::build(gen11HdcModeRegister::forceNonCoherentEnableBit, true, false)); - EXPECT_TRUE(memcmp(&expectedCmd, cmd, lriSize) == 0); -} - -struct Gen11CoherencyProgramingTest : public Gen11CoherencyRequirements { - - void SetUp() override { - Gen11CoherencyRequirements::SetUp(); - startOffset = csr->commandStream.getUsed(); - } - - void flushTask(bool coherencyRequired) { - flags.requiresCoherency = coherencyRequired; - - auto graphicAlloc = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize}); - IndirectHeap stream(graphicAlloc); - - startOffset = csr->commandStream.getUsed(); - csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device); - - csr->getMemoryManager()->freeGraphicsMemory(graphicAlloc); - }; - - void findMmio(bool expectToBeProgrammed, uint32_t registerAddress) { - HardwareParse hwParser; - hwParser.parseCommands(csr->commandStream, startOffset); - bool foundOne = false; - - for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) { - auto cmd = genCmdCast(*it); - if (cmd && cmd->getRegisterOffset() == registerAddress) { - EXPECT_FALSE(foundOne); - foundOne = true; - } - } - EXPECT_EQ(expectToBeProgrammed, foundOne); - }; - - void findMmio(bool expectToBeProgrammed) { - findMmio(expectToBeProgrammed, gen11HdcModeRegister::address); - } - - size_t startOffset; -}; - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWhenFlushFirstTaskWithoutCoherencyRequiredThenProgramMmio) { - flushTask(false); - findMmio(true); -} - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWhenFlushFirstTaskWithCoherencyRequiredThenProgramMmio) { - flushTask(true); - findMmio(true); -} - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithCoherencyRequiredWhenFlushNextTaskWithoutChangingCoherencyRequirementThenDoNotProgramMmio) { - flushTask(true); - flushTask(true); - findMmio(false); -} - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithoutCoherencyRequiredWhenFlushNextTaskWithoutChangingCoherencyRequirementThenDoNotProgramMmio) { - flushTask(false); - flushTask(false); - findMmio(false); -} - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithCoherencyRequiredWhenFlushNextTaskWithChangingCoherencyRequirementThenProgramMmio) { - flushTask(true); - flushTask(false); - findMmio(true); -} - -GEN11TEST_F(Gen11CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithoutCoherencyRequiredWhenFlushNextTaskWithChangingCoherencyRequirementThenProgramMmio) { - flushTask(false); - flushTask(true); - findMmio(true); -} diff --git a/shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl b/shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl index d82d7713d4..05301b7540 100644 --- a/shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl +++ b/shared/test/unit_test/gen12lp/coherency_tests_gen12lp.inl @@ -34,7 +34,6 @@ struct Gen12LpCoherencyRequirements : public ::testing::Test { void overrideCoherencyRequest(bool reqestChanged, bool requireCoherency, bool hasSharedHandles) { csr->getCsrRequestFlags()->hasSharedHandles = hasSharedHandles; - flags.requiresCoherency = requireCoherency; csr->streamProperties.stateComputeMode.isCoherencyRequired.value = requireCoherency; csr->streamProperties.stateComputeMode.isCoherencyRequired.isDirty = reqestChanged; if (hasSharedHandles) { @@ -210,7 +209,6 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, givenCoherencyRequirementWithoutShar IndirectHeap stream(graphicAlloc); auto flushTask = [&](bool coherencyRequired) { - flags.requiresCoherency = coherencyRequired; startOffset = csr->commandStream.getUsed(); csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device); }; @@ -254,7 +252,6 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, givenSharedHandlesWhenFlushTaskCalle IndirectHeap stream(graphicsAlloc); auto flushTask = [&](bool coherencyRequired) { - flags.requiresCoherency = coherencyRequired; makeResidentSharedAlloc(); startOffset = csr->commandStream.getUsed(); diff --git a/shared/test/unit_test/gen8/CMakeLists.txt b/shared/test/unit_test/gen8/CMakeLists.txt index db2226e114..64b219b5a9 100644 --- a/shared/test/unit_test/gen8/CMakeLists.txt +++ b/shared/test/unit_test/gen8/CMakeLists.txt @@ -7,7 +7,6 @@ if(TESTS_GEN8) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen8.cpp ${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen8.cpp diff --git a/shared/test/unit_test/gen8/coherency_tests_gen8.cpp b/shared/test/unit_test/gen8/coherency_tests_gen8.cpp deleted file mode 100644 index 18e23395d7..0000000000 --- a/shared/test/unit_test/gen8/coherency_tests_gen8.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen8/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/ult_device_factory.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -using Gen8CoherencyRequirements = ::testing::Test; - -GEN8TEST_F(Gen8CoherencyRequirements, WhenMemoryManagerIsInitializedThenNoCoherencyProgramming) { - UltDeviceFactory deviceFactory{1, 0}; - LinearStream stream; - DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags(); - auto &csr = deviceFactory.rootDevices[0]->getUltCommandStreamReceiver(); - - auto retSize = csr.getCmdSizeForComputeMode(); - EXPECT_EQ(0u, retSize); - csr.programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(0u, stream.getUsed()); - - flags.requiresCoherency = true; - retSize = csr.getCmdSizeForComputeMode(); - EXPECT_EQ(0u, retSize); - csr.programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(0u, stream.getUsed()); -} diff --git a/shared/test/unit_test/gen9/CMakeLists.txt b/shared/test/unit_test/gen9/CMakeLists.txt index 4b1c7dc2e1..9cc453b73b 100644 --- a/shared/test/unit_test/gen9/CMakeLists.txt +++ b/shared/test/unit_test/gen9/CMakeLists.txt @@ -7,7 +7,6 @@ if(TESTS_GEN9) target_sources(neo_shared_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen9.cpp ${CMAKE_CURRENT_SOURCE_DIR}/command_encoder_tests_gen9.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_gen9.cpp diff --git a/shared/test/unit_test/gen9/coherency_tests_gen9.cpp b/shared/test/unit_test/gen9/coherency_tests_gen9.cpp deleted file mode 100644 index 9bc6d1b43a..0000000000 --- a/shared/test/unit_test/gen9/coherency_tests_gen9.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/gen9/hw_cmds.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/dispatch_flags_helper.h" -#include "shared/test/common/libult/ult_command_stream_receiver.h" -#include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/ult_device_factory.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -using namespace NEO; - -typedef ::testing::Test Gen9CoherencyRequirements; - -GEN9TEST_F(Gen9CoherencyRequirements, WhenMemoryManagerIsInitializedThenNoCoherencyProgramming) { - UltDeviceFactory deviceFactory{1, 0}; - LinearStream stream; - DispatchFlags flags = DispatchFlagsHelper::createDefaultDispatchFlags(); - auto &csr = deviceFactory.rootDevices[0]->getUltCommandStreamReceiver(); - - csr.programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(0u, stream.getUsed()); - - flags.requiresCoherency = true; - csr.programComputeMode(stream, flags, *defaultHwInfo); - EXPECT_EQ(0u, stream.getUsed()); -} diff --git a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp index 6e05713634..5b68898025 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp @@ -1291,11 +1291,6 @@ struct CoherentWANotNeeded { return !TestTraits::get()>::forceGpuNonCoherent; } }; -HWTEST2_F(GfxCoreHelperTest, givenProductHelperWhenCheckingForceNonGpuCoherencyWAThenPassedValueReturned, CoherentWANotNeeded) { - const auto &gfxCoreHelper = getHelper(); - EXPECT_TRUE(gfxCoreHelper.forceNonGpuCoherencyWA(true)); - EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(false)); -} struct ForceNonCoherentMode { template @@ -1306,12 +1301,6 @@ struct ForceNonCoherentMode { } }; -HWTEST2_F(GfxCoreHelperTest, givenProductHelperWhenCheckingForceNonGpuCoherencyWAThenFalseIsReturned, ForceNonCoherentMode) { - const auto &gfxCoreHelper = getHelper(); - EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(true)); - EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(false)); -} - HWTEST_F(GfxCoreHelperTest, GivenHwInfoWhenGetBatchBufferEndSizeCalledThenCorrectSizeReturned) { const auto &gfxCoreHelper = getHelper(); EXPECT_EQ(gfxCoreHelper.getBatchBufferEndSize(), sizeof(typename FamilyType::MI_BATCH_BUFFER_END)); diff --git a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp index b9c8d7b42a..aea16a2019 100644 --- a/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/device_command_stream_tests.cpp @@ -923,7 +923,6 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenI DispatchFlags dispatchFlags = DispatchFlagsHelper::createDefaultDispatchFlags(); dispatchFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(device->getHardwareInfo()); dispatchFlags.guardCommandBufferWithPipeControl = true; - dispatchFlags.requiresCoherency = true; mockCsr->flushTask(cs, 0u, &dsh, &ioh, &ssh, 0u, dispatchFlags, *device); @@ -942,7 +941,7 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenI EXPECT_EQ(1u, wddm->submitResult.called); auto csrCommandStream = mockCsr->commandStream.getGraphicsAllocation(); EXPECT_EQ(csrCommandStream->getGpuAddress(), wddm->submitResult.commandBufferSubmitted); - EXPECT_TRUE(((COMMAND_BUFFER_HEADER *)wddm->submitResult.commandHeaderSubmitted)->RequiresCoherency); + EXPECT_FALSE(((COMMAND_BUFFER_HEADER *)wddm->submitResult.commandHeaderSubmitted)->RequiresCoherency); EXPECT_EQ(6u + csrSurfaceCount, wddm->makeResidentResult.handleCount); std::vector expectedHandles; diff --git a/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp index 9a236f74da..9f49ddd155 100644 --- a/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/compute_mode_tests_xe_hpc_core.cpp @@ -188,7 +188,7 @@ HWTEST2_F(XeHpcComputeModeRequirements, giventhreadArbitrationPolicyWithoutShare EXPECT_EQ(expectToBeProgrammed, foundOne); }; - getCsrHw()->streamProperties.stateComputeMode.setPropertiesAll(flags.requiresCoherency, flags.numGrfRequired, + getCsrHw()->streamProperties.stateComputeMode.setPropertiesAll(false, flags.numGrfRequired, flags.threadArbitrationPolicy, PreemptionMode::Disabled); flushTask(true);