mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
performance: Change preferred allocation method to AllocateByKmd
Related-To: NEO-7194 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
94b69aae80
commit
957aa99f9e
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::UseUmdSystemPtr;
|
||||
const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::AllocateByKmd;
|
||||
|
||||
size_t WddmMemoryManager::getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod allocationMethod) const {
|
||||
return 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k;
|
||||
|
||||
@@ -237,7 +237,7 @@ TEST_F(WddmMemoryManagerAllocPathTests, givenAllocateGraphicsMemoryUsingKmdAndMa
|
||||
allocData.makeGPUVaDifferentThanCPUPtr = true;
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(allocData, false);
|
||||
|
||||
if (preferredAllocationMethod == GfxMemoryAllocationMethod::AllocateByKmd) {
|
||||
if (preferredAllocationMethod == GfxMemoryAllocationMethod::AllocateByKmd && is64bit) {
|
||||
EXPECT_FALSE(memoryManager->mapGpuVirtualAddressWithCpuPtr);
|
||||
} else {
|
||||
EXPECT_TRUE(memoryManager->mapGpuVirtualAddressWithCpuPtr);
|
||||
@@ -494,7 +494,7 @@ TEST_F(WddmMemoryManagerTests, givenTypeWhenCallIsStatelessAccessRequiredThenPro
|
||||
|
||||
TEST_F(WddmMemoryManagerTests, givenForcePreferredAllocationMethodFlagSetWhenGettingPreferredAllocationMethodThenValueFlagIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
EXPECT_EQ(preferredAllocationMethod, MockWddmMemoryManager::getPreferredAllocationMethod());
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::AllocateByKmd, MockWddmMemoryManager::getPreferredAllocationMethod());
|
||||
|
||||
for (const auto &allocationMethod : {GfxMemoryAllocationMethod::UseUmdSystemPtr, GfxMemoryAllocationMethod::AllocateByKmd}) {
|
||||
DebugManager.flags.ForcePreferredAllocationMethod.set(static_cast<int32_t>(allocationMethod));
|
||||
|
||||
Reference in New Issue
Block a user