mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
[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:
committed by
Compute-Runtime-Automation
parent
c7adbc2140
commit
63470ed698
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021-2022 Intel Corporation
|
* Copyright (C) 2021-2023 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -28,6 +28,7 @@ struct MemAdviseFlags {
|
|||||||
};
|
};
|
||||||
MemAdviseFlags() {
|
MemAdviseFlags() {
|
||||||
allFlags = 0;
|
allFlags = 0;
|
||||||
|
devicePreferredLocation = 1;
|
||||||
cachedMemory = 1;
|
cachedMemory = 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ TEST_F(IoctlHelperPrelimFixture, givenDrmAllocationWhenSetMemAdviseWithDevicePre
|
|||||||
|
|
||||||
MemAdviseFlags memAdviseFlags{};
|
MemAdviseFlags memAdviseFlags{};
|
||||||
|
|
||||||
for (auto devicePreferredLocation : {true, false}) {
|
for (auto devicePreferredLocation : {false, true}) {
|
||||||
memAdviseFlags.devicePreferredLocation = devicePreferredLocation;
|
memAdviseFlags.devicePreferredLocation = devicePreferredLocation;
|
||||||
|
|
||||||
EXPECT_TRUE(allocation.setMemAdvise(drm.get(), memAdviseFlags));
|
EXPECT_TRUE(allocation.setMemAdvise(drm.get(), memAdviseFlags));
|
||||||
|
|||||||
Reference in New Issue
Block a user