[fix] zeCommandListAppendMemAdvise to clear preferred location correctly

The memadvise with preferred location for kmd-migrated shared allocation
is set to device associated with cmd list by default to migrate data
to lmem on non-atomic gpu page fault too (for performance reasons).

Related-To: NEO-7252

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2023-04-19 00:25:30 +00:00
committed by Compute-Runtime-Automation
parent c7adbc2140
commit 63470ed698
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -28,6 +28,7 @@ struct MemAdviseFlags {
};
MemAdviseFlags() {
allFlags = 0;
devicePreferredLocation = 1;
cachedMemory = 1;
}
};

View File

@@ -276,7 +276,7 @@ TEST_F(IoctlHelperPrelimFixture, givenDrmAllocationWhenSetMemAdviseWithDevicePre
MemAdviseFlags memAdviseFlags{};
for (auto devicePreferredLocation : {true, false}) {
for (auto devicePreferredLocation : {false, true}) {
memAdviseFlags.devicePreferredLocation = devicePreferredLocation;
EXPECT_TRUE(allocation.setMemAdvise(drm.get(), memAdviseFlags));