performance: Enable wait pkg for ULLS light

Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-03-07 10:32:00 +00:00
committed by Compute-Runtime-Automation
parent 413194bd2a
commit 53062056ec
6 changed files with 66 additions and 26 deletions

View File

@@ -45,6 +45,7 @@
#include "shared/source/os_interface/os_context.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/utilities/tag_allocator.h"
#include "shared/source/utilities/wait_util.h"
#include "command_stream_receiver_hw_ext.inl"
@@ -1429,6 +1430,7 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission() {
this->osContext->setDirectSubmissionActive();
if (this->osContext->isDirectSubmissionLightActive()) {
this->pushAllocationsForMakeResident = false;
WaitUtils::init(true);
}
}
}

View File

@@ -30,7 +30,7 @@
namespace NEO {
ExecutionEnvironment::ExecutionEnvironment() {
WaitUtils::init();
WaitUtils::init(false);
this->configureNeoEnvironment();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -16,7 +16,6 @@ namespace WaitUtils {
constexpr uint64_t defaultCounterValue = 10000;
constexpr uint32_t defaultControlValue = 0;
constexpr bool defaultEnableWaitPkg = false;
uint64_t waitpkgCounterValue = defaultCounterValue;
uint32_t waitpkgControlValue = defaultControlValue;
@@ -30,13 +29,16 @@ bool waitpkgSupport = false;
#endif
bool waitpkgUse = false;
void init() {
bool enableWaitPkg = defaultEnableWaitPkg;
int32_t overrideEnableWaitPkg = debugManager.flags.EnableWaitpkg.get();
if (overrideEnableWaitPkg != -1) {
enableWaitPkg = !!(overrideEnableWaitPkg);
void init(bool enable) {
if (waitpkgUse) {
return;
}
if (enableWaitPkg && waitpkgSupport) {
if (debugManager.flags.EnableWaitpkg.get() != -1) {
enable = debugManager.flags.EnableWaitpkg.get();
}
if (enable && waitpkgSupport) {
if (CpuInfo::getInstance().isFeatureSupported(CpuInfo::featureWaitPkg)) {
waitpkgUse = true;
waitCount = 0;
@@ -47,6 +49,7 @@ void init() {
if (overrideWaitPkgCounter != -1) {
waitpkgCounterValue = static_cast<uint64_t>(overrideWaitPkgCounter);
}
int32_t overrideWaitPkgControl = debugManager.flags.WaitpkgControlValue.get();
if (overrideWaitPkgControl != -1) {
waitpkgControlValue = static_cast<uint32_t>(overrideWaitPkgControl);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -59,7 +59,7 @@ inline bool waitFunction(volatile TagAddressType *pollAddress, TaskCountType exp
return waitFunctionWithPredicate<TaskCountType>(pollAddress, expectedValue, std::greater_equal<TaskCountType>());
}
void init();
void init(bool enable);
} // namespace WaitUtils
} // namespace NEO