refactor: redirect flush L3 host usm to external by default

Related-To: NEO-13163

Rename ForceL3FlushAfterPostSync to EnableL3FlushAfterPostSync
Rename DisableFlushL3ForHostUsm to RedirectFlushL3HostUsmToExternal

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk 2025-05-27 23:32:08 +00:00 committed by Compute-Runtime-Automation
parent 4d26759d69
commit b7681a2e7b
29 changed files with 63 additions and 62 deletions

View File

@ -370,7 +370,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
auto isFlushL3ForExternalAllocationRequired = isFlushL3AfterPostSync && isKernelUsingExternalAllocation;
auto isFlushL3ForHostUsmRequired = isFlushL3AfterPostSync && isKernelUsingSystemAllocation;
if (NEO::debugManager.flags.DisableFlushL3ForHostUsm.get() && isFlushL3ForHostUsmRequired) {
if (NEO::debugManager.flags.RedirectFlushL3HostUsmToExternal.get() && isFlushL3ForHostUsmRequired) {
isFlushL3ForExternalAllocationRequired = true;
isFlushL3ForHostUsmRequired = false;
}

View File

@ -650,7 +650,7 @@ HWTEST_F(CommandListCreate, givenCommandListyWhenAppendWaitEventsWithDcFlushThen
using SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(0);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(0);
ze_result_t returnValue;
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));

View File

@ -45,7 +45,7 @@ struct AppendMemoryCopyMultiPacketEventFixture : public DeviceFixture {
void setUp() {
debugManager.flags.UsePipeControlMultiKernelEventSync.set(usePipeControlMultiPacketEventSync);
debugManager.flags.CompactL3FlushEventPacket.set(compactL3FlushEventPacket);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
if constexpr (multiTile == 1) {
debugManager.flags.CreateMultipleSubDevices.set(2);

View File

@ -45,7 +45,7 @@ struct AppendFillMultiPacketEventFixture : public AppendFillFixture {
void setUp() {
debugManager.flags.UsePipeControlMultiKernelEventSync.set(usePipeControlMultiPacketEventSync);
debugManager.flags.CompactL3FlushEventPacket.set(compactL3FlushEventPacket);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
if constexpr (multiTile == 1) {
debugManager.flags.CreateMultipleSubDevices.set(2);

View File

@ -1937,7 +1937,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenNonInOrderCmdListWhenPass
HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenCmdsChainingFromAppendCopyWhenDispatchingKernelThenProgramSemaphoreOnce) {
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(1);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(1);
auto immCmdList = createImmCmdList<FamilyType::gfxCoreFamily>();
bool heaplessEnabled = immCmdList->isHeaplessModeEnabled();
@ -1991,7 +1991,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenCmdsChainingFromAppendCop
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(1);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(1);
auto immCmdList = createImmCmdList<FamilyType::gfxCoreFamily>();

View File

@ -2302,7 +2302,7 @@ HWTEST_F(StandaloneInOrderTimestampAllocationTests, givenDebugFlagSetToZeroWhenA
HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenNonWalkerCounterSignalingWhenPassedNonProfilingEventThenNotAssignAllocation, IsAtLeastXeHpCore) {
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(0);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto eventPool = createEvents<FamilyType>(1, false);
auto eventHandle = events[0]->toHandle();

View File

@ -1046,7 +1046,7 @@ struct L0GfxCoreHelperMultiPacketEventFixture {
void setUp() {
debugManager.flags.UsePipeControlMultiKernelEventSync.set(usePipeControlMultiPacketEventSync);
debugManager.flags.CompactL3FlushEventPacket.set(compactL3FlushEventPacket);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
}
void tearDown() {

View File

@ -107,7 +107,7 @@ inline void HardwareInterface<GfxFamily>::programWalker(
bool flushL3AfterPostSyncForHostUsm = kernelSystemAllocation || kernel.isAnyKernelArgumentUsingZeroCopyMemory();
bool flushL3AfterPostSyncForExternalAllocation = kernel.isUsingSharedObjArgs();
if (debugManager.flags.DisableFlushL3ForHostUsm.get() && flushL3AfterPostSyncForHostUsm) {
if (debugManager.flags.RedirectFlushL3HostUsmToExternal.get() && flushL3AfterPostSyncForHostUsm) {
flushL3AfterPostSyncForHostUsm = false;
flushL3AfterPostSyncForExternalAllocation = true;
}

View File

@ -71,7 +71,7 @@ TEST_F(ClCreateCommandQueueTest, givenOoqParametersWhenQueueIsCreatedThenQueueIs
HWTEST_F(ClCreateCommandQueueTest, givenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToBatchingMode) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
using BaseType = typename CommandQueue::BaseType;
cl_int retVal = CL_SUCCESS;
@ -123,7 +123,7 @@ HWTEST_F(ClCreateCommandQueueTest, givenForcedDispatchModeAndOoqParametersWhenQu
HWTEST_F(ClCreateCommandQueueTest, givenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToNTo1SubmissionModel) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
using BaseType = typename CommandQueue::BaseType;
cl_int retVal = CL_SUCCESS;

View File

@ -561,7 +561,7 @@ HWTEST_F(DispatchFlagsTests, givenMockKernelWhenSettingAdditionalKernelExecInfoT
HWTEST_F(EnqueueHandlerTest, GivenCommandStreamWithoutKernelAndZeroSurfacesWhenEnqueuedHandlerThenProgramPipeControl) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
std::unique_ptr<MockCommandQueueWithCacheFlush<FamilyType>> mockCmdQ(new MockCommandQueueWithCacheFlush<FamilyType>(context, pClDevice, 0));

View File

@ -1071,7 +1071,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, EnqueueKernelTest, givenTwoEnqueueProgrammedWithinS
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesSubmissionsAreFlushed) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
@ -1095,7 +1095,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenFi
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCalledThenBatchesSubmissionsAreFlushed) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
@ -1119,7 +1119,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenTh
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenWaitForEventsIsCalledThenBatchedSubmissionsAreFlushed) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
mockCsr->useNewResourceImplicitFlush = false;
@ -1147,7 +1147,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenWa
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenCommandIsFlushedThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
@ -1205,7 +1205,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenNo
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenCommandWithEventIsFollowedByCommandWithoutEventThenFlushStampIsUpdatedInCommandQueueCsrAndEvent) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
@ -1296,7 +1296,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenWa
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenFinishIsCalledWithUnflushedTaskCountThenBatchedSubmissionsAreFlushed) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);
@ -1322,7 +1322,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenCsrInBatchingModeWhenFi
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenOutOfOrderCommandQueueWhenEnqueueKernelIsMadeThenPipeControlPositionIsRecorded) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0};
auto ooq = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
@ -1348,7 +1348,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenOutOfOrderCommandQueueW
HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelIsMadeThenPipeControlPositionIsRecorded) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
const cl_queue_properties props[] = {0};
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
@ -1373,7 +1373,7 @@ HWTEST_F(EnqueueKernelTest, givenInOrderCommandQueueWhenEnqueueKernelIsMadeThenP
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenInOrderCommandQueueWhenEnqueueKernelThatHasSharedObjectsAsArgIsMadeThenPipeControlPositionIsRecorded) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
const cl_queue_properties props[] = {0};
auto inOrderQueue = clCreateCommandQueueWithProperties(context, pClDevice, props, nullptr);
@ -1445,7 +1445,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenInOrderCommandQueueWhen
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenInOrderCommandQueueWhenEnqueueKernelReturningEventIsMadeAndCommandStreamReceiverIsInNTo1ModeThenPipeControlPositionIsRecorded) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
const cl_queue_properties props[] = {0};
@ -1477,7 +1477,7 @@ HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenInOrderCommandQueueWhen
HWTEST_TEMPLATED_F(EnqueueKernelTestWithMockCsrHw2, givenOutOfOrderCommandQueueWhenEnqueueKernelReturningEventIsMadeThenPipeControlPositionIsRecorded) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto *mockCsr = static_cast<MockCsrHw2<FamilyType> *>(&pDevice->getGpgpuCommandStreamReceiver());
mockCsr->overrideDispatchPolicy(DispatchMode::batchedDispatch);

View File

@ -216,7 +216,7 @@ TEST_F(EventTests, GivenNoEventsWhenEnqueuingKernelThenTaskLevelIsIncremented) {
TEST_F(EventTests, WhenEnqueuingMarkerThenPassedEventHasTheSameLevelAsPreviousCommand) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
cl_uint numEventsInWaitList = 0;
cl_event *eventWaitList = nullptr;

View File

@ -38,7 +38,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnque
HWTEST_F(IOQWithTwoWalkers, GivenTwoCommandQueuesWhenEnqueuingKernelThenOnePipeControlIsInsertedBetweenWalkers) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.timestampPacketWriteEnabled = false;

View File

@ -722,7 +722,7 @@ HWTEST_F(EnqueueWriteImageTest, givenMultiRootDeviceImageWhenNonBlockedEnqueueWr
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
MockDefaultContext context{true};

View File

@ -537,7 +537,7 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, CommandStreamReceiverFlushTaskTests, givenNothing
HWTEST_TEMPLATED_F(CommandStreamReceiverFlushTaskTestsWithMockCsrHw2, givenCsrInBatchingModeWhenFlushTaskIsCalledThenFlushedTaskCountIsNotModifed) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
auto &commandStream = commandQueue.getCS(4096u);
@ -688,7 +688,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeWhenFlushTask
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTaskIsCalledGivenNumberOfTimesThenFlushIsCalled) {
DebugManagerStateRestore restorer;
debugManager.flags.PerformImplicitFlushEveryEnqueueCount.set(2);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
auto &commandStream = commandQueue.getCS(4096u);
@ -723,7 +723,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
HWTEST_TEMPLATED_F(CommandStreamReceiverFlushTaskTestsWithMockCsrHw2, givenCsrInBatchingModeWhenWaitForTaskCountIsCalledWithTaskCountThatWasNotYetFlushedThenBatchedCommandBuffersAreSubmitted) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
auto &commandStream = commandQueue.getCS(4096u);
@ -864,7 +864,7 @@ struct MockedMemoryManager : public OsAgnosticMemoryManager {
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalResourceUsedExhaustsTheBudgetThenDoImplicitFlush) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
CommandQueueHw<FamilyType> commandQueue(nullptr, pClDevice, 0, false);
auto &commandStream = commandQueue.getCS(4096u);

View File

@ -620,7 +620,7 @@ HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferThenCommandBufferIsConstru
HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferAndForceTlbFlushAfterCopyThenCommandBufferIsConstructedProperlyAndTlbFlushDetected) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
debugManager.flags.ForceTlbFlushWithTaskCountAfterCopy.set(1);
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
auto bcsOsContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, pDevice->getRootDeviceIndex(), 0,
@ -677,7 +677,7 @@ HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferAndForceTlbFlushAfterCopyT
HWTEST_F(BcsTests, givenProfilingDisabledWhenBlitBufferAndForceTlbFlushAfterCopyThenCommandBufferIsConstructedProperlyAndTlbFlushDetected) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceTlbFlushWithTaskCountAfterCopy.set(1);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
auto bcsOsContext = std::unique_ptr<OsContext>(OsContext::create(nullptr, pDevice->getRootDeviceIndex(), 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS, EngineUsage::regular}, pDevice->getDeviceBitfield())));

View File

@ -22,7 +22,7 @@ struct CreateCommandStreamReceiverTest : public ::testing::TestWithParam<Command
HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetToValidTypeThenTheFuntionReturnsCommandStreamReceiver) {
DebugManagerStateRestore stateRestorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
HardwareInfo *hwInfo = nullptr;
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);

View File

@ -416,7 +416,7 @@ HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEnqueueingThe
HWTEST_F(TimestampPacketTests, givenTimestampPacketWriteEnabledWhenEnqueueingThenWriteWalkerStamp) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
using WalkerVariant = typename FamilyType::WalkerVariant;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;

View File

@ -591,7 +591,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenAllEnginesReadyWhenWaitingForEventThenCl
HWTEST_TEMPLATED_F(BcsBufferTests, givenAllBcsEnginesReadyWhenWaitingForEventThenClearDeferredNodes) {
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto &productHelper = device->getProductHelper();
auto copyDefaultEngineType = productHelper.getDefaultCopyEngine();
auto mockCmdQ = static_cast<MockCommandQueueHw<FamilyType> *>(commandQueue.get());

View File

@ -1108,7 +1108,7 @@ HWTEST_F(ProfilingWithPerfCountersTests, GivenCommandQueueWithProfilingPerfCount
typedef typename FamilyType::MI_REPORT_PERF_COUNT MI_REPORT_PERF_COUNT;
DebugManagerStateRestore restorer{};
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
pCmdQ->setPerfCountersEnabled();

View File

@ -421,7 +421,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, UseHighAlignmentForHeapExtended, -1, "-1: defaul
DECLARE_DEBUG_VARIABLE(int32_t, DispatchCmdlistCmdBufferPrimary, -1, "-1: default, 0: dispatch command buffers as secondary, 1: dispatch command buffers as primary and chain")
DECLARE_DEBUG_VARIABLE(int32_t, UseImmediateFlushTask, -1, "-1: default, 0: use regular flush task, 1: use immediate flush task")
DECLARE_DEBUG_VARIABLE(int32_t, SkipDcFlushOnBarrierWithoutEvents, -1, "-1: default (enabled), 0: disabled, 1: enabled")
DECLARE_DEBUG_VARIABLE(int32_t, ForceL3FlushAfterPostSync, -1, "-1: default, 0: disabled, 1: enabled. If enabled flush L3 after post sync operation")
DECLARE_DEBUG_VARIABLE(int32_t, EnableL3FlushAfterPostSync, -1, "-1: default, 0: disabled, 1: enabled. If enabled flush L3 after post sync operation")
DECLARE_DEBUG_VARIABLE(int32_t, EnableDeviceUsmAllocationPool, -1, "-1: default (enabled, 2MB), 0: disabled, >=1: enabled, size in MB")
DECLARE_DEBUG_VARIABLE(int32_t, EnableHostUsmAllocationPool, -1, "-1: default (enabled, 2MB), 0: disabled, >=1: enabled, size in MB")
DECLARE_DEBUG_VARIABLE(int32_t, UseLocalPreferredForCacheableBuffers, -1, "Use localPreferred for cacheable buffers")
@ -620,7 +620,7 @@ DECLARE_DEBUG_VARIABLE(bool, EnableBOChunkingPrefetch, false, "Enables prefetchi
DECLARE_DEBUG_VARIABLE(bool, EnableBOChunkingDevMemPrefetch, false, "Enables prefetching of Device Memory chunks")
DECLARE_DEBUG_VARIABLE(bool, EnableBOChunkingPreferredLocationHint, false, "Enables preferred location advise on chunks")
DECLARE_DEBUG_VARIABLE(bool, EnableCompatibilityMode, true, "Enables compatibility mode for platforms which can use precompiled base platform configuration")
DECLARE_DEBUG_VARIABLE(bool, DisableFlushL3ForHostUsm, false, "Disables L3 flush for host usm")
DECLARE_DEBUG_VARIABLE(bool, RedirectFlushL3HostUsmToExternal, true, "If L3 flush for host usm is needed it will be rerouted to folllow the external allocation flush logic")
DECLARE_DEBUG_VARIABLE(int32_t, EnableBOChunking, -1, "Enables use of chunking of BOs in the KMD, mask: -1 = default, 0 = no chunking, 1 = shared allocations only, 2 = multi-tile device allocations only, 3 = shared and multi-tile device allocations .")
DECLARE_DEBUG_VARIABLE(int32_t, DestroyAllocationsViaGmm, -1, "Use DeAllocate2 wrapper instead of raw GDI destroy allocations")
DECLARE_DEBUG_VARIABLE(int32_t, NumberOfBOChunks, 2, "Number of chunks to use")

View File

@ -39,7 +39,7 @@ class DrmCommandStreamTest : public ::testing::Test {
template <typename GfxFamily>
void setUpT() {
// make sure this is disabled, we don't want to test this now
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
debugManager.flags.EnableForcePin.set(false);
mock = new DrmMock(mockFd, *executionEnvironment.rootDeviceEnvironments[0]);
@ -129,7 +129,7 @@ class DrmCommandStreamEnhancedTemplate : public ::testing::Test {
this->dbgState = std::make_unique<DebugManagerStateRestore>();
// make sure this is disabled, we don't want to test this now
debugManager.flags.EnableForcePin.set(false);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
mock = DrmType::create(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]).release();
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface = std::make_unique<OSInterface>();

View File

@ -538,7 +538,7 @@ EnableBOChunkingDevMemPrefetch = 0
EnableBOChunkingPreferredLocationHint = 0
DestroyAllocationsViaGmm = -1
EnableCompatibilityMode = 1
DisableFlushL3ForHostUsm = 0
RedirectFlushL3HostUsmToExternal = 1
NumberOfBOChunks = 2
SetBOChunkingSize = -1
EnableBOChunking = -1
@ -595,7 +595,7 @@ ExperimentalEnableHostAllocationCache = -1
OverridePatIndexForUncachedTypes = -1
OverridePatIndexForCachedTypes = -1
FlushTlbBeforeCopy = -1
ForceL3FlushAfterPostSync = -1
EnableL3FlushAfterPostSync = -1
EnableUserFenceUponUnbind = -1
EnableWaitOnUserFenceAfterBindAndUnbind = -1
UseGemCreateExtInAllocateMemoryByKMD = -1

View File

@ -938,7 +938,7 @@ HWTEST_F(CommandStreamReceiverTest, givenCsrWhenUllsDisabledAndStopDirectSubmiss
HWTEST_F(CommandStreamReceiverTest, givenNoDirectSubmissionWhenCheckTaskCountFromWaitEnabledThenReturnsFalse) {
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(0);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
EXPECT_FALSE(csr.isUpdateTagFromWaitEnabled());
@ -978,7 +978,7 @@ HWTEST_F(CommandStreamReceiverTest, givenUpdateTaskCountFromWaitWhenCheckTaskCou
HWTEST_F(CommandStreamReceiverTest, givenUpdateTaskCountFromWaitWhenCheckIfEnabledThenCanBeEnabledOnlyWithDirectSubmission) {
DebugManagerStateRestore restorer;
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(0);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
auto &gfxCoreHelper = pDevice->getGfxCoreHelper();
@ -998,7 +998,7 @@ HWTEST_F(CommandStreamReceiverTest, givenUpdateTaskCountFromWaitInMultiRootDevic
DebugManagerStateRestore restorer;
debugManager.flags.CreateMultipleRootDevices.set(2);
NEO::debugManager.flags.ForceL3FlushAfterPostSync.set(0);
NEO::debugManager.flags.EnableL3FlushAfterPostSync.set(0);
TearDown();
SetUp();

View File

@ -31,7 +31,7 @@ using namespace NEO;
struct DeviceCommandStreamLeaksTest : ::testing::Test {
void SetUp() override {
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
HardwareInfo *hwInfo = nullptr;
executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1);
executionEnvironment->incRefInternal();
@ -48,7 +48,7 @@ struct DeviceCommandStreamLeaksTest : ::testing::Test {
HWTEST_F(DeviceCommandStreamLeaksTest, WhenCreatingDeviceCsrThenValidPointerIsReturned) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
DrmMockSuccess mockDrm(mockFd, *executionEnvironment->rootDeviceEnvironments[0]);
EXPECT_NE(nullptr, ptr);
@ -69,7 +69,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWithAubDumWhenItIsCreat
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenOsInterfaceIsNullptrThenValidateDrm) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->osInterface);
@ -99,7 +99,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenEnabledGemCloseWorkerWhenCsrIsCreate
ultHwConfig.useGemCloseWorker = true;
DebugManagerStateRestore restorer;
debugManager.flags.EnableGemCloseWorker.set(1u);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
@ -117,7 +117,7 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenCsrIsCreate
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useGemCloseWorker = true;
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));

View File

@ -40,7 +40,7 @@ struct DrmCommandStreamMemExecTest : public DrmCommandStreamEnhancedTemplate<Drm
HWTEST_F(DrmCommandStreamMMTest, GivenForcePinThenMemoryManagerCreatesPinBb) {
DebugManagerStateRestore dbgRestorer;
debugManager.flags.EnableForcePin.set(true);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
MockExecutionEnvironment executionEnvironment;
auto drm = DrmMockCustom::create(*executionEnvironment.rootDeviceEnvironments[0]).release();
@ -61,7 +61,7 @@ HWTEST_F(DrmCommandStreamMMTest, GivenForcePinThenMemoryManagerCreatesPinBb) {
HWTEST_F(DrmCommandStreamMMTest, givenForcePinDisabledWhenMemoryManagerIsCreatedThenPinBBIsCreated) {
DebugManagerStateRestore dbgRestorer;
debugManager.flags.EnableForcePin.set(false);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
MockExecutionEnvironment executionEnvironment;
auto drm = DrmMockCustom::create(*executionEnvironment.rootDeviceEnvironments[0]).release();

View File

@ -27,7 +27,7 @@ using namespace NEO;
HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenL0ApiConfigWhenCreatingDrmCsrThenEnableImmediateDispatch) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
VariableBackup<ApiSpecificConfig::ApiType> backup(&apiTypeForUlts, ApiSpecificConfig::L0);
MockDrmCsr<FamilyType> csr(executionEnvironment, 0, 1);
EXPECT_EQ(DispatchMode::immediateDispatch, csr.dispatchMode);
@ -88,7 +88,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenNoTagAddressWhenGettingCompletionA
HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenExecBufferErrorWhenFlushInternalThenProperErrorIsReturned) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
mock->execBufferResult = -1;
mock->baseErrno = false;
@ -1347,7 +1347,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
DebugManagerStateRestore restorer;
debugManager.flags.EnableUserFenceForCompletionWait.set(0);
debugManager.flags.OverrideNotifyEnableForTagUpdatePostSync.set(1);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
mock->isVmBindAvailableCall.callParent = false;
mock->isVmBindAvailableCall.returnValue = true;

View File

@ -409,7 +409,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenCheckFlagsWhenFlushingThenSucceeds
HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenCheckDrmFreeWhenFlushingThenSucceeds) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
mock->returnHandle = 17;
auto &cs = csr->getCS();

View File

@ -375,7 +375,7 @@ class DrmCommandStreamForceTileTest : public ::testing::Test {
};
template <typename GfxFamily>
void setUpT() {
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
mock = new DrmMock(mockFd, *executionEnvironment.rootDeviceEnvironments[0]);
@ -482,7 +482,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenPrintIndicesEnabledWhenFlushThenPr
struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
void SetUp() override {
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
@ -537,7 +537,7 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenTwoTilesWhenFlushIsCalledThenExecIsExecutedOnEveryTile) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
auto csr = createCsr<FamilyType>();
@ -638,7 +638,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, whenForceExecu
DebugManagerStateRestore restorer;
debugManager.flags.ForceExecutionTile.set(1);
debugManager.flags.EnableWalkerPartition.set(0);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
@ -680,7 +680,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, whenForceExecu
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenDisabledImplicitScalingWhenFlushingThenUseOnlyOneContext) {
DebugManagerStateRestore debugRestore{};
debugManager.flags.EnableWalkerPartition.set(0);
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
@ -720,7 +720,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenDisabledI
HWCMDTEST_F(IGFX_XE_HP_CORE, DrmImplicitScalingCommandStreamTest, givenMultiTileCsrWhenFlushThenVmHandleIdEqualsTileId) {
DebugManagerStateRestore restorer;
debugManager.flags.ForceL3FlushAfterPostSync.set(0);
debugManager.flags.EnableL3FlushAfterPostSync.set(0);
struct MockCsr : DrmCommandStreamReceiver<FamilyType> {
using DrmCommandStreamReceiver<FamilyType>::DrmCommandStreamReceiver;
int exec(const BatchBuffer &batchBuffer, uint32_t vmHandleId, uint32_t drmContextId, uint32_t index) override {