mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
bdf5a1c39c
commit
e8cc34d7b0
@ -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();
|
||||
|
Reference in New Issue
Block a user