performance: add debug flag to control huge chunk size on wddm.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-10-21 13:43:55 +00:00
committed by Compute-Runtime-Automation
parent c77fad31e2
commit 18d828421d
5 changed files with 17 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,6 +12,9 @@ namespace NEO {
const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::allocateByKmd;
size_t WddmMemoryManager::getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod allocationMethod) const {
if (NEO::debugManager.flags.ForceWddmHugeChunkSizeMB.get() != -1) {
return NEO::debugManager.flags.ForceWddmHugeChunkSizeMB.get() * MemoryConstants::megaByte;
}
if (GfxMemoryAllocationMethod::allocateByKmd == allocationMethod) {
return 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k;
} else {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,6 +12,9 @@ namespace NEO {
const GfxMemoryAllocationMethod preferredAllocationMethod = GfxMemoryAllocationMethod::useUmdSystemPtr;
size_t WddmMemoryManager::getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod allocationMethod) const {
if (NEO::debugManager.flags.ForceWddmHugeChunkSizeMB.get() != -1) {
return NEO::debugManager.flags.ForceWddmHugeChunkSizeMB.get() * MemoryConstants::megaByte;
}
return 4 * MemoryConstants::gigaByte - MemoryConstants::pageSize64k;
}