mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
4d26759d69
commit
b7681a2e7b
@@ -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>();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user