Add infrastructure to assign engine to command queue with round robin

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-11-12 11:02:17 +00:00
committed by Compute-Runtime-Automation
parent bdf5a1c39c
commit e8cc34d7b0
19 changed files with 211 additions and 2 deletions

View File

@ -22,6 +22,7 @@
#include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/os_interface/linux/device_command_stream_fixture.h"
#include "opencl/source/command_queue/command_queue.h"
#include "opencl/source/platform/platform.h"
#include "opencl/test/unit_test/linux/drm_wrap.h"
#include "opencl/test/unit_test/linux/mock_os_layer.h"
@ -802,6 +803,24 @@ TEST(DirectSubmissionControllerTest, whenCheckDirectSubmissionControllerSupportT
EXPECT_TRUE(DirectSubmissionController::isSupported());
}
TEST(CommandQueueTest, whenCheckEngineRoundRobinAssignThenReturnsTrue) {
EXPECT_FALSE(CommandQueue::isAssignEngineRoundRobinEnabled());
}
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();