From 64aec8dc4edc0c97f027995b6c5d2b3662497b34 Mon Sep 17 00:00:00 2001 From: Filip Hazubski Date: Mon, 13 Dec 2021 12:45:24 +0000 Subject: [PATCH] Rename functions Rename getEngines to getAllEngines Rename engines to allEngines Rename getEngineGroups to getRegularEngineGroups Rename engineGroups to regularEngineGroups Signed-off-by: Filip Hazubski --- level_zero/core/source/device/device_imp.cpp | 12 ++--- .../test/aub_tests/fixtures/aub_fixture.cpp | 4 +- .../gen12lp/test_device_gen12lp.cpp | 10 ++-- .../unit_tests/gen9/test_cmdqueue_gen9.cpp | 2 +- .../sources/cmdlist/test_cmdlist_1.cpp | 2 +- .../sources/cmdlist/test_cmdlist_3.cpp | 2 +- .../sources/cmdlist/test_cmdlist_5.cpp | 14 +++--- .../sources/cmdqueue/test_cmdqueue_1.cpp | 6 +-- .../sources/cmdqueue/test_cmdqueue_2.cpp | 16 +++---- .../xe_hp_core/test_device_xe_hp_core.cpp | 4 +- .../xe_hpc_core/test_device_xe_hpc_core.cpp | 2 +- .../xe_hpg_core/test_device_xe_hpg_core.cpp | 4 +- opencl/source/cl_device/cl_device_caps.cpp | 2 +- opencl/source/command_queue/command_queue.cpp | 2 +- .../aub_tests/fixtures/aub_fixture.h | 4 +- .../command_queue/command_queue_tests.cpp | 12 ++--- .../test/unit_test/context/context_tests.cpp | 2 +- opencl/test/unit_test/device/device_tests.cpp | 34 +++++++------- .../unit_test/device/sub_device_tests.cpp | 38 +++++++-------- .../unit_test/gen11/hw_helper_tests_gen11.cpp | 4 +- .../gen12lp/hw_helper_tests_gen12lp.inl | 14 +++--- .../unit_test/gen8/hw_helper_tests_gen8.cpp | 2 +- .../unit_test/gen9/hw_helper_tests_gen9.cpp | 2 +- .../hw_helper_tests_xehp_and_later.cpp | 8 ++-- .../test/unit_test/mocks/mock_cl_device.cpp | 2 +- opencl/test/unit_test/mocks/mock_cl_device.h | 2 +- .../linux/drm_memory_manager_tests.cpp | 46 +++++++++---------- .../xe_hp_core/xehp/hw_helper_tests_xehp.inl | 4 +- .../xe_hp_core/xehp/test_sub_devices_xehp.inl | 8 ++-- .../hw_helper_tests_xe_hpc_core.cpp | 22 ++++----- shared/source/device/device.cpp | 42 ++++++++--------- shared/source/device/device.h | 12 ++--- shared/source/device/root_device.cpp | 2 +- .../drm_memory_operations_handler_bind.cpp | 6 +-- shared/test/common/mocks/mock_device.cpp | 10 ++-- shared/test/common/mocks/mock_device.h | 12 ++--- 36 files changed, 185 insertions(+), 185 deletions(-) diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index a46c3d8a78..fbd77893e9 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -153,7 +153,7 @@ ze_result_t DeviceImp::canAccessPeer(ze_device_handle_t hPeerDevice, ze_bool_t * ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc, ze_command_list_handle_t *commandList) { - auto &engineGroups = getActiveDevice()->getEngineGroups(); + auto &engineGroups = getActiveDevice()->getRegularEngineGroups(); if (desc->commandQueueGroupOrdinal >= engineGroups.size()) { return ZE_RESULT_ERROR_INVALID_ARGUMENT; } @@ -167,7 +167,7 @@ ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc, ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t *desc, ze_command_list_handle_t *phCommandList) { - auto &engineGroups = getActiveDevice()->getEngineGroups(); + auto &engineGroups = getActiveDevice()->getRegularEngineGroups(); if (desc->ordinal >= engineGroups.size()) { return ZE_RESULT_ERROR_INVALID_ARGUMENT; } @@ -184,7 +184,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc, auto &platform = neoDevice->getHardwareInfo().platform; NEO::CommandStreamReceiver *csr = nullptr; - auto &engineGroups = getActiveDevice()->getEngineGroups(); + auto &engineGroups = getActiveDevice()->getRegularEngineGroups(); if (desc->ordinal >= engineGroups.size()) { return ZE_RESULT_ERROR_INVALID_ARGUMENT; } @@ -211,7 +211,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc, ze_result_t DeviceImp::getCommandQueueGroupProperties(uint32_t *pCount, ze_command_queue_group_properties_t *pCommandQueueGroupProperties) { NEO::Device *activeDevice = getActiveDevice(); - auto &engineGroups = activeDevice->getEngineGroups(); + auto &engineGroups = activeDevice->getRegularEngineGroups(); uint32_t numEngineGroups = static_cast(engineGroups.size()); if (*pCount == 0) { @@ -1034,7 +1034,7 @@ void DeviceImp::storeReusableAllocation(NEO::GraphicsAllocation &alloc) { } ze_result_t DeviceImp::getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) { - auto &engineGroups = getActiveDevice()->getEngineGroups(); + auto &engineGroups = getActiveDevice()->getRegularEngineGroups(); if ((ordinal >= engineGroups.size()) || (index >= engineGroups[ordinal].engines.size())) { return ZE_RESULT_ERROR_INVALID_ARGUMENT; @@ -1045,7 +1045,7 @@ ze_result_t DeviceImp::getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr ze_result_t DeviceImp::getCsrForLowPriority(NEO::CommandStreamReceiver **csr) { NEO::Device *activeDevice = getActiveDevice(); - for (auto &it : activeDevice->getEngines()) { + for (auto &it : activeDevice->getAllEngines()) { if (it.osContext->isLowPriority()) { *csr = it.commandStreamReceiver; return ZE_RESULT_SUCCESS; diff --git a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp index 5d609ed40e..c741e45076 100644 --- a/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp +++ b/level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp @@ -22,8 +22,8 @@ namespace L0 { AUBFixtureL0::AUBFixtureL0() = default; AUBFixtureL0::~AUBFixtureL0() = default; void AUBFixtureL0::prepareCopyEngines(NEO::MockDevice &device, const std::string &filename) { - for (auto i = 0u; i < device.engines.size(); i++) { - if (NEO::EngineHelpers::isBcs(device.engines[i].getEngineType())) { + for (auto i = 0u; i < device.allEngines.size(); i++) { + if (NEO::EngineHelpers::isBcs(device.allEngines[i].getEngineType())) { NEO::CommandStreamReceiver *pBcsCommandStreamReceiver = nullptr; pBcsCommandStreamReceiver = NEO::AUBCommandStreamReceiver::create(filename, true, *device.executionEnvironment, device.getRootDeviceIndex(), device.getDeviceBitfield()); device.resetCommandStreamReceiver(pBcsCommandStreamReceiver, i); diff --git a/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp b/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp index 2f38833ee3..23c8525086 100644 --- a/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp +++ b/level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp @@ -99,7 +99,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - for (auto &engineGroup : neoMockDevice->getEngineGroups()) { + for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) { EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType); } } @@ -125,7 +125,7 @@ HWTEST2_F(DeviceQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); @@ -171,7 +171,7 @@ HWTEST2_F(DeviceQueueGroupTest, EXPECT_EQ(ZE_RESULT_SUCCESS, res); EXPECT_EQ(2u, count); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); @@ -214,7 +214,7 @@ HWTEST2_F(DeviceQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); @@ -257,7 +257,7 @@ HWTEST2_F(DeviceQueueGroupTest, EXPECT_EQ(ZE_RESULT_SUCCESS, res); L0::Context *context = Context::fromHandle(hContext); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); diff --git a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp index 7648433256..1e9e1704ce 100644 --- a/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp +++ b/level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp @@ -214,7 +214,7 @@ HWTEST2_F(CommandQueueGroupMultiDevice, L0::DeviceImp *deviceImp = reinterpret_cast(device); auto &nearestSubDevice = *deviceImp->neoDevice->getNearestGenericSubDevice(0); const auto rcsIndex = nearestSubDevice.getEngineGroupIndexFromEngineGroupType(NEO::EngineGroupType::RenderCompute); - auto expectedCSR = nearestSubDevice.getEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver; + auto expectedCSR = nearestSubDevice.getRegularEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver; EXPECT_EQ(cmdQueue->getCsr(), expectedCSR); } diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index 9b0fe39707..5825958428 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -1224,7 +1224,7 @@ TEST_F(CommandListCreate, whenInvokingAppendMemoryCopyFromContextForImmediateCom } TEST_F(CommandListCreate, givenQueueDescriptionwhenCreatingImmediateCommandListForEveryEnigneThenItHasImmediateCommandQueueCreated) { - auto &engineGroups = neoDevice->getEngineGroups(); + auto &engineGroups = neoDevice->getRegularEngineGroups(); for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) { for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) { ze_command_queue_desc_t desc = {}; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_3.cpp index 5b3e794806..5ad476c0d4 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_3.cpp @@ -1217,7 +1217,7 @@ TEST_F(CommandListCreate, whenCreatingImmCmdListWithASyncModeAndAppendEventReset } TEST_F(CommandListCreateWithBcs, givenQueueDescriptionwhenCreatingImmediateCommandListForCopyEnigneThenItHasImmediateCommandQueueCreated) { - auto &engineGroups = neoDevice->getEngineGroups(); + auto &engineGroups = neoDevice->getRegularEngineGroups(); for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) { for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) { ze_command_queue_desc_t desc = {}; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp index 02a618107f..67cd281dd7 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp @@ -914,7 +914,7 @@ HWTEST_F(CommandListCreate, WhenReservingSpaceThenCommandsAddedToBatchBuffer) { } TEST_F(CommandListCreate, givenOrdinalBiggerThanAvailableEnginesWhenCreatingCommandListThenInvalidArgumentErrorIsReturned) { - auto numAvailableEngineGroups = static_cast(neoDevice->getEngineGroups().size()); + auto numAvailableEngineGroups = static_cast(neoDevice->getRegularEngineGroups().size()); ze_command_list_handle_t commandList = nullptr; ze_command_list_desc_t desc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC}; desc.commandQueueGroupOrdinal = numAvailableEngineGroups; @@ -940,12 +940,12 @@ TEST_F(CommandListCreate, givenRootDeviceAndImplicitScalingDisabledWhenCreatingC NEO::UltDeviceFactory deviceFactory{1, 2}; auto &rootDevice = *deviceFactory.rootDevices[0]; auto &subDevice0 = *deviceFactory.subDevices[0]; - rootDevice.engineGroups.resize(1); - subDevice0.getEngineGroups().push_back(NEO::Device::EngineGroupT{}); - subDevice0.getEngineGroups().back().engineGroupType = EngineGroupType::Compute; - subDevice0.getEngineGroups().back().engines.resize(1); - subDevice0.getEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver(); - auto ordinal = static_cast(subDevice0.getEngineGroups().size() - 1); + rootDevice.regularEngineGroups.resize(1); + subDevice0.getRegularEngineGroups().push_back(NEO::Device::EngineGroupT{}); + subDevice0.getRegularEngineGroups().back().engineGroupType = EngineGroupType::Compute; + subDevice0.getRegularEngineGroups().back().engines.resize(1); + subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver(); + auto ordinal = static_cast(subDevice0.getRegularEngineGroups().size() - 1); Mock l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment()); ze_command_list_handle_t commandList = nullptr; diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp index d581b38deb..de80001a41 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp @@ -897,9 +897,9 @@ TEST_F(DeviceCreateCommandQueueTest, TEST_F(DeviceCreateCommandQueueTest, givenLowPriorityDescAndWithoutLowPriorityCsrWhenCreateCommandQueueIsCalledThenAbortIsThrown) { // remove low priority EngineControl objects for negative testing - neoDevice->engines.erase(std::remove_if( - neoDevice->engines.begin(), - neoDevice->engines.end(), + neoDevice->allEngines.erase(std::remove_if( + neoDevice->allEngines.begin(), + neoDevice->allEngines.end(), [](EngineControl &p) { return p.osContext->isLowPriority(); })); ze_command_queue_desc_t desc{}; diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp index 5a70de80ae..ed73f77824 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp @@ -38,7 +38,7 @@ TEST_F(ContextCreateCommandQueueTest, givenCallToContextCreateCommandQueueThenCa HWTEST_F(ContextCreateCommandQueueTest, givenEveryPossibleGroupIndexWhenCreatingCommandQueueThenCommandQueueIsCreated) { ze_command_queue_handle_t commandQueue = {}; - auto &engineGroups = neoDevice->getEngineGroups(); + auto &engineGroups = neoDevice->getRegularEngineGroups(); for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) { for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) { ze_command_queue_desc_t desc = {}; @@ -55,7 +55,7 @@ HWTEST_F(ContextCreateCommandQueueTest, givenEveryPossibleGroupIndexWhenCreating HWTEST_F(ContextCreateCommandQueueTest, givenOrdinalBiggerThanAvailableEnginesWhenCreatingCommandQueueThenInvalidArgumentErrorIsReturned) { ze_command_queue_handle_t commandQueue = {}; - auto &engineGroups = neoDevice->getEngineGroups(); + auto &engineGroups = neoDevice->getRegularEngineGroups(); ze_command_queue_desc_t desc = {}; desc.ordinal = static_cast(engineGroups.size()); desc.index = 0; @@ -74,12 +74,12 @@ HWTEST_F(ContextCreateCommandQueueTest, givenRootDeviceAndImplicitScalingDisable NEO::UltDeviceFactory deviceFactory{1, 2}; auto &rootDevice = *deviceFactory.rootDevices[0]; auto &subDevice0 = *deviceFactory.subDevices[0]; - rootDevice.engineGroups.resize(1); - subDevice0.getEngineGroups().push_back(NEO::Device::EngineGroupT{}); - subDevice0.getEngineGroups().back().engineGroupType = EngineGroupType::Compute; - subDevice0.getEngineGroups().back().engines.resize(1); - subDevice0.getEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver(); - auto ordinal = static_cast(subDevice0.getEngineGroups().size() - 1); + rootDevice.regularEngineGroups.resize(1); + subDevice0.getRegularEngineGroups().push_back(NEO::Device::EngineGroupT{}); + subDevice0.getRegularEngineGroups().back().engineGroupType = EngineGroupType::Compute; + subDevice0.getRegularEngineGroups().back().engines.resize(1); + subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver(); + auto ordinal = static_cast(subDevice0.getRegularEngineGroups().size() - 1); Mock l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment()); ze_command_queue_handle_t commandQueue = nullptr; diff --git a/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp b/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp index 0ed3f1cb50..92026cfeb4 100644 --- a/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp @@ -80,7 +80,7 @@ HWTEST2_F(DeviceQueueGroupTest, givenBlitterSupportAndCCSThenThreeQueueGroupsAre res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); @@ -138,7 +138,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - for (auto &engineGroup : neoMockDevice->getEngineGroups()) { + for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) { EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType); } } diff --git a/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp b/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp index 412a3221f8..595db6c5d2 100644 --- a/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpc_core/test_device_xe_hpc_core.cpp @@ -133,7 +133,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - for (auto &engineGroup : neoMockDevice->getEngineGroups()) { + for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) { EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType); } } diff --git a/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp b/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp index b8a8c823d7..ce710ad5cd 100644 --- a/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp +++ b/level_zero/core/test/unit_tests/xe_hpg_core/test_device_xe_hpg_core.cpp @@ -60,7 +60,7 @@ HWTEST2_F(DeviceQueueGroupTest, givenBlitterSupportAndCCSThenThreeQueueGroupsAre res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - auto &engineGroups = neoMockDevice->getEngineGroups(); + auto &engineGroups = neoMockDevice->getRegularEngineGroups(); for (uint32_t i = 0; i < count; i++) { if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) { EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE); @@ -118,7 +118,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest, res = deviceImp.getCommandQueueGroupProperties(&count, properties.data()); EXPECT_EQ(ZE_RESULT_SUCCESS, res); - for (auto &engineGroup : neoMockDevice->getEngineGroups()) { + for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) { EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType); } } diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index 50fc3d6b91..48c0c7cbfc 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -379,7 +379,7 @@ void ClDevice::initializeCaps() { } } - for (auto &engineGroup : this->getDevice().getEngineGroups()) { + for (auto &engineGroup : this->getDevice().getRegularEngineGroups()) { cl_queue_family_properties_intel properties = {}; properties.capabilities = getQueueFamilyCapabilities(engineGroup.engineGroupType); properties.count = static_cast(engineGroup.engines.size()); diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 9474a719b1..be9f5564d4 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -902,7 +902,7 @@ void CommandQueue::processProperties(const cl_queue_properties *properties) { if (specificEngineSelected) { this->queueFamilySelected = true; if (!getDevice().hasRootCsr()) { - const auto &engine = getDevice().getEngineGroups()[selectedQueueFamilyIndex].engines[selectedQueueIndex]; + const auto &engine = getDevice().getRegularEngineGroups()[selectedQueueFamilyIndex].engines[selectedQueueIndex]; auto engineType = engine.getEngineType(); auto engineUsage = engine.getEngineUsage(); if ((DebugManager.flags.EngineUsageHint.get() != -1) && diff --git a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h index 8f59d0c711..5986071b7d 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h +++ b/opencl/test/unit_test/aub_tests/fixtures/aub_fixture.h @@ -42,8 +42,8 @@ class AUBFixture : public CommandQueueHwFixture { return pCommandStreamReceiver; } static void prepareCopyEngines(MockDevice &device, const std::string &filename) { - for (auto i = 0u; i < device.engines.size(); i++) { - if (EngineHelpers::isBcs(device.engines[i].getEngineType())) { + for (auto i = 0u; i < device.allEngines.size(); i++) { + if (EngineHelpers::isBcs(device.allEngines[i].getEngineType())) { CommandStreamReceiver *pBcsCommandStreamReceiver = nullptr; if (testMode == TestMode::AubTestsWithTbx) { pBcsCommandStreamReceiver = TbxCommandStreamReceiver::create(filename, true, *device.executionEnvironment, device.getRootDeviceIndex(), device.getDeviceBitfield()); diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index 146b46ee0c..cd0283f9a9 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -2350,18 +2350,18 @@ struct CopyOnlyQueueTests : ::testing::Test { typeUsageRcs.first = EngineHelpers::remapEngineTypeToHwSpecific(typeUsageRcs.first, *defaultHwInfo); auto device = MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get()); - auto copyEngineGroup = std::find_if(device->engineGroups.begin(), device->engineGroups.end(), [](const auto &engineGroup) { + auto copyEngineGroup = std::find_if(device->regularEngineGroups.begin(), device->regularEngineGroups.end(), [](const auto &engineGroup) { return engineGroup.engineGroupType == EngineGroupType::Copy; }); - if (copyEngineGroup == device->engineGroups.end()) { + if (copyEngineGroup == device->regularEngineGroups.end()) { GTEST_SKIP(); } - device->engineGroups.clear(); - device->engines.clear(); + device->regularEngineGroups.clear(); + device->allEngines.clear(); device->createEngine(0, typeUsageRcs); device->createEngine(1, typeUsageBcs); - bcsEngine = &device->getEngines().back(); + bcsEngine = &device->getAllEngines().back(); clDevice = std::make_unique(device); @@ -2433,7 +2433,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, MultiEngineQueueHwTests, givenQueueFamilyPropertyWh context.contextType = ContextType::CONTEXT_TYPE_UNRESTRICTIVE; bool ccsFound = false; - for (auto &engine : device->engines) { + for (auto &engine : device->allEngines) { if (engine.osContext->getEngineType() == aub_stream::EngineType::ENGINE_CCS) { ccsFound = true; break; diff --git a/opencl/test/unit_test/context/context_tests.cpp b/opencl/test/unit_test/context/context_tests.cpp index 56d74cafbc..b74f5b872f 100644 --- a/opencl/test/unit_test/context/context_tests.cpp +++ b/opencl/test/unit_test/context/context_tests.cpp @@ -370,7 +370,7 @@ class ContextWithAsyncDeleterTest : public ::testing::WithParamInterface, device = new MockClDevice{MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())}; deleter = new MockDeferredDeleter(); - device->engines.clear(); + device->allEngines.clear(); device->injectMemoryManager(memoryManager); device->createEngines(); memoryManager->setDeferredDeleter(deleter); diff --git a/opencl/test/unit_test/device/device_tests.cpp b/opencl/test/unit_test/device/device_tests.cpp index 67379b38a1..6c01d93602 100644 --- a/opencl/test/unit_test/device/device_tests.cpp +++ b/opencl/test/unit_test/device/device_tests.cpp @@ -76,7 +76,7 @@ TEST_F(DeviceTest, WhenDeviceIsCheckedForOcl21ConformanceThenCorrectValueIsRetur } TEST_F(DeviceTest, givenDeviceWhenEngineIsCreatedThenSetInitialValueForTag) { - for (auto &engine : pDevice->engines) { + for (auto &engine : pDevice->allEngines) { auto tagAddress = engine.commandStreamReceiver->getTagAddress(); ASSERT_NE(nullptr, const_cast(tagAddress)); EXPECT_EQ(initialHardwareTag, *tagAddress); @@ -190,7 +190,7 @@ HWTEST_F(DeviceTest, WhenDeviceIsCreatedThenActualEngineTypeIsSameAsDefault) { EXPECT_EQ(defaultEngineType, actualEngineType); int defaultCounter = 0; - const auto &engines = device->getEngines(); + const auto &engines = device->getAllEngines(); for (const auto &engine : engines) { if (engine.osContext->isDefaultContext()) { defaultCounter++; @@ -212,7 +212,7 @@ HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulati CommandStreamReceiverType::CSR_HW}; for (uint32_t i = 0u; i < 3u; ++i) { - auto engineType = pDevice->engines[i].commandStreamReceiver->getType(); + auto engineType = pDevice->allEngines[i].commandStreamReceiver->getType(); EXPECT_EQ(exptectedEngineTypes[i], engineType); } } @@ -323,7 +323,7 @@ TEST(DeviceCreation, givenDeviceWhenItIsCreatedThenOsContextIsRegistredInMemoryM auto numEnginesForDevice = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo).size(); if (device->getNumGenericSubDevices() > 1) { numEnginesForDevice *= device->getNumGenericSubDevices(); - numEnginesForDevice += device->engines.size(); + numEnginesForDevice += device->allEngines.size(); if (device->getSubDevice(0)->getNumSubDevices() > 0) { numEnginesForDevice += device->getNumSubDevices(); @@ -427,7 +427,7 @@ TEST(DeviceCreation, givenMultiRootDeviceWhenTheyAreCreatedThenEachDeviceHasSepe EXPECT_EQ(numGpgpuEngines, device2->commandStreamReceivers.size()); for (uint32_t i = 0; i < static_cast(numGpgpuEngines); i++) { - EXPECT_NE(device2->engines[i].commandStreamReceiver, device1->engines[i].commandStreamReceiver); + EXPECT_NE(device2->allEngines[i].commandStreamReceiver, device1->allEngines[i].commandStreamReceiver); } } @@ -526,7 +526,7 @@ TEST(DeviceCreation, givenDeviceWhenCheckingParentDeviceThenCorrectValueIsReturn TEST(DeviceCreation, givenRootDeviceWithSubDevicesWhenCheckingEngineGroupsThenItHasOneNonEmptyGroup) { UltDeviceFactory deviceFactory{1, 2}; - EXPECT_EQ(1u, deviceFactory.rootDevices[0]->getEngineGroups().size()); + EXPECT_EQ(1u, deviceFactory.rootDevices[0]->getRegularEngineGroups().size()); } TEST(DeviceCreation, whenCheckingEngineGroupsThenGroupsAreUnique) { @@ -544,10 +544,10 @@ TEST(DeviceCreation, whenCheckingEngineGroupsThenGroupsAreUnique) { UltDeviceFactory deviceFactory{1, 0}; std::set uniqueEngineGroupTypes; - for (auto &engineGroup : deviceFactory.rootDevices[0]->getEngineGroups()) { + for (auto &engineGroup : deviceFactory.rootDevices[0]->getRegularEngineGroups()) { uniqueEngineGroupTypes.insert(engineGroup.engineGroupType); } - EXPECT_EQ(uniqueEngineGroupTypes.size(), deviceFactory.rootDevices[0]->getEngineGroups().size()); + EXPECT_EQ(uniqueEngineGroupTypes.size(), deviceFactory.rootDevices[0]->getRegularEngineGroups().size()); } } } @@ -633,10 +633,10 @@ HWTEST_F(DeviceHwTest, givenBothCcsAndRcsEnginesInDeviceWhenGettingEngineGroupsT EngineControl ccsEngine{nullptr, &ccsContext}; MockDevice device{}; - ASSERT_EQ(0u, device.getEngineGroups().size()); + ASSERT_EQ(0u, device.getRegularEngineGroups().size()); device.addEngineToEngineGroup(ccsEngine); device.addEngineToEngineGroup(rcsEngine); - auto &engineGroups = device.getEngineGroups(); + auto &engineGroups = device.getRegularEngineGroups(); EXPECT_EQ(1u, engineGroups[0].engines.size()); EXPECT_EQ(EngineGroupType::Compute, engineGroups[0].engineGroupType); EXPECT_EQ(aub_stream::EngineType::ENGINE_CCS, engineGroups[0].engines[0].getEngineType()); @@ -644,10 +644,10 @@ HWTEST_F(DeviceHwTest, givenBothCcsAndRcsEnginesInDeviceWhenGettingEngineGroupsT EXPECT_EQ(EngineGroupType::RenderCompute, engineGroups[1].engineGroupType); EXPECT_EQ(aub_stream::EngineType::ENGINE_RCS, engineGroups[1].engines[0].getEngineType()); - device.getEngineGroups().clear(); + device.getRegularEngineGroups().clear(); device.addEngineToEngineGroup(rcsEngine); device.addEngineToEngineGroup(ccsEngine); - engineGroups = device.getEngineGroups(); + engineGroups = device.getRegularEngineGroups(); EXPECT_EQ(1u, engineGroups[0].engines.size()); EXPECT_EQ(EngineGroupType::RenderCompute, engineGroups[0].engineGroupType); EXPECT_EQ(aub_stream::EngineType::ENGINE_RCS, engineGroups[0].engines[0].getEngineType()); @@ -683,7 +683,7 @@ TEST(DeviceGetEngineTest, givenVariousIndicesWhenGettingEngineGroupIndexFromEngi const auto nonEmptyEngineGroup = std::vector{EngineControl{nullptr, nullptr}}; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - auto &engineGroups = device->getEngineGroups(); + auto &engineGroups = device->getRegularEngineGroups(); engineGroups.resize(3); engineGroups[0].engineGroupType = static_cast(4); engineGroups[1].engineGroupType = static_cast(3); @@ -702,8 +702,8 @@ TEST(DeviceGetEngineTest, givenDeferredContextInitializationEnabledWhenCreatingE auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); const auto defaultEngineType = getChosenEngineType(device->getHardwareInfo()); - EXPECT_NE(0u, device->getEngines().size()); - for (const EngineControl &engine : device->getEngines()) { + EXPECT_NE(0u, device->getAllEngines().size()); + for (const EngineControl &engine : device->getAllEngines()) { OsContext *osContext = engine.osContext; const bool isDefaultEngine = defaultEngineType == osContext->getEngineType() && osContext->isRegular(); const bool shouldBeInitialized = osContext->isImmediateContextInitializationEnabled(isDefaultEngine); @@ -716,8 +716,8 @@ TEST(DeviceGetEngineTest, givenDeferredContextInitializationDisabledWhenCreating DebugManager.flags.DeferOsContextInitialization.set(0); auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - EXPECT_NE(0u, device->getEngines().size()); - for (const EngineControl &engine : device->getEngines()) { + EXPECT_NE(0u, device->getAllEngines().size()); + for (const EngineControl &engine : device->getAllEngines()) { EXPECT_TRUE(engine.osContext->isInitialized()); } } diff --git a/opencl/test/unit_test/device/sub_device_tests.cpp b/opencl/test/unit_test/device/sub_device_tests.cpp index 0a447184b9..368fa78b10 100644 --- a/opencl/test/unit_test/device/sub_device_tests.cpp +++ b/opencl/test/unit_test/device/sub_device_tests.cpp @@ -240,9 +240,9 @@ TEST(RootDevicesTest, givenRootDeviceWithoutSubdevicesWhenCreateEnginesThenDevic auto executionEnvironment = new MockExecutionEnvironment; executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo); MockDevice device(executionEnvironment, 0); - EXPECT_EQ(0u, device.engines.size()); + EXPECT_EQ(0u, device.allEngines.size()); device.createEngines(); - EXPECT_EQ(gpgpuEngines.size(), device.engines.size()); + EXPECT_EQ(gpgpuEngines.size(), device.allEngines.size()); } TEST(RootDevicesTest, givenRootDeviceWithSubdevicesWhenCreateEnginesThenDeviceCreatesSpecialEngine) { @@ -252,11 +252,11 @@ TEST(RootDevicesTest, givenRootDeviceWithSubdevicesWhenCreateEnginesThenDeviceCr auto executionEnvironment = new MockExecutionEnvironment; MockDevice device(executionEnvironment, 0); - EXPECT_EQ(0u, device.engines.size()); + EXPECT_EQ(0u, device.allEngines.size()); device.createSubDevices(); device.createEngines(); EXPECT_EQ(2u, device.getNumGenericSubDevices()); - EXPECT_EQ(1u, device.engines.size()); + EXPECT_EQ(1u, device.allEngines.size()); } TEST(SubDevicesTest, givenRootDeviceWithSubDevicesAndLocalMemoryWhenGettingGlobalMemorySizeThenSubDevicesReturnReducedAmountOfGlobalMemAllocSize) { @@ -346,19 +346,19 @@ struct EngineInstancedDeviceTests : public ::testing::Test { } bool hasRootCsrOnly(MockDevice *device) { - return ((device->engines.size() == 1) && - device->engines[0].osContext->isRootDevice()); + return ((device->allEngines.size() == 1) && + device->allEngines[0].osContext->isRootDevice()); } bool isEngineInstanced(MockSubDevice *subDevice, aub_stream::EngineType engineType, uint32_t subDeviceIndex, DeviceBitfield deviceBitfield) { - bool isEngineInstanced = !subDevice->engines[0].osContext->isRootDevice(); + bool isEngineInstanced = !subDevice->allEngines[0].osContext->isRootDevice(); isEngineInstanced &= subDevice->engineInstanced; isEngineInstanced &= (subDevice->getNumGenericSubDevices() == 0); isEngineInstanced &= (subDevice->getNumSubDevices() == 0); isEngineInstanced &= (engineType == subDevice->engineInstancedType); isEngineInstanced &= (subDeviceIndex == subDevice->getSubDeviceIndex()); isEngineInstanced &= (deviceBitfield == subDevice->getDeviceBitfield()); - isEngineInstanced &= (subDevice->getEngines().size() == 1); + isEngineInstanced &= (subDevice->getAllEngines().size() == 1); return isEngineInstanced; } @@ -369,7 +369,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test { auto gpgpuEngines = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo); for (size_t i = 0; i < gpgpuEngines.size(); i++) { - if (device->engines[i].getEngineType() != gpgpuEngines[i].first) { + if (device->allEngines[i].getEngineType() != gpgpuEngines[i].first) { return false; } } @@ -393,7 +393,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test { template bool hasEngineInstancedEngines(MockDeviceT *device, aub_stream::EngineType engineType) { - if (device->getEngines().size() != 1) { + if (device->getAllEngines().size() != 1) { return false; } @@ -402,7 +402,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test { EXPECT_EQ(EngineUsage::Regular, defaultOsContext->getEngineUsage()); EXPECT_TRUE(defaultOsContext->isDefaultContext()); - auto &engine = device->getEngines()[0]; + auto &engine = device->getAllEngines()[0]; EXPECT_EQ(engine.getEngineType(), engineType); EXPECT_TRUE(engine.osContext->isRegular()); @@ -505,7 +505,7 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe auto subDevice = static_cast(rootDevice->getSubDevice(i)); ASSERT_NE(nullptr, subDevice); - EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(subDevice->allEngines[0].osContext->isRootDevice()); EXPECT_FALSE(subDevice->engineInstanced); EXPECT_EQ(0u, subDevice->getNumGenericSubDevices()); EXPECT_EQ(0u, subDevice->getNumSubDevices()); @@ -529,7 +529,7 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe auto subDevice = static_cast(rootDevice->getSubDevice(i)); ASSERT_NE(nullptr, subDevice); - EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(subDevice->allEngines[0].osContext->isRootDevice()); EXPECT_FALSE(subDevice->engineInstanced); EXPECT_EQ(0u, subDevice->getNumGenericSubDevices()); EXPECT_EQ(0u, subDevice->getNumSubDevices()); @@ -555,7 +555,7 @@ TEST_F(EngineInstancedDeviceTests, givenDebugFlagSetWhenCreatingRootDeviceWithGe auto subDevice = static_cast(rootDevice->getSubDevice(i)); ASSERT_NE(nullptr, subDevice); - EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(subDevice->allEngines[0].osContext->isRootDevice()); EXPECT_FALSE(subDevice->engineInstanced); EXPECT_EQ(0u, subDevice->getNumGenericSubDevices()); EXPECT_EQ(ccsCount, subDevice->getNumSubDevices()); @@ -697,7 +697,7 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskSetWhenCreatingDevicesThenFi ASSERT_NE(nullptr, subDevice); - EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(subDevice->allEngines[0].osContext->isRootDevice()); EXPECT_FALSE(subDevice->engineInstanced); EXPECT_EQ(engineInstancedPerGeneric[i], subDevice->getNumSubDevices()); EXPECT_EQ(0u, subDevice->getNumGenericSubDevices()); @@ -740,7 +740,7 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle3rdLevelDeviceWhenC ASSERT_NE(nullptr, subDevice); - EXPECT_FALSE(subDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(subDevice->allEngines[0].osContext->isRootDevice()); if (create2ndLevelAsEngineInstanced[i]) { auto engineType = static_cast(aub_stream::EngineType::ENGINE_CCS + engineInstanced2ndLevelEngineIndex); @@ -792,7 +792,7 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle3rdLevelDeviceOnlyW DeviceBitfield deviceBitfield = (1llu << genericDeviceIndex); - EXPECT_FALSE(rootDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(rootDevice->allEngines[0].osContext->isRootDevice()); EXPECT_TRUE(rootDevice->engineInstanced); EXPECT_TRUE(rootDevice->getNumGenericSubDevices() == 0); EXPECT_TRUE(rootDevice->getNumSubDevices() == 0); @@ -821,7 +821,7 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle2rdLevelDeviceOnlyW DeviceBitfield deviceBitfield = (1llu << genericDeviceIndex); - EXPECT_FALSE(rootDevice->engines[0].osContext->isRootDevice()); + EXPECT_FALSE(rootDevice->allEngines[0].osContext->isRootDevice()); EXPECT_TRUE(rootDevice->engineInstanced); EXPECT_TRUE(rootDevice->getNumGenericSubDevices() == 0); EXPECT_TRUE(rootDevice->getNumSubDevices() == 0); @@ -1006,7 +1006,7 @@ HWTEST_F(EngineInstancedDeviceTests, whenCreateMultipleCommandQueuesThenEnginesA const auto engineGroupType = hwHelper.getEngineGroupType(defaultEngine.getEngineType(), defaultEngine.getEngineUsage(), hwInfo); auto defaultEngineGroupIndex = clRootDevice->getDevice().getEngineGroupIndexFromEngineGroupType(engineGroupType); - auto engines = clRootDevice->getDevice().getEngineGroups()[defaultEngineGroupIndex].engines; + auto engines = clRootDevice->getDevice().getRegularEngineGroups()[defaultEngineGroupIndex].engines; for (size_t i = 0; i < cmdQs.size(); i++) { auto engineIndex = i % engines.size(); diff --git a/opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp b/opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp index a29aa5c396..88e01a1c74 100644 --- a/opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp +++ b/opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp @@ -33,7 +33,7 @@ GEN11TEST_F(HwHelperTestGen11, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet GEN11TEST_F(HwHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) { whenGetGpgpuEnginesThenReturnTwoRcsEngines(pDevice->getHardwareInfo()); - EXPECT_EQ(3u, pDevice->engines.size()); + EXPECT_EQ(3u, pDevice->allEngines.size()); } GEN11TEST_F(HwHelperTestGen11, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) { @@ -59,4 +59,4 @@ GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, WhenProgrammingCacheFlushTh GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, givenGen11WhenCallIsPackedSupportedThenReturnTrue) { auto &helper = HwHelper::get(renderCoreFamily); EXPECT_TRUE(helper.packedFormatsSupported()); -} \ No newline at end of file +} diff --git a/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl index b322385b38..9959aeb26b 100644 --- a/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl @@ -75,7 +75,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetAndBcsInfoSetWhenGetGpgp hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(4u, device->engines.size()); + EXPECT_EQ(4u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(4u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_RCS, engines[0].first); @@ -91,7 +91,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetAndCcsDefualtEngineWhenG hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_RCS, engines[0].first); @@ -106,7 +106,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetWhenGetGpgpuEnginesThenR hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); @@ -122,7 +122,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetWhenGetGpgpuEnginesThenRetu hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(4u, device->engines.size()); + EXPECT_EQ(4u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(4u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_CCS, engines[0].first); @@ -139,7 +139,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetFtrGpGpuMidThreadLevelPreem hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_RCS, engines[0].first); @@ -155,7 +155,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetFtrGpGpuMidThreadLevelPreem hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(4u, device->engines.size()); + EXPECT_EQ(4u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(4u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_CCS, engines[0].first); @@ -171,7 +171,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetAndDefaultRcsWhenGetGpgpuEn hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); EXPECT_EQ(aub_stream::ENGINE_RCS, engines[0].first); diff --git a/opencl/test/unit_test/gen8/hw_helper_tests_gen8.cpp b/opencl/test/unit_test/gen8/hw_helper_tests_gen8.cpp index a4d56bb06a..d573369f76 100644 --- a/opencl/test/unit_test/gen8/hw_helper_tests_gen8.cpp +++ b/opencl/test/unit_test/gen8/hw_helper_tests_gen8.cpp @@ -36,7 +36,7 @@ GEN8TEST_F(HwHelperTestGen8, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) GEN8TEST_F(HwHelperTestGen8, whenGetGpgpuEnginesThenReturnThreeEngines) { whenGetGpgpuEnginesThenReturnTwoRcsEngines(pDevice->getHardwareInfo()); - EXPECT_EQ(3u, pDevice->engines.size()); + EXPECT_EQ(3u, pDevice->allEngines.size()); } GEN8TEST_F(HwHelperTestGen8, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) { diff --git a/opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp b/opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp index e04130b8fe..98f9f6caf7 100644 --- a/opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp +++ b/opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp @@ -45,7 +45,7 @@ GEN9TEST_F(HwHelperTestGen9, givenDebuggingActiveWhenSipKernelTypeIsQueriedThenD GEN9TEST_F(HwHelperTestGen9, whenGetGpgpuEnginesThenReturnThreeRcsEngines) { whenGetGpgpuEnginesThenReturnTwoRcsEngines(pDevice->getHardwareInfo()); - EXPECT_EQ(3u, pDevice->engines.size()); + EXPECT_EQ(3u, pDevice->allEngines.size()); } GEN9TEST_F(HwHelperTestGen9, WhenGettingDeviceIpVersionThenMakeCorrectDeviceIpVersion) { diff --git a/opencl/test/unit_test/helpers/hw_helper_tests_xehp_and_later.cpp b/opencl/test/unit_test/helpers/hw_helper_tests_xehp_and_later.cpp index 9fd6c8ec39..ecb4a205bd 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests_xehp_and_later.cpp @@ -100,7 +100,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenAllFlagsSetWhenGetGp auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(9u, device->engines.size()); + EXPECT_EQ(9u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(9u, engines.size()); @@ -126,7 +126,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenBcsDisabledWhenGetGp auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(7u, device->engines.size()); + EXPECT_EQ(7u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(7u, engines.size()); @@ -149,7 +149,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenCcsDisabledWhenGetGp auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(5u, device->engines.size()); + EXPECT_EQ(5u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(5u, engines.size()); @@ -170,7 +170,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenCcsDisabledAndNumber auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(5u, device->engines.size()); + EXPECT_EQ(5u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(5u, engines.size()); diff --git a/opencl/test/unit_test/mocks/mock_cl_device.cpp b/opencl/test/unit_test/mocks/mock_cl_device.cpp index 7b037c2491..a51136b79c 100644 --- a/opencl/test/unit_test/mocks/mock_cl_device.cpp +++ b/opencl/test/unit_test/mocks/mock_cl_device.cpp @@ -19,7 +19,7 @@ decltype(&createCommandStream) &MockClDevice::createCommandStreamReceiverFunc = MockClDevice::MockClDevice(MockDevice *pMockDevice) : ClDevice(*pMockDevice, platform()), device(*pMockDevice), sharedDeviceInfo(device.deviceInfo), - executionEnvironment(pMockDevice->executionEnvironment), engines(pMockDevice->engines) { + executionEnvironment(pMockDevice->executionEnvironment), allEngines(pMockDevice->allEngines) { } bool MockClDevice::areOcl21FeaturesSupported() const { diff --git a/opencl/test/unit_test/mocks/mock_cl_device.h b/opencl/test/unit_test/mocks/mock_cl_device.h index fda5fa3440..8f7a171a33 100644 --- a/opencl/test/unit_test/mocks/mock_cl_device.h +++ b/opencl/test/unit_test/mocks/mock_cl_device.h @@ -94,7 +94,7 @@ class MockClDevice : public ClDevice { ExecutionEnvironment *&executionEnvironment; static bool &createSingleDevice; static decltype(&createCommandStream) &createCommandStreamReceiverFunc; - std::vector &engines; + std::vector &allEngines; }; class MockDeviceWithDebuggerActive : public MockDevice { diff --git a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index df73fd10c3..cbb7d1375d 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -351,7 +351,7 @@ TEST_F(DrmMemoryManagerTest, WhenAskedAndAllowedAndBigAllocationThenPinAfterAllo mock->ioctl_expected.gemClose = 2; auto memoryManager = std::make_unique(false, true, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -384,7 +384,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmContextIdWhenAllocationIsCreatedThenPinWith mock->ioctl_expected.gemClose = 2; auto memoryManager = std::make_unique(false, true, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -420,7 +420,7 @@ TEST_F(DrmMemoryManagerTest, WhenNotAskedButAllowedThenDoNotPinAfterAllocate) { mock->ioctl_expected.gemWait = 1; auto memoryManager = std::make_unique(false, true, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -439,7 +439,7 @@ TEST_F(DrmMemoryManagerTest, WhenAskedButNotAllowedThenDoNotPinAfterAllocate) { mock->ioctl_expected.gemClose = 1; auto memoryManager = std::make_unique(false, false, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -459,7 +459,7 @@ TEST_F(DrmMemoryManagerTest, WhenAskedAndAllowedAndBigAllocationHostPtrThenPinAf mock->ioctl_expected.gemWait = 1; auto memoryManager = std::make_unique(false, true, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -482,7 +482,7 @@ TEST_F(DrmMemoryManagerTest, givenSmallAllocationHostPtrAllocationWhenForcePinIs mock->ioctl_expected.gemClose = 2; auto memoryManager = std::make_unique(false, true, false, *executionEnvironment); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -870,7 +870,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -908,7 +908,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -954,7 +954,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -990,7 +990,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -1026,7 +1026,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3152,7 +3152,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenMemoryManagerWhenAlloc false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3218,7 +3218,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDisabledForcePinAndEna TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDisabledForcePinAndEnabledValidateHostMemoryWhenPopulateOsHandlesIsCalledThenHostMemoryIsValidated) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3262,7 +3262,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenDisabledForcePinAndEna }; std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3315,7 +3315,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenValidateHostPtrMemoryE mock->ioctl_expected.gemClose = 2; std::unique_ptr memoryManager(new (std::nothrow) TestedDrmMemoryManager(false, true, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3337,7 +3337,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledHostMemoryValid true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3359,7 +3359,7 @@ TEST_F(DrmMemoryManagerTest, givenForcePinAndHostMemoryValidationEnabledWhenSmal mock->ioctl_expected.gemClose = 2; // 1 pinBB, 1 small allocation std::unique_ptr memoryManager(new (std::nothrow) TestedDrmMemoryManager(false, true, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3410,7 +3410,7 @@ TEST_F(DrmMemoryManagerTest, givenForcePinAllowedAndNoPinBBInMemoryManagerWhenAl mock->ioctl_expected.gemClose = 1; mock->ioctl_res = -1; std::unique_ptr memoryManager(new (std::nothrow) TestedDrmMemoryManager(false, true, false, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3520,7 +3520,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenAllocateGraphicsMemoryForN TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenForcePinNotAllowedAndHostMemoryValidationEnabledWhenAllocationIsCreatedThenBufferObjectIsPinnedOnlyOnce) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3547,7 +3547,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenForcePinNotAllowedAndH TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenForcePinNotAllowedAndHostMemoryValidationDisabledWhenAllocationIsCreatedThenBufferObjectIsNotPinned) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, false, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3573,7 +3573,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenForcePinNotAllowedAndH TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledValidateHostMemoryWhenReadOnlyPointerCausesPinningFailWithEfaultThenPopulateOsHandlesMarksFragmentsToFree) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3626,7 +3626,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledValidateHostMem TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledValidateHostMemoryWhenReadOnlyPointerCausesPinningFailWithEfaultThenPopulateOsHandlesDoesNotStoreTheFragments) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } @@ -3677,7 +3677,7 @@ TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledValidateHostMem TEST_F(DrmMemoryManagerWithExplicitExpectationsTest, givenEnabledValidateHostMemoryWhenPopulateOsHandlesSucceedsThenFragmentIsStoredInHostPtrManager) { std::unique_ptr memoryManager(new TestedDrmMemoryManager(false, false, true, *executionEnvironment)); - memoryManager->registeredEngines = EngineControlContainer{this->device->engines}; + memoryManager->registeredEngines = EngineControlContainer{this->device->allEngines}; for (auto engine : memoryManager->registeredEngines) { engine.osContext->incRefInternal(); } diff --git a/opencl/test/unit_test/xe_hp_core/xehp/hw_helper_tests_xehp.inl b/opencl/test/unit_test/xe_hp_core/xehp/hw_helper_tests_xehp.inl index 9052e47f59..a08f2650f0 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/hw_helper_tests_xehp.inl +++ b/opencl/test/unit_test/xe_hp_core/xehp/hw_helper_tests_xehp.inl @@ -58,7 +58,7 @@ XEHPTEST_F(HwHelperTestsXeHP, givenRcsDisabledWhenGetGpgpuEnginesCalledThenDontS auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(8u, device->engines.size()); + EXPECT_EQ(8u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(8u, engines.size()); @@ -86,7 +86,7 @@ XEHPTEST_F(HwHelperTestsXeHP, givenRcsDisabledButDebugVariableSetWhenGetGpgpuEng auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(9u, device->engines.size()); + EXPECT_EQ(9u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(9u, engines.size()); diff --git a/opencl/test/unit_test/xe_hp_core/xehp/test_sub_devices_xehp.inl b/opencl/test/unit_test/xe_hp_core/xehp/test_sub_devices_xehp.inl index 36a3c4d127..8ca3f9eea7 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/test_sub_devices_xehp.inl +++ b/opencl/test/unit_test/xe_hp_core/xehp/test_sub_devices_xehp.inl @@ -25,7 +25,7 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionAWhenCreatingEngineWithSubdevicesThe auto executionEnvironment = new MockExecutionEnvironment; MockDevice device(executionEnvironment, 0); - EXPECT_EQ(0u, device.engines.size()); + EXPECT_EQ(0u, device.allEngines.size()); device.createSubDevices(); device.createEngines(); EXPECT_EQ(2u, device.getNumGenericSubDevices()); @@ -34,7 +34,7 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionAWhenCreatingEngineWithSubdevicesThe const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily); hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, *hwInfo); device.createEngines(); - auto engines = device.getEngines(); + auto engines = device.getAllEngines(); for (auto engine : engines) { EXPECT_EQ(aub_stream::ENGINE_CCS, engine.osContext->getEngineType()); } @@ -46,7 +46,7 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionBWhenCreatingEngineWithSubdevicesThe auto executionEnvironment = new MockExecutionEnvironment; MockDevice device(executionEnvironment, 0); - EXPECT_EQ(0u, device.engines.size()); + EXPECT_EQ(0u, device.allEngines.size()); device.createSubDevices(); device.createEngines(); EXPECT_EQ(2u, device.getNumGenericSubDevices()); @@ -55,7 +55,7 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenRevisionBWhenCreatingEngineWithSubdevicesThe const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily); hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, *hwInfo); device.createEngines(); - auto engines = device.getEngines(); + auto engines = device.getAllEngines(); for (auto engine : engines) { EXPECT_EQ(aub_stream::ENGINE_CCS, engine.osContext->getEngineType()); } diff --git a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp index a030615381..a11f06cdd6 100644 --- a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp @@ -217,7 +217,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, whenGetGpgpuEnginesThenReturnTwoCccsEn auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -266,7 +266,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, whenGetGpgpuEnginesThenReturnTwoCccsEn auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -315,7 +315,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenCccsAsDefaultEngineWhenGetEngines auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -364,7 +364,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenOneCcsEnabledWhenGetEnginesCalled auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -414,7 +414,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenNotAllCopyEnginesWhenSettingEngin auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -455,7 +455,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenOneBcsEnabledWhenGetEnginesCalled auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -495,7 +495,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenBcsDisabledWhenGetEnginesCalledTh auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(numEngines, device->engines.size()); + EXPECT_EQ(numEngines, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(device->getHardwareInfo()); EXPECT_EQ(numEngines, engines.size()); @@ -531,7 +531,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenCcsDisabledAndNumberOfCcsEnabledW auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); @@ -549,7 +549,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenCcsDisabledWhenGetGpgpuEnginesThe auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(3u, device->engines.size()); + EXPECT_EQ(3u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(3u, engines.size()); @@ -884,7 +884,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenCccsDisabledWhenGetGpgpuEnginesCa auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(8u, device->engines.size()); + EXPECT_EQ(8u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(8u, engines.size()); @@ -912,7 +912,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenCccsDisabledButDebugVariableSetWh auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(&hwInfo, 0)); - EXPECT_EQ(9u, device->engines.size()); + EXPECT_EQ(9u, device->allEngines.size()); auto &engines = HwHelperHw::get().getGpgpuEngineInstances(hwInfo); EXPECT_EQ(9u, engines.size()); diff --git a/shared/source/device/device.cpp b/shared/source/device/device.cpp index 85c9ae05f4..30a4eadd06 100644 --- a/shared/source/device/device.cpp +++ b/shared/source/device/device.cpp @@ -54,10 +54,10 @@ Device::~Device() { performanceCounters->shutdown(); } - for (auto &engine : engines) { + for (auto &engine : allEngines) { engine.commandStreamReceiver->flushBatchedSubmissions(); } - engines.clear(); + allEngines.clear(); for (auto subdevice : subdevices) { if (subdevice) { @@ -228,7 +228,7 @@ bool Device::createDeviceImpl() { getDefaultEngine().osContext->setDefaultContext(true); - for (auto &engine : engines) { + for (auto &engine : allEngines) { auto commandStreamReceiver = engine.commandStreamReceiver; commandStreamReceiver->postInitFlagsSetup(); } @@ -256,7 +256,7 @@ bool Device::createDeviceImpl() { executionEnvironment->memoryManager->setForce32BitAllocations(getDeviceInfo().force32BitAddressess); if (DebugManager.flags.EnableExperimentalCommandBuffer.get() > 0) { - for (auto &engine : engines) { + for (auto &engine : allEngines) { auto csr = engine.commandStreamReceiver; csr->setExperimentalCmdBuffer(std::make_unique(csr, getDeviceInfo().profilingTimerResolution)); } @@ -305,11 +305,11 @@ void Device::addEngineToEngineGroup(EngineControl &engine) { return; } - if (this->engineGroups.empty() || this->engineGroups.back().engineGroupType != engineGroupType) { - this->engineGroups.push_back(EngineGroupT{}); - this->engineGroups.back().engineGroupType = engineGroupType; + if (this->regularEngineGroups.empty() || this->regularEngineGroups.back().engineGroupType != engineGroupType) { + this->regularEngineGroups.push_back(EngineGroupT{}); + this->regularEngineGroups.back().engineGroupType = engineGroupType; } - this->engineGroups.back().engines.push_back(engine); + this->regularEngineGroups.back().engines.push_back(engine); } std::unique_ptr Device::createCommandStreamReceiver() const { @@ -365,7 +365,7 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa } EngineControl engine{commandStreamReceiver.get(), osContext}; - engines.push_back(engine); + allEngines.push_back(engine); if (engineUsage == EngineUsage::Regular) { addEngineToEngineGroup(engine); } @@ -393,7 +393,7 @@ bool Device::isSimulation() const { auto &hwInfo = getHardwareInfo(); bool simulation = hwInfo.capabilityTable.isSimulation(hwInfo.platform.usDeviceID); - for (const auto &engine : engines) { + for (const auto &engine : allEngines) { if (engine.commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) { simulation = true; } @@ -430,8 +430,8 @@ bool Device::areSharedSystemAllocationsAllowed() const { } size_t Device::getEngineGroupIndexFromEngineGroupType(EngineGroupType engineGroupType) const { - for (size_t i = 0; i < engineGroups.size(); i++) { - if (engineGroups[i].engineGroupType == engineGroupType) { + for (size_t i = 0; i < regularEngineGroups.size(); i++) { + if (regularEngineGroups[i].engineGroupType == engineGroupType) { return i; } } @@ -440,7 +440,7 @@ size_t Device::getEngineGroupIndexFromEngineGroupType(EngineGroupType engineGrou } EngineControl *Device::tryGetEngine(aub_stream::EngineType engineType, EngineUsage engineUsage) { - for (auto &engine : engines) { + for (auto &engine : allEngines) { if ((engine.getEngineType() == engineType) && (engine.getEngineUsage() == engineUsage)) { return &engine; @@ -448,7 +448,7 @@ EngineControl *Device::tryGetEngine(aub_stream::EngineType engineType, EngineUsa } if (DebugManager.flags.OverrideInvalidEngineWithDefault.get()) { - return &engines[0]; + return &allEngines[0]; } return nullptr; } @@ -460,8 +460,8 @@ EngineControl &Device::getEngine(aub_stream::EngineType engineType, EngineUsage } EngineControl &Device::getEngine(uint32_t index) { - UNRECOVERABLE_IF(index >= engines.size()); - return engines[index]; + UNRECOVERABLE_IF(index >= allEngines.size()); + return allEngines[index]; } bool Device::getDeviceAndHostTimer(uint64_t *deviceTimestamp, uint64_t *hostTimestamp) const { @@ -554,12 +554,12 @@ NEO::SourceLevelDebugger *Device::getSourceLevelDebugger() { return nullptr; } -const std::vector &Device::getEngines() const { - return this->engines; +const std::vector &Device::getAllEngines() const { + return this->allEngines; } EngineControl &Device::getInternalEngine() { - if (this->engines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) { + if (this->allEngines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) { return this->getDefaultEngine(); } @@ -576,7 +576,7 @@ EngineControl &Device::getNextEngineForCommandQueue() { const auto engineGroupType = hwHelper.getEngineGroupType(defaultEngine.getEngineType(), defaultEngine.getEngineUsage(), hardwareInfo); const auto defaultEngineGroupIndex = this->getEngineGroupIndexFromEngineGroupType(engineGroupType); - auto &engineGroup = this->getEngineGroups()[defaultEngineGroupIndex]; + auto &engineGroup = this->getRegularEngineGroups()[defaultEngineGroupIndex]; const auto engineIndex = this->regularCommandQueuesCreatedWithinDeviceCount++ % engineGroup.engines.size(); return engineGroup.engines[engineIndex]; @@ -586,7 +586,7 @@ EngineControl *Device::getInternalCopyEngine() { if (!getHardwareInfo().capabilityTable.blitterOperationsSupported) { return nullptr; } - for (auto &engine : engines) { + for (auto &engine : allEngines) { if (engine.osContext->getEngineType() == aub_stream::ENGINE_BCS && engine.osContext->isInternalEngine()) { return &engine; diff --git a/shared/source/device/device.h b/shared/source/device/device.h index 005d916e8e..e3841258f0 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -62,8 +62,8 @@ class Device : public ReferenceTrackedObject { const DeviceInfo &getDeviceInfo() const; EngineControl *tryGetEngine(aub_stream::EngineType engineType, EngineUsage engineUsage); EngineControl &getEngine(aub_stream::EngineType engineType, EngineUsage engineUsage); - EngineGroupsT &getEngineGroups() { - return this->engineGroups; + EngineGroupsT &getRegularEngineGroups() { + return this->regularEngineGroups; } size_t getEngineGroupIndexFromEngineGroupType(EngineGroupType engineGroupType) const; EngineControl &getEngine(uint32_t index); @@ -86,7 +86,7 @@ class Device : public ReferenceTrackedObject { MOCKABLE_VIRTUAL bool isDebuggerActive() const; Debugger *getDebugger() const { return getRootDeviceEnvironment().debugger.get(); } NEO::SourceLevelDebugger *getSourceLevelDebugger(); - const EnginesT &getEngines() const; + const EnginesT &getAllEngines() const; const std::string getDeviceName(const HardwareInfo &hwInfo) const; ExecutionEnvironment *getExecutionEnvironment() const { return executionEnvironment; } @@ -170,8 +170,8 @@ class Device : public ReferenceTrackedObject { std::unique_ptr performanceCounters; std::vector> commandStreamReceivers; - EnginesT engines; - EngineGroupsT engineGroups; + EnginesT allEngines; + EngineGroupsT regularEngineGroups; std::vector subdevices; PreemptionMode preemptionMode; @@ -199,7 +199,7 @@ class Device : public ReferenceTrackedObject { }; inline EngineControl &Device::getDefaultEngine() { - return engines[defaultEngineIndex]; + return allEngines[defaultEngineIndex]; } inline MemoryManager *Device::getMemoryManager() const { diff --git a/shared/source/device/root_device.cpp b/shared/source/device/root_device.cpp index e4bb881b46..aecad9c8e0 100644 --- a/shared/source/device/root_device.cpp +++ b/shared/source/device/root_device.cpp @@ -74,7 +74,7 @@ void RootDevice::initializeRootCommandStreamReceiver() { commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver)); EngineControl engine{commandStreamReceivers.back().get(), osContext}; - engines.push_back(engine); + allEngines.push_back(engine); addEngineToEngineGroup(engine); } diff --git a/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp b/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp index 709cdf52a3..cef6a6beb4 100644 --- a/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp +++ b/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp @@ -26,7 +26,7 @@ DrmMemoryOperationsHandlerBind::DrmMemoryOperationsHandlerBind(RootDeviceEnviron DrmMemoryOperationsHandlerBind::~DrmMemoryOperationsHandlerBind() = default; MemoryOperationsStatus DrmMemoryOperationsHandlerBind::makeResident(Device *device, ArrayRef gfxAllocations) { - auto &engines = device->getEngines(); + auto &engines = device->getAllEngines(); for (const auto &engine : engines) { engine.osContext->ensureContextInitialized(); this->makeResidentWithinOsContext(engine.osContext, gfxAllocations, false); @@ -51,7 +51,7 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::makeResidentWithinOsConte } MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evict(Device *device, GraphicsAllocation &gfxAllocation) { - auto &engines = device->getEngines(); + auto &engines = device->getAllEngines(); auto retVal = MemoryOperationsStatus::SUCCESS; for (const auto &engine : engines) { retVal = this->evictWithinOsContext(engine.osContext, gfxAllocation); @@ -81,7 +81,7 @@ void DrmMemoryOperationsHandlerBind::evictImpl(OsContext *osContext, GraphicsAll MemoryOperationsStatus DrmMemoryOperationsHandlerBind::isResident(Device *device, GraphicsAllocation &gfxAllocation) { std::lock_guard lock(mutex); bool isResident = true; - auto &engines = device->getEngines(); + auto &engines = device->getAllEngines(); for (const auto &engine : engines) { isResident &= gfxAllocation.isAlwaysResident(engine.osContext->getContextId()); } diff --git a/shared/test/common/mocks/mock_device.cpp b/shared/test/common/mocks/mock_device.cpp index 2ca66ae645..9e7bb669ac 100644 --- a/shared/test/common/mocks/mock_device.cpp +++ b/shared/test/common/mocks/mock_device.cpp @@ -34,8 +34,8 @@ MockDevice::MockDevice() OsContext *osContext = getMemoryManager()->createAndRegisterOsContext(commandStreamReceiver, engineDescriptor); commandStreamReceiver->setupContext(*osContext); - this->engines.resize(1); - this->engines[0] = {commandStreamReceiver, osContext}; + this->allEngines.resize(1); + this->allEngines[0] = {commandStreamReceiver, osContext}; initializeCaps(); } @@ -77,12 +77,12 @@ void MockDevice::resetCommandStreamReceiver(CommandStreamReceiver *newCsr) { void MockDevice::resetCommandStreamReceiver(CommandStreamReceiver *newCsr, uint32_t engineIndex) { - auto osContext = this->engines[engineIndex].osContext; + auto osContext = this->allEngines[engineIndex].osContext; auto memoryManager = executionEnvironment->memoryManager.get(); - auto registeredEngine = *memoryManager->getRegisteredEngineForCsr(engines[engineIndex].commandStreamReceiver); + auto registeredEngine = *memoryManager->getRegisteredEngineForCsr(allEngines[engineIndex].commandStreamReceiver); registeredEngine.commandStreamReceiver = newCsr; - engines[engineIndex].commandStreamReceiver = newCsr; + allEngines[engineIndex].commandStreamReceiver = newCsr; memoryManager->getRegisteredEngines().emplace_back(registeredEngine); osContext->incRefInternal(); newCsr->setupContext(*osContext); diff --git a/shared/test/common/mocks/mock_device.h b/shared/test/common/mocks/mock_device.h index b9fc6d7ce9..59143990dc 100644 --- a/shared/test/common/mocks/mock_device.h +++ b/shared/test/common/mocks/mock_device.h @@ -28,9 +28,9 @@ extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executio const DeviceBitfield deviceBitfield); struct MockSubDevice : public SubDevice { + using Device::allEngines; using Device::createEngines; using Device::engineInstancedType; - using Device::engines; using SubDevice::engineInstanced; using SubDevice::getDeviceBitfield; using SubDevice::getGlobalMemorySize; @@ -48,20 +48,20 @@ struct MockSubDevice : public SubDevice { class MockDevice : public RootDevice { public: using Device::addEngineToEngineGroup; + using Device::allEngines; using Device::commandStreamReceivers; using Device::createDeviceInternals; using Device::createEngine; using Device::createSubDevices; using Device::deviceBitfield; using Device::deviceInfo; - using Device::engineGroups; using Device::engineInstanced; using Device::engineInstancedType; - using Device::engines; using Device::executionEnvironment; using Device::getGlobalMemorySize; using Device::initializeCaps; using Device::isDebuggerActive; + using Device::regularEngineGroups; using Device::rootCsrCreated; using Device::rtMemoryBackedBuffer; using RootDevice::createEngines; @@ -99,14 +99,14 @@ class MockDevice : public RootDevice { template UltCommandStreamReceiver &getUltCommandStreamReceiver() { - return reinterpret_cast &>(*engines[defaultEngineIndex].commandStreamReceiver); + return reinterpret_cast &>(*allEngines[defaultEngineIndex].commandStreamReceiver); } template UltCommandStreamReceiver &getUltCommandStreamReceiverFromIndex(uint32_t index) { - return reinterpret_cast &>(*engines[index].commandStreamReceiver); + return reinterpret_cast &>(*allEngines[index].commandStreamReceiver); } - CommandStreamReceiver &getGpgpuCommandStreamReceiver() const { return *engines[defaultEngineIndex].commandStreamReceiver; } + CommandStreamReceiver &getGpgpuCommandStreamReceiver() const { return *allEngines[defaultEngineIndex].commandStreamReceiver; } void resetCommandStreamReceiver(CommandStreamReceiver *newCsr); void resetCommandStreamReceiver(CommandStreamReceiver *newCsr, uint32_t engineIndex);