Add debug flag OverrideSlmSize

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2021-03-18 13:30:33 +00:00
committed by Compute-Runtime-Automation
parent 69afa8b4c3
commit c58f26c6ec
4 changed files with 27 additions and 1 deletions

View File

@@ -211,6 +211,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceDeviceEnqueueSupport, -1, "-1: default, 0:
DECLARE_DEBUG_VARIABLE(int32_t, ForcePipeSupport, -1, "-1: default, 0: disabled, 1: enabled")
DECLARE_DEBUG_VARIABLE(int32_t, UseAsyncDrmExec, -1, "-1: default, 0: Disabled 1: Enabled. If enabled, pass EXEC_OBJECT_ASYNC to exec ioctl.")
DECLARE_DEBUG_VARIABLE(int32_t, UseBindlessMode, -1, "Use precompiled builtins in bindless mode, -1: api dependent, 0: disabled, 1: enabled")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideSlmSize, -1, "Force different slm size than default in kB")
/*DRIVER TOGGLES*/
DECLARE_DEBUG_VARIABLE(int32_t, ForceOCLVersion, 0, "Force specific OpenCL API version")

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -107,6 +107,9 @@ void Device::initializeCaps() {
deviceInfo.maxFrontEndThreads = HwHelper::getMaxThreadsForVfe(hwInfo);
deviceInfo.localMemSize = hwInfo.capabilityTable.slmSize * KB;
if (DebugManager.flags.OverrideSlmSize.get() != -1) {
deviceInfo.localMemSize = DebugManager.flags.OverrideSlmSize.get() * KB;
}
deviceInfo.imageSupport = hwInfo.capabilityTable.supportsImages;
deviceInfo.image2DMaxWidth = 16384;