Skip to content

Commit 64aec8d

Browse files
Rename functions
Rename getEngines to getAllEngines Rename engines to allEngines Rename getEngineGroups to getRegularEngineGroups Rename engineGroups to regularEngineGroups Signed-off-by: Filip Hazubski <[email protected]>
1 parent 3fd938a commit 64aec8d

36 files changed

+185
-185
lines changed

level_zero/core/source/device/device_imp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ ze_result_t DeviceImp::canAccessPeer(ze_device_handle_t hPeerDevice, ze_bool_t *
153153

154154
ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc,
155155
ze_command_list_handle_t *commandList) {
156-
auto &engineGroups = getActiveDevice()->getEngineGroups();
156+
auto &engineGroups = getActiveDevice()->getRegularEngineGroups();
157157
if (desc->commandQueueGroupOrdinal >= engineGroups.size()) {
158158
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
159159
}
@@ -167,7 +167,7 @@ ze_result_t DeviceImp::createCommandList(const ze_command_list_desc_t *desc,
167167

168168
ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t *desc,
169169
ze_command_list_handle_t *phCommandList) {
170-
auto &engineGroups = getActiveDevice()->getEngineGroups();
170+
auto &engineGroups = getActiveDevice()->getRegularEngineGroups();
171171
if (desc->ordinal >= engineGroups.size()) {
172172
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
173173
}
@@ -184,7 +184,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
184184
auto &platform = neoDevice->getHardwareInfo().platform;
185185

186186
NEO::CommandStreamReceiver *csr = nullptr;
187-
auto &engineGroups = getActiveDevice()->getEngineGroups();
187+
auto &engineGroups = getActiveDevice()->getRegularEngineGroups();
188188
if (desc->ordinal >= engineGroups.size()) {
189189
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
190190
}
@@ -211,7 +211,7 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
211211
ze_result_t DeviceImp::getCommandQueueGroupProperties(uint32_t *pCount,
212212
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) {
213213
NEO::Device *activeDevice = getActiveDevice();
214-
auto &engineGroups = activeDevice->getEngineGroups();
214+
auto &engineGroups = activeDevice->getRegularEngineGroups();
215215
uint32_t numEngineGroups = static_cast<uint32_t>(engineGroups.size());
216216

217217
if (*pCount == 0) {
@@ -1034,7 +1034,7 @@ void DeviceImp::storeReusableAllocation(NEO::GraphicsAllocation &alloc) {
10341034
}
10351035

10361036
ze_result_t DeviceImp::getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) {
1037-
auto &engineGroups = getActiveDevice()->getEngineGroups();
1037+
auto &engineGroups = getActiveDevice()->getRegularEngineGroups();
10381038
if ((ordinal >= engineGroups.size()) ||
10391039
(index >= engineGroups[ordinal].engines.size())) {
10401040
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
@@ -1045,7 +1045,7 @@ ze_result_t DeviceImp::getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr
10451045

10461046
ze_result_t DeviceImp::getCsrForLowPriority(NEO::CommandStreamReceiver **csr) {
10471047
NEO::Device *activeDevice = getActiveDevice();
1048-
for (auto &it : activeDevice->getEngines()) {
1048+
for (auto &it : activeDevice->getAllEngines()) {
10491049
if (it.osContext->isLowPriority()) {
10501050
*csr = it.commandStreamReceiver;
10511051
return ZE_RESULT_SUCCESS;

level_zero/core/test/aub_tests/fixtures/aub_fixture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace L0 {
2222
AUBFixtureL0::AUBFixtureL0() = default;
2323
AUBFixtureL0::~AUBFixtureL0() = default;
2424
void AUBFixtureL0::prepareCopyEngines(NEO::MockDevice &device, const std::string &filename) {
25-
for (auto i = 0u; i < device.engines.size(); i++) {
26-
if (NEO::EngineHelpers::isBcs(device.engines[i].getEngineType())) {
25+
for (auto i = 0u; i < device.allEngines.size(); i++) {
26+
if (NEO::EngineHelpers::isBcs(device.allEngines[i].getEngineType())) {
2727
NEO::CommandStreamReceiver *pBcsCommandStreamReceiver = nullptr;
2828
pBcsCommandStreamReceiver = NEO::AUBCommandStreamReceiver::create(filename, true, *device.executionEnvironment, device.getRootDeviceIndex(), device.getDeviceBitfield());
2929
device.resetCommandStreamReceiver(pBcsCommandStreamReceiver, i);

level_zero/core/test/unit_tests/gen12lp/test_device_gen12lp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest,
9999
res = deviceImp.getCommandQueueGroupProperties(&count, properties.data());
100100
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
101101

102-
for (auto &engineGroup : neoMockDevice->getEngineGroups()) {
102+
for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) {
103103
EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType);
104104
}
105105
}
@@ -125,7 +125,7 @@ HWTEST2_F(DeviceQueueGroupTest,
125125
res = deviceImp.getCommandQueueGroupProperties(&count, properties.data());
126126
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
127127

128-
auto &engineGroups = neoMockDevice->getEngineGroups();
128+
auto &engineGroups = neoMockDevice->getRegularEngineGroups();
129129
for (uint32_t i = 0; i < count; i++) {
130130
if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
131131
EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
@@ -171,7 +171,7 @@ HWTEST2_F(DeviceQueueGroupTest,
171171
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
172172
EXPECT_EQ(2u, count);
173173

174-
auto &engineGroups = neoMockDevice->getEngineGroups();
174+
auto &engineGroups = neoMockDevice->getRegularEngineGroups();
175175
for (uint32_t i = 0; i < count; i++) {
176176
if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
177177
EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
@@ -214,7 +214,7 @@ HWTEST2_F(DeviceQueueGroupTest,
214214
res = deviceImp.getCommandQueueGroupProperties(&count, properties.data());
215215
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
216216

217-
auto &engineGroups = neoMockDevice->getEngineGroups();
217+
auto &engineGroups = neoMockDevice->getRegularEngineGroups();
218218
for (uint32_t i = 0; i < count; i++) {
219219
if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
220220
EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
@@ -257,7 +257,7 @@ HWTEST2_F(DeviceQueueGroupTest,
257257
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
258258
L0::Context *context = Context::fromHandle(hContext);
259259

260-
auto &engineGroups = neoMockDevice->getEngineGroups();
260+
auto &engineGroups = neoMockDevice->getRegularEngineGroups();
261261
for (uint32_t i = 0; i < count; i++) {
262262
if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
263263
EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);

level_zero/core/test/unit_tests/gen9/test_cmdqueue_gen9.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ HWTEST2_F(CommandQueueGroupMultiDevice,
214214
L0::DeviceImp *deviceImp = reinterpret_cast<L0::DeviceImp *>(device);
215215
auto &nearestSubDevice = *deviceImp->neoDevice->getNearestGenericSubDevice(0);
216216
const auto rcsIndex = nearestSubDevice.getEngineGroupIndexFromEngineGroupType(NEO::EngineGroupType::RenderCompute);
217-
auto expectedCSR = nearestSubDevice.getEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver;
217+
auto expectedCSR = nearestSubDevice.getRegularEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver;
218218
EXPECT_EQ(cmdQueue->getCsr(), expectedCSR);
219219
}
220220

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ TEST_F(CommandListCreate, whenInvokingAppendMemoryCopyFromContextForImmediateCom
12241224
}
12251225

12261226
TEST_F(CommandListCreate, givenQueueDescriptionwhenCreatingImmediateCommandListForEveryEnigneThenItHasImmediateCommandQueueCreated) {
1227-
auto &engineGroups = neoDevice->getEngineGroups();
1227+
auto &engineGroups = neoDevice->getRegularEngineGroups();
12281228
for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) {
12291229
for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) {
12301230
ze_command_queue_desc_t desc = {};

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ TEST_F(CommandListCreate, whenCreatingImmCmdListWithASyncModeAndAppendEventReset
12171217
}
12181218

12191219
TEST_F(CommandListCreateWithBcs, givenQueueDescriptionwhenCreatingImmediateCommandListForCopyEnigneThenItHasImmediateCommandQueueCreated) {
1220-
auto &engineGroups = neoDevice->getEngineGroups();
1220+
auto &engineGroups = neoDevice->getRegularEngineGroups();
12211221
for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) {
12221222
for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) {
12231223
ze_command_queue_desc_t desc = {};

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_5.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ HWTEST_F(CommandListCreate, WhenReservingSpaceThenCommandsAddedToBatchBuffer) {
914914
}
915915

916916
TEST_F(CommandListCreate, givenOrdinalBiggerThanAvailableEnginesWhenCreatingCommandListThenInvalidArgumentErrorIsReturned) {
917-
auto numAvailableEngineGroups = static_cast<uint32_t>(neoDevice->getEngineGroups().size());
917+
auto numAvailableEngineGroups = static_cast<uint32_t>(neoDevice->getRegularEngineGroups().size());
918918
ze_command_list_handle_t commandList = nullptr;
919919
ze_command_list_desc_t desc = {ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC};
920920
desc.commandQueueGroupOrdinal = numAvailableEngineGroups;
@@ -940,12 +940,12 @@ TEST_F(CommandListCreate, givenRootDeviceAndImplicitScalingDisabledWhenCreatingC
940940
NEO::UltDeviceFactory deviceFactory{1, 2};
941941
auto &rootDevice = *deviceFactory.rootDevices[0];
942942
auto &subDevice0 = *deviceFactory.subDevices[0];
943-
rootDevice.engineGroups.resize(1);
944-
subDevice0.getEngineGroups().push_back(NEO::Device::EngineGroupT{});
945-
subDevice0.getEngineGroups().back().engineGroupType = EngineGroupType::Compute;
946-
subDevice0.getEngineGroups().back().engines.resize(1);
947-
subDevice0.getEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
948-
auto ordinal = static_cast<uint32_t>(subDevice0.getEngineGroups().size() - 1);
943+
rootDevice.regularEngineGroups.resize(1);
944+
subDevice0.getRegularEngineGroups().push_back(NEO::Device::EngineGroupT{});
945+
subDevice0.getRegularEngineGroups().back().engineGroupType = EngineGroupType::Compute;
946+
subDevice0.getRegularEngineGroups().back().engines.resize(1);
947+
subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
948+
auto ordinal = static_cast<uint32_t>(subDevice0.getRegularEngineGroups().size() - 1);
949949
Mock<L0::DeviceImp> l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment());
950950

951951
ze_command_list_handle_t commandList = nullptr;

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_1.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,9 @@ TEST_F(DeviceCreateCommandQueueTest,
897897

898898
TEST_F(DeviceCreateCommandQueueTest, givenLowPriorityDescAndWithoutLowPriorityCsrWhenCreateCommandQueueIsCalledThenAbortIsThrown) {
899899
// remove low priority EngineControl objects for negative testing
900-
neoDevice->engines.erase(std::remove_if(
901-
neoDevice->engines.begin(),
902-
neoDevice->engines.end(),
900+
neoDevice->allEngines.erase(std::remove_if(
901+
neoDevice->allEngines.begin(),
902+
neoDevice->allEngines.end(),
903903
[](EngineControl &p) { return p.osContext->isLowPriority(); }));
904904

905905
ze_command_queue_desc_t desc{};

level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_2.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ TEST_F(ContextCreateCommandQueueTest, givenCallToContextCreateCommandQueueThenCa
3838

3939
HWTEST_F(ContextCreateCommandQueueTest, givenEveryPossibleGroupIndexWhenCreatingCommandQueueThenCommandQueueIsCreated) {
4040
ze_command_queue_handle_t commandQueue = {};
41-
auto &engineGroups = neoDevice->getEngineGroups();
41+
auto &engineGroups = neoDevice->getRegularEngineGroups();
4242
for (uint32_t ordinal = 0; ordinal < engineGroups.size(); ordinal++) {
4343
for (uint32_t index = 0; index < engineGroups[ordinal].engines.size(); index++) {
4444
ze_command_queue_desc_t desc = {};
@@ -55,7 +55,7 @@ HWTEST_F(ContextCreateCommandQueueTest, givenEveryPossibleGroupIndexWhenCreating
5555

5656
HWTEST_F(ContextCreateCommandQueueTest, givenOrdinalBiggerThanAvailableEnginesWhenCreatingCommandQueueThenInvalidArgumentErrorIsReturned) {
5757
ze_command_queue_handle_t commandQueue = {};
58-
auto &engineGroups = neoDevice->getEngineGroups();
58+
auto &engineGroups = neoDevice->getRegularEngineGroups();
5959
ze_command_queue_desc_t desc = {};
6060
desc.ordinal = static_cast<uint32_t>(engineGroups.size());
6161
desc.index = 0;
@@ -74,12 +74,12 @@ HWTEST_F(ContextCreateCommandQueueTest, givenRootDeviceAndImplicitScalingDisable
7474
NEO::UltDeviceFactory deviceFactory{1, 2};
7575
auto &rootDevice = *deviceFactory.rootDevices[0];
7676
auto &subDevice0 = *deviceFactory.subDevices[0];
77-
rootDevice.engineGroups.resize(1);
78-
subDevice0.getEngineGroups().push_back(NEO::Device::EngineGroupT{});
79-
subDevice0.getEngineGroups().back().engineGroupType = EngineGroupType::Compute;
80-
subDevice0.getEngineGroups().back().engines.resize(1);
81-
subDevice0.getEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
82-
auto ordinal = static_cast<uint32_t>(subDevice0.getEngineGroups().size() - 1);
77+
rootDevice.regularEngineGroups.resize(1);
78+
subDevice0.getRegularEngineGroups().push_back(NEO::Device::EngineGroupT{});
79+
subDevice0.getRegularEngineGroups().back().engineGroupType = EngineGroupType::Compute;
80+
subDevice0.getRegularEngineGroups().back().engines.resize(1);
81+
subDevice0.getRegularEngineGroups().back().engines[0].commandStreamReceiver = &rootDevice.getGpgpuCommandStreamReceiver();
82+
auto ordinal = static_cast<uint32_t>(subDevice0.getRegularEngineGroups().size() - 1);
8383
Mock<L0::DeviceImp> l0RootDevice(&rootDevice, rootDevice.getExecutionEnvironment());
8484

8585
ze_command_queue_handle_t commandQueue = nullptr;

level_zero/core/test/unit_tests/xe_hp_core/test_device_xe_hp_core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ HWTEST2_F(DeviceQueueGroupTest, givenBlitterSupportAndCCSThenThreeQueueGroupsAre
8080
res = deviceImp.getCommandQueueGroupProperties(&count, properties.data());
8181
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
8282

83-
auto &engineGroups = neoMockDevice->getEngineGroups();
83+
auto &engineGroups = neoMockDevice->getRegularEngineGroups();
8484
for (uint32_t i = 0; i < count; i++) {
8585
if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
8686
EXPECT_TRUE(properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
@@ -138,7 +138,7 @@ HWTEST2_F(DeviceCopyQueueGroupTest,
138138
res = deviceImp.getCommandQueueGroupProperties(&count, properties.data());
139139
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
140140

141-
for (auto &engineGroup : neoMockDevice->getEngineGroups()) {
141+
for (auto &engineGroup : neoMockDevice->getRegularEngineGroups()) {
142142
EXPECT_NE(NEO::EngineGroupType::Copy, engineGroup.engineGroupType);
143143
}
144144
}

0 commit comments

Comments
 (0)