Skip to content

Commit 39a930e

Browse files
Revert "Enable copy engine in platforms which supports bcs"
This reverts commit b539b5a. Change-Id: I731b969cb82e4cfa6ec3f435c4b3178fc997c867
1 parent c3b8727 commit 39a930e

File tree

9 files changed

+42
-125
lines changed

9 files changed

+42
-125
lines changed

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

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -43,61 +43,52 @@ HWTEST2_F(DeviceQueueGroupTest, givenCommandQueuePropertiesCallThenCorrectNumber
4343
uint32_t count = 0;
4444
ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr);
4545
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
46-
auto expectedCount = 1u;
47-
if (device->getHwInfo().featureTable.ftrBcsInfo.test(0)) {
48-
expectedCount++;
49-
}
50-
EXPECT_EQ(expectedCount, count);
51-
52-
auto properties = std::make_unique<ze_command_queue_group_properties_t[]>(count);
53-
res = device->getCommandQueueGroupProperties(&count, properties.get());
46+
EXPECT_EQ(1u, count);
47+
48+
ze_command_queue_group_properties_t properties;
49+
res = device->getCommandQueueGroupProperties(&count, &properties);
5450
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
5551

56-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
57-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
58-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
59-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
60-
EXPECT_EQ(properties[0].numQueues, 1u);
61-
EXPECT_EQ(properties[0].maxMemoryFillPatternSize, sizeof(uint32_t));
52+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
53+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
54+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
55+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
56+
EXPECT_EQ(properties.numQueues, 1u);
57+
EXPECT_EQ(properties.maxMemoryFillPatternSize, sizeof(uint32_t));
6258
}
6359

6460
HWTEST2_F(DeviceQueueGroupTest, givenQueueGroupsReturnedThenCommandListIsCreatedCorrectly, IsGen9) {
6561
uint32_t count = 0;
6662
ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr);
6763
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
68-
auto expectedCount = 1u;
69-
if (device->getHwInfo().featureTable.ftrBcsInfo.test(0)) {
70-
expectedCount++;
71-
}
72-
EXPECT_EQ(expectedCount, count);
73-
74-
auto properties = std::make_unique<ze_command_queue_group_properties_t[]>(count);
75-
res = device->getCommandQueueGroupProperties(&count, properties.get());
64+
EXPECT_EQ(1u, count);
65+
66+
ze_command_queue_group_properties_t properties;
67+
res = device->getCommandQueueGroupProperties(&count, &properties);
7668
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
7769

78-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
79-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
80-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
81-
EXPECT_TRUE(properties[0].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
82-
EXPECT_EQ(properties[0].numQueues, 1u);
83-
EXPECT_EQ(properties[0].maxMemoryFillPatternSize, sizeof(uint32_t));
70+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
71+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
72+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
73+
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
74+
EXPECT_EQ(properties.numQueues, 1u);
75+
EXPECT_EQ(properties.maxMemoryFillPatternSize, sizeof(uint32_t));
8476

8577
ze_context_handle_t hContext;
8678
ze_context_desc_t contextDesc;
8779
res = driverHandle->createContext(&contextDesc, &hContext);
8880
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
8981
L0::Context *context = Context::fromHandle(hContext);
90-
for (uint32_t i = 0; i < count; i++) {
91-
ze_command_list_desc_t listDesc = {};
92-
listDesc.commandQueueGroupOrdinal = i;
93-
ze_command_list_handle_t hCommandList = {};
9482

95-
res = context->createCommandList(device, &listDesc, &hCommandList);
96-
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
83+
ze_command_list_desc_t listDesc = {};
84+
listDesc.commandQueueGroupOrdinal = 0;
85+
ze_command_list_handle_t hCommandList = {};
86+
87+
res = context->createCommandList(device, &listDesc, &hCommandList);
88+
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
9789

98-
CommandList *commandList = CommandList::fromHandle(hCommandList);
99-
commandList->destroy();
100-
}
90+
CommandList *commandList = CommandList::fromHandle(hCommandList);
91+
commandList->destroy();
10192

10293
context->destroy();
10394
}

opencl/test/unit_test/gen11/hw_helper_tests_gen11.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ GEN11TEST_F(HwHelperTestGen11, givenGen11PlatformWhenSetupHardwareCapabilitiesIs
4545
}
4646

4747
GEN11TEST_F(HwHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
48-
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
49-
hwInfo.featureTable.ftrBcsInfo.set(0, false);
50-
whenGetGpgpuEnginesThenReturnThreeRcsEngines<FamilyType>(hwInfo);
48+
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
49+
EXPECT_EQ(3u, pDevice->engines.size());
5150
}
5251

5352
using MemorySynchronizatiopCommandsTestsGen11 = ::testing::Test;

opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheckingCo
118118
}
119119
}
120120

121-
GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetAndBcsInfoSetWhenGetGpgpuEnginesThenReturnThreeRcsEnginesEngine) {
121+
GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetAndBcsInfoSetWhenGetGpgpuEnginesThenReturnThreeRcsEnginesAndOneBcsEngine) {
122122
HardwareInfo hwInfo = *defaultHwInfo;
123123
hwInfo.featureTable.ftrCCSNode = false;
124124
hwInfo.featureTable.ftrBcsInfo = 1;

opencl/test/unit_test/gen8/hw_helper_tests_gen8.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ GEN8TEST_F(HwHelperTestGen8, givenGen8PlatformWhenSetupHardwareCapabilitiesIsCal
5252
}
5353

5454
GEN8TEST_F(HwHelperTestGen8, whenGetGpgpuEnginesThenReturnThreeEngines) {
55-
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
56-
hwInfo.featureTable.ftrBcsInfo.set(0, false);
57-
whenGetGpgpuEnginesThenReturnThreeRcsEngines<FamilyType>(hwInfo);
55+
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
56+
EXPECT_EQ(3u, pDevice->engines.size());
5857
}
5958

6059
using MemorySynchronizatiopCommandsTestsGen8 = ::testing::Test;

opencl/test/unit_test/gen9/hw_helper_tests_gen9.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ GEN9TEST_F(HwHelperTestGen9, givenDebuggingActiveWhenSipKernelTypeIsQueriedThenD
5757
}
5858

5959
GEN9TEST_F(HwHelperTestGen9, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
60-
NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get();
61-
hwInfo.featureTable.ftrBcsInfo.set(0, false);
62-
whenGetGpgpuEnginesThenReturnThreeRcsEngines<FamilyType>(hwInfo);
60+
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
61+
EXPECT_EQ(3u, pDevice->engines.size());
6362
}
6463

6564
using MemorySynchronizatiopCommandsTestsGen9 = ::testing::Test;

opencl/test/unit_test/helpers/get_gpgpu_engines_tests.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using namespace NEO;
1313

1414
template <typename FamilyType>
15-
void whenGetGpgpuEnginesThenReturnThreeRcsEngines(const HardwareInfo &hwInfo) {
15+
void whenGetGpgpuEnginesThenReturnTwoRcsEngines(const HardwareInfo &hwInfo) {
1616
auto gpgpuEngines = HwHelperHw<FamilyType>::get().getGpgpuEngineInstances(hwInfo);
1717
EXPECT_EQ(3u, gpgpuEngines.size());
1818
EXPECT_EQ(aub_stream::ENGINE_RCS, gpgpuEngines[0].first);

shared/source/helpers/hw_helper_bdw_plus.inl

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,17 @@ bool HwHelperHw<Family>::obtainBlitterPreference(const HardwareInfo &hwInfo) con
5757

5858
template <typename GfxFamily>
5959
const HwHelper::EngineInstancesContainer HwHelperHw<GfxFamily>::getGpgpuEngineInstances(const HardwareInfo &hwInfo) const {
60-
EngineInstancesContainer engines;
61-
62-
engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::Regular});
63-
engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::LowPriority});
64-
engines.push_back({aub_stream::ENGINE_RCS, EngineUsage::Internal});
65-
66-
if (hwInfo.featureTable.ftrBcsInfo.test(0)) {
67-
engines.push_back({aub_stream::ENGINE_BCS, EngineUsage::Regular});
68-
}
69-
70-
return engines;
60+
return {
61+
{aub_stream::ENGINE_RCS, EngineUsage::Regular},
62+
{aub_stream::ENGINE_RCS, EngineUsage::LowPriority},
63+
{aub_stream::ENGINE_RCS, EngineUsage::Internal},
64+
};
7165
}
7266

7367
template <typename GfxFamily>
7468
void HwHelperHw<GfxFamily>::addEngineToEngineGroup(std::vector<std::vector<EngineControl>> &engineGroups,
7569
EngineControl &engine, const HardwareInfo &hwInfo) const {
76-
if (engine.getEngineType() == aub_stream::ENGINE_RCS) {
77-
engineGroups[static_cast<uint32_t>(EngineGroupType::RenderCompute)].push_back(engine);
78-
}
79-
if (engine.getEngineType() == aub_stream::ENGINE_BCS && DebugManager.flags.EnableBlitterOperationsSupport.get() != 0) {
80-
engineGroups[static_cast<uint32_t>(EngineGroupType::Copy)].push_back(engine);
81-
}
70+
engineGroups[static_cast<uint32_t>(EngineGroupType::RenderCompute)].push_back(engine);
8271
}
8372

8473
template <typename GfxFamily>

shared/test/unit_test/helpers/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ set(NEO_CORE_HELPERS_TESTS
1616
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_flags_helper.h
1717
${CMAKE_CURRENT_SOURCE_DIR}/file_io_tests.cpp
1818
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/hw_helper_extended_tests.cpp
19-
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp
2019
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
2120
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers_tests.cpp
2221
${CMAKE_CURRENT_SOURCE_DIR}/memory_leak_listener.h

shared/test/unit_test/helpers/hw_helper_tests.cpp

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)