feature: add print of cpu flags and address size upon detection

Related-To: NEO-9737

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2024-01-22 17:58:57 +00:00
committed by Compute-Runtime-Automation
parent 6e434e0424
commit a25eedb5ac
4 changed files with 46 additions and 18 deletions

View File

@@ -317,6 +317,7 @@ DECLARE_DEBUG_VARIABLE(bool, PrintKernelDispatchParameters, false, "Prints kerne
DECLARE_DEBUG_VARIABLE(bool, LogGdiCalls, false, "Log GDI calls")
DECLARE_DEBUG_VARIABLE(bool, LogGdiCallsToFile, false, "Log GDI calls to file")
DECLARE_DEBUG_VARIABLE(bool, PrintGmmCompressionParams, false, "Print Gmm compression resource params")
DECLARE_DEBUG_VARIABLE(bool, PrintCpuFlags, false, "Print CPU Flags and properties upon detection")
/*PERFORMANCE FLAGS*/
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForBuffers, false, "When active all buffer allocations will not share memory with CPU.")

View File

@@ -1,10 +1,11 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/utilities/cpu_info.h"
#ifndef BIT
@@ -51,5 +52,8 @@ void CpuInfo::detect() const {
virtualAddressSize = (cpuInfo[eax] >> 8) & 0xFF;
}
}
if (debugManager.flags.PrintCpuFlags.get()) {
printf("CPUFlags:\nCLFlush: %d Avx2: %d WaitPkg: %d\nVirtual Address Size %u\n", !!(features & featureClflush), !!(features & featureAvX2), !!(features & featureWaitPkg), virtualAddressSize);
}
}
} // namespace NEO