mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
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:
committed by
Compute-Runtime-Automation
parent
92ea7ee7a3
commit
a17745532c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user