refactor: remove not needed code
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
parent
15a0bf9d7b
commit
d9f938f3db
|
@ -83,7 +83,6 @@ void CommandListCoreFamilyImmediate<gfxCoreFamily>::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<gfxCoreFamily>::flushRegular
|
|||
this->getCommandListSLMEnable(), // useSLM
|
||||
this->isSyncModeQueue, // guardCommandBufferWithPipeControl
|
||||
false, // gsba32BitRequired
|
||||
false, // requiresCoherency
|
||||
false, // lowPriority
|
||||
true, // implicitFlush
|
||||
this->csr->isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<L0::CommandList> 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);
|
||||
}
|
||||
|
|
|
@ -883,7 +883,6 @@ CompletionStamp CommandQueueHw<GfxFamily>::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<GfxFamily>::enqueueCommandWithoutKernel(
|
|||
false, // useSLM
|
||||
!getGpgpuCommandStreamReceiver().isUpdateTagFromWaitEnabled(), // guardCommandBufferWithPipeControl
|
||||
false, // GSBA32BitRequired
|
||||
false, // requiresCoherency
|
||||
false, // lowPriority
|
||||
(enqueueProperties.operation == EnqueueProperties::Operation::Blit), // implicitFlush
|
||||
getGpgpuCommandStreamReceiver().isNTo1SubmissionModelEnabled(), // outOfOrderExecutionAllowed
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -388,35 +388,6 @@ TEST(SubmissionsAggregator, givenTwoCommandBufferWhereSecondContainsTheFirstComm
|
|||
EXPECT_EQ(12u, totalUsedSize);
|
||||
}
|
||||
|
||||
TEST(SubmissionsAggregator, givenCommandBuffersRequiringDifferentCoherencySettingWhenAggregateIsCalledThenTheyAreNotAgggregated) {
|
||||
MockSubmissionAggregator submissionsAggregator;
|
||||
|
||||
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(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;
|
||||
|
||||
|
|
|
@ -97,7 +97,6 @@ struct UltCommandStreamReceiverTest
|
|||
bool lowPriority = false) {
|
||||
|
||||
flushTaskFlags.blocking = block;
|
||||
flushTaskFlags.requiresCoherency = requiresCoherency;
|
||||
flushTaskFlags.lowPriority = lowPriority;
|
||||
flushTaskFlags.preemptionMode = PreemptionHelper::getDefaultPreemptionMode(pDevice->getHardwareInfo());
|
||||
|
||||
|
|
|
@ -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> 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> 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);
|
||||
|
|
|
@ -238,7 +238,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::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<GfxFamily>::flushTask(
|
|||
}
|
||||
|
||||
const auto &hwInfo = peekHwInfo();
|
||||
auto &gfxCoreHelper = getGfxCoreHelper();
|
||||
|
||||
bool hasStallingCmdsOnTaskStream = false;
|
||||
|
||||
|
@ -433,8 +432,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::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<GfxFamily>::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<GfxFamily>::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<GfxFamily>::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<GfxFamily>::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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -930,9 +930,6 @@ bool DirectSubmissionHw<GfxFamily, Dispatcher>::copyCommandBufferIntoRing(BatchB
|
|||
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
bool DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchCommandBuffer(BatchBuffer &batchBuffer, FlushStampTracker &flushStamp) {
|
||||
// for now workloads requiring cache coherency are not supported
|
||||
UNRECOVERABLE_IF(batchBuffer.requiresCoherency);
|
||||
|
||||
if (batchBuffer.ringBufferRestartRequest) {
|
||||
this->stopRingBuffer(false);
|
||||
}
|
||||
|
|
|
@ -204,11 +204,6 @@ void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationD
|
|||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool GfxCoreHelperHw<Family>::forceNonGpuCoherencyWA(bool requiresCoherency) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template class GfxCoreHelperHw<Family>;
|
||||
template class FlatBatchBufferHelperHw<Family>;
|
||||
template struct MemorySynchronizationCommands<Family>;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -606,10 +606,6 @@ void GfxCoreHelperHw<GfxFamily>::encodeBufferSurfaceState(EncodeSurfaceStateArgs
|
|||
EncodeSurfaceState<GfxFamily>::encodeBuffer(args);
|
||||
}
|
||||
template <typename GfxFamily>
|
||||
bool GfxCoreHelperHw<GfxFamily>::forceNonGpuCoherencyWA(bool requiresCoherency) const {
|
||||
return requiresCoherency;
|
||||
}
|
||||
template <typename GfxFamily>
|
||||
size_t GfxCoreHelperHw<GfxFamily>::getBatchBufferEndSize() const {
|
||||
return EncodeBatchBufferStartOrEnd<GfxFamily>::getBatchBufferEndSize();
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ int DrmCommandStreamReceiver<GfxFamily>::exec(const BatchBuffer &batchBuffer, ui
|
|||
|
||||
int ret = bb->exec(static_cast<uint32_t>(alignUp(batchBuffer.usedSize - batchBuffer.startOffset, 8)),
|
||||
batchBuffer.startOffset, execFlags,
|
||||
batchBuffer.requiresCoherency,
|
||||
false,
|
||||
this->osContext,
|
||||
vmHandleId,
|
||||
drmContextId,
|
||||
|
|
|
@ -100,7 +100,7 @@ SubmissionStatus WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchB
|
|||
}
|
||||
|
||||
COMMAND_BUFFER_HEADER *pHeader = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandBufferHeader);
|
||||
pHeader->RequiresCoherency = batchBuffer.requiresCoherency;
|
||||
pHeader->RequiresCoherency = false;
|
||||
|
||||
pHeader->UmdRequestedSliceState = 0;
|
||||
pHeader->UmdRequestedEUCount = wddm->getRequestedEUCount();
|
||||
|
|
|
@ -18,7 +18,6 @@ struct BatchBufferHelper {
|
|||
chainedBatchBufferStartOffset, // chainedBatchBufferStartOffset
|
||||
0, // taskStartAddress
|
||||
nullptr, // chainedBatchBuffer
|
||||
false, // requiresCoherency
|
||||
false, // lowPriority
|
||||
QueueThrottle::MEDIUM, // throttle
|
||||
QueueSliceCount::defaultSliceCount, // sliceCount
|
||||
|
|
|
@ -32,7 +32,6 @@ struct DispatchFlagsHelper {
|
|||
false, // useSLM
|
||||
false, // guardCommandBufferWithPipeControl
|
||||
false, // gsba32BitRequired
|
||||
false, // requiresCoherency
|
||||
false, // lowPriority
|
||||
false, // implicitFlush
|
||||
false, // outOfOrderExecutionAllowed
|
||||
|
|
|
@ -56,7 +56,6 @@ struct ComputeModeRequirements : public ::testing::Test {
|
|||
uint32_t numGrfRequired) {
|
||||
auto csrHw = getCsrHw<FamilyType>();
|
||||
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<MockDevice> 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;
|
||||
};
|
||||
|
|
|
@ -211,113 +211,6 @@ HWTEST2_F(ComputeModeRequirements, givenCoherencyWithSharedHandlesWhenComputeMod
|
|||
EXPECT_TRUE(memcmp(&expectedPcCmd, pcCmd, sizeof(PIPE_CONTROL)) == 0);
|
||||
}
|
||||
|
||||
HWTEST2_F(ComputeModeRequirements, givenCoherencyRequirementWithoutSharedHandlesWhenFlushTaskCalledThenProgramCmdOnlyIfChanged, ForceNonCoherentSupportedMatcher) {
|
||||
setUpImpl<FamilyType>();
|
||||
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
auto startOffset = getCsrHw<FamilyType>()->commandStream.getUsed();
|
||||
|
||||
auto graphicAlloc = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
IndirectHeap stream(graphicAlloc);
|
||||
|
||||
auto flushTask = [&](bool coherencyRequired) {
|
||||
flags.requiresCoherency = coherencyRequired;
|
||||
startOffset = getCsrHw<FamilyType>()->commandStream.getUsed();
|
||||
csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device);
|
||||
};
|
||||
|
||||
auto findCmd = [&](bool expectToBeProgrammed, bool expectCoherent) {
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(getCsrHw<FamilyType>()->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<STATE_COMPUTE_MODE *>(*it);
|
||||
if (cmd) {
|
||||
EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent());
|
||||
EXPECT_TRUE(isValueSet(cmd->getMaskBits(), expectedCoherentMask));
|
||||
EXPECT_FALSE(foundOne);
|
||||
foundOne = true;
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*(++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<FamilyType>();
|
||||
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
auto startOffset = getCsrHw<FamilyType>()->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<FamilyType>()->commandStream.getUsed();
|
||||
csr->flushTask(stream, 0, &stream, &stream, &stream, 0, flags, *device);
|
||||
};
|
||||
|
||||
auto flushTaskAndFindCmds = [&](bool expectCoherent, bool areCommandsProgrammed) {
|
||||
flushTask(expectCoherent);
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(getCsrHw<FamilyType>()->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<STATE_COMPUTE_MODE *>(*it);
|
||||
if (cmd) {
|
||||
EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent());
|
||||
EXPECT_TRUE(isValueSet(cmd->getMaskBits(), expectedCoherentMask));
|
||||
EXPECT_FALSE(foundOne);
|
||||
foundOne = true;
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*(++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<FamilyType>();
|
||||
using STATE_COMPUTE_MODE = typename FamilyType::STATE_COMPUTE_MODE;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<Gen11Family> {
|
||||
using CommandStreamReceiver::commandStream;
|
||||
using CommandStreamReceiver::streamProperties;
|
||||
MyCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<Gen11Family>(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<MockDevice>(defaultHwInfo.get()));
|
||||
csr = new MyCsr(*device->executionEnvironment);
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
}
|
||||
|
||||
MyCsr *csr = nullptr;
|
||||
std::unique_ptr<MockDevice> 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<MI_LOAD_REGISTER_IMM *>(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<MI_LOAD_REGISTER_IMM *>(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<Gen11Family>(csr->commandStream, startOffset);
|
||||
bool foundOne = false;
|
||||
|
||||
for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*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);
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<FamilyType>();
|
||||
|
||||
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());
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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<FamilyType>();
|
||||
|
||||
csr.programComputeMode(stream, flags, *defaultHwInfo);
|
||||
EXPECT_EQ(0u, stream.getUsed());
|
||||
|
||||
flags.requiresCoherency = true;
|
||||
csr.programComputeMode(stream, flags, *defaultHwInfo);
|
||||
EXPECT_EQ(0u, stream.getUsed());
|
||||
}
|
|
@ -1291,11 +1291,6 @@ struct CoherentWANotNeeded {
|
|||
return !TestTraits<NEO::ToGfxCoreFamily<productFamily>::get()>::forceGpuNonCoherent;
|
||||
}
|
||||
};
|
||||
HWTEST2_F(GfxCoreHelperTest, givenProductHelperWhenCheckingForceNonGpuCoherencyWAThenPassedValueReturned, CoherentWANotNeeded) {
|
||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
||||
EXPECT_TRUE(gfxCoreHelper.forceNonGpuCoherencyWA(true));
|
||||
EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(false));
|
||||
}
|
||||
|
||||
struct ForceNonCoherentMode {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
|
@ -1306,12 +1301,6 @@ struct ForceNonCoherentMode {
|
|||
}
|
||||
};
|
||||
|
||||
HWTEST2_F(GfxCoreHelperTest, givenProductHelperWhenCheckingForceNonGpuCoherencyWAThenFalseIsReturned, ForceNonCoherentMode) {
|
||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
||||
EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(true));
|
||||
EXPECT_FALSE(gfxCoreHelper.forceNonGpuCoherencyWA(false));
|
||||
}
|
||||
|
||||
HWTEST_F(GfxCoreHelperTest, GivenHwInfoWhenGetBatchBufferEndSizeCalledThenCorrectSizeReturned) {
|
||||
const auto &gfxCoreHelper = getHelper<GfxCoreHelper>();
|
||||
EXPECT_EQ(gfxCoreHelper.getBatchBufferEndSize(), sizeof(typename FamilyType::MI_BATCH_BUFFER_END));
|
||||
|
|
|
@ -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<D3DKMT_HANDLE> expectedHandles;
|
||||
|
|
|
@ -188,7 +188,7 @@ HWTEST2_F(XeHpcComputeModeRequirements, giventhreadArbitrationPolicyWithoutShare
|
|||
EXPECT_EQ(expectToBeProgrammed, foundOne);
|
||||
};
|
||||
|
||||
getCsrHw<FamilyType>()->streamProperties.stateComputeMode.setPropertiesAll(flags.requiresCoherency, flags.numGrfRequired,
|
||||
getCsrHw<FamilyType>()->streamProperties.stateComputeMode.setPropertiesAll(false, flags.numGrfRequired,
|
||||
flags.threadArbitrationPolicy, PreemptionMode::Disabled);
|
||||
|
||||
flushTask(true);
|
||||
|
|
Loading…
Reference in New Issue