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

@@ -27,6 +27,7 @@ add_executable(igdrcl_${target_name}
${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp
${NEO_SOURCE_DIR}/opencl/source/dll/linux/command_queue_linux_dll.cpp
${NEO_SOURCE_DIR}/opencl/source/os_interface/linux/platform_teardown_linux.cpp
${NEO_SOURCE_DIR}/opencl/test/unit_test/linux${BRANCH_DIR_SUFFIX}drm_other_requests.cpp
)

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();