mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Fix EnableCmdQRoundRobindEngineAssign flag
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f31fef4417
commit
7a1cac0674
@@ -133,12 +133,18 @@ void CommandQueue::initializeGpgpu() const {
|
||||
auto &hwInfo = device->getDevice().getHardwareInfo();
|
||||
auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
|
||||
auto engineRoundRobinAvailable = hwHelper.isAssignEngineRoundRobinSupported(hwInfo) &&
|
||||
this->isAssignEngineRoundRobinEnabled();
|
||||
|
||||
if (DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get() != -1) {
|
||||
engineRoundRobinAvailable = DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get();
|
||||
}
|
||||
|
||||
auto assignEngineRoundRobin =
|
||||
!this->isSpecialCommandQueue &&
|
||||
!this->queueFamilySelected &&
|
||||
!(getCmdQueueProperties<cl_queue_priority_khr>(propertiesVector.data(), CL_QUEUE_PRIORITY_KHR) & static_cast<cl_queue_priority_khr>(CL_QUEUE_PRIORITY_LOW_KHR)) &&
|
||||
hwHelper.isAssignEngineRoundRobinSupported(hwInfo) &&
|
||||
this->isAssignEngineRoundRobinEnabled();
|
||||
engineRoundRobinAvailable;
|
||||
|
||||
if (assignEngineRoundRobin) {
|
||||
this->gpgpuEngine = &device->getDevice().getNextEngineForCommandQueue();
|
||||
|
||||
@@ -10,13 +10,7 @@
|
||||
namespace NEO {
|
||||
|
||||
bool CommandQueue::isAssignEngineRoundRobinEnabled() {
|
||||
auto assignEngineRoundRobin = true;
|
||||
|
||||
if (DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get() != -1) {
|
||||
assignEngineRoundRobin = DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get();
|
||||
}
|
||||
|
||||
return assignEngineRoundRobin;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommandQueue::isTimestampWaitEnabled() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,13 +12,7 @@
|
||||
namespace NEO {
|
||||
|
||||
bool CommandQueue::isAssignEngineRoundRobinEnabled() {
|
||||
auto assignEngineRoundRobin = false;
|
||||
|
||||
if (DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get() != -1) {
|
||||
assignEngineRoundRobin = DebugManager.flags.EnableCmdQRoundRobindEngineAssign.get();
|
||||
}
|
||||
|
||||
return assignEngineRoundRobin;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CommandQueue::isTimestampWaitEnabled() {
|
||||
|
||||
@@ -894,20 +894,6 @@ TEST(CommandQueueTest, whenCheckEngineTimestampWaitEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CommandQueue::isTimestampWaitEnabled());
|
||||
}
|
||||
|
||||
TEST(CommandQueueTest, givenEnableCmdQRoundRobindEngineAssignSetWhenCheckEngineRoundRobinAssignThenReturnsTrue) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableCmdQRoundRobindEngineAssign.set(1);
|
||||
|
||||
EXPECT_TRUE(CommandQueue::isAssignEngineRoundRobinEnabled());
|
||||
}
|
||||
|
||||
TEST(CommandQueueTest, givenEnableCmdQRoundRobindEngineAssignSetZeroWhenCheckEngineRoundRobinAssignThenReturnsTrue) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableCmdQRoundRobindEngineAssign.set(0);
|
||||
|
||||
EXPECT_FALSE(CommandQueue::isAssignEngineRoundRobinEnabled());
|
||||
}
|
||||
|
||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||
EXPECT_NE(nullptr, platformsImpl);
|
||||
platformsDestructor();
|
||||
|
||||
Reference in New Issue
Block a user