performance: Move preemption allocation init to the first submission

Related-To: NEO-12323
Signed-off-by: Krzysztof Sprzaczkowski <krzysztof.sprzaczkowski@intel.com>
This commit is contained in:
Krzysztof Sprzaczkowski
2025-01-15 13:44:10 +00:00
committed by Compute-Runtime-Automation
parent 92ea7ee7a3
commit a17745532c
23 changed files with 117 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -331,13 +331,17 @@ uint8_t CommandStreamReceiver::getUmdPowerHintValue() const {
return this->osContext ? this->osContext->getUmdPowerHintValue() : 0u;
}
bool CommandStreamReceiver::initializeResources(bool allocateInterrupt) {
bool CommandStreamReceiver::initializeResources(bool allocateInterrupt, const PreemptionMode preemptionMode) {
if (!resourcesInitialized) {
auto lock = obtainUniqueOwnership();
if (!resourcesInitialized) {
if (!osContext->ensureContextInitialized(allocateInterrupt)) {
return false;
}
if (preemptionMode == NEO::PreemptionMode::MidThread &&
!this->getPreemptionAllocation()) {
this->createPreemptionAllocation();
}
this->fillReusableAllocationsList();
this->resourcesInitialized = true;
}