mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
c77fad31e2
commit
18d828421d
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user