@@ -83,154 +83,6 @@ HWTEST2_F(DeviceQueueGroupTest, givenNoBlitterSupportAndCCSThenTwoQueueGroupsAre
8383 EXPECT_GE (count, 2u );
8484}
8585
86- HWTEST2_F (DeviceQueueGroupTest, givenBlitterSupportAndCCSThenFourQueueGroupsAreReturned, IsXeHpcCore) {
87- const uint32_t rootDeviceIndex = 0u ;
88- NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get ();
89- hwInfo.featureTable .flags .ftrCCSNode = true ;
90- hwInfo.capabilityTable .blitterOperationsSupported = true ;
91- hwInfo.featureTable .ftrBcsInfo .set ();
92- auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
93- Mock<L0::DeviceImp> deviceImp (neoMockDevice, neoMockDevice->getExecutionEnvironment ());
94-
95- uint32_t count = 0 ;
96- ze_result_t res = deviceImp.getCommandQueueGroupProperties (&count, nullptr );
97- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
98- EXPECT_GE (count, 4u );
99-
100- std::vector<ze_command_queue_group_properties_t > properties (count);
101- res = deviceImp.getCommandQueueGroupProperties (&count, properties.data ());
102- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
103-
104- auto &engineGroups = neoMockDevice->getEngineGroups ();
105- for (uint32_t i = 0 ; i < count; i++) {
106- if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
107- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
108- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
109- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
110- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
111- EXPECT_EQ (properties[i].numQueues , 1u );
112- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
113- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Compute) {
114- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
115- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
116- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
117- uint32_t numerOfCCSEnabled = hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled ;
118- EXPECT_EQ (properties[i].numQueues , numerOfCCSEnabled);
119- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
120- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Copy) {
121- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
122- EXPECT_EQ (properties[i].numQueues , 1u );
123- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
124- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::LinkedCopy) {
125- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
126- EXPECT_EQ (properties[i].numQueues , hwInfo.featureTable .ftrBcsInfo .count () - 1u );
127- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
128- }
129- }
130- }
131-
132- HWTEST2_F (DeviceQueueGroupTest, givenBlitterSupportWithBcsVirtualEnginesEnabledThenOneByteFillPatternReturned, IsXeHpcCore) {
133- DebugManagerStateRestore restore;
134- DebugManager.flags .UseDrmVirtualEnginesForBcs .set (1 );
135- const uint32_t rootDeviceIndex = 0u ;
136- NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get ();
137- hwInfo.featureTable .flags .ftrCCSNode = true ;
138- hwInfo.capabilityTable .blitterOperationsSupported = true ;
139- hwInfo.featureTable .ftrBcsInfo .set ();
140- auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
141- Mock<L0::DeviceImp> deviceImp (neoMockDevice, neoMockDevice->getExecutionEnvironment ());
142-
143- uint32_t count = 0 ;
144- ze_result_t res = deviceImp.getCommandQueueGroupProperties (&count, nullptr );
145- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
146- EXPECT_GE (count, 4u );
147-
148- std::vector<ze_command_queue_group_properties_t > properties (count);
149- res = deviceImp.getCommandQueueGroupProperties (&count, properties.data ());
150- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
151-
152- auto &engineGroups = neoMockDevice->getEngineGroups ();
153- for (uint32_t i = 0 ; i < count; i++) {
154- if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Copy) {
155- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
156- EXPECT_EQ (properties[i].numQueues , 1u );
157- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
158- }
159- }
160- }
161-
162- HWTEST2_F (DeviceQueueGroupTest, givenBlitterSupportWithBcsVirtualEnginesDisabledThenCorrectFillPatternReturned, IsXeHpcCore) {
163- DebugManagerStateRestore restore;
164- DebugManager.flags .UseDrmVirtualEnginesForBcs .set (0 );
165- const uint32_t rootDeviceIndex = 0u ;
166- NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get ();
167- hwInfo.featureTable .flags .ftrCCSNode = true ;
168- hwInfo.capabilityTable .blitterOperationsSupported = true ;
169- hwInfo.featureTable .ftrBcsInfo .set ();
170- auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
171- Mock<L0::DeviceImp> deviceImp (neoMockDevice, neoMockDevice->getExecutionEnvironment ());
172-
173- uint32_t count = 0 ;
174- ze_result_t res = deviceImp.getCommandQueueGroupProperties (&count, nullptr );
175- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
176- EXPECT_GE (count, 4u );
177-
178- std::vector<ze_command_queue_group_properties_t > properties (count);
179- res = deviceImp.getCommandQueueGroupProperties (&count, properties.data ());
180- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
181-
182- auto &engineGroups = neoMockDevice->getEngineGroups ();
183- for (uint32_t i = 0 ; i < count; i++) {
184- if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Copy) {
185- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
186- EXPECT_EQ (properties[i].numQueues , 1u );
187- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , 4 * sizeof (uint32_t ));
188- }
189- }
190- }
191-
192- HWTEST2_F (DeviceQueueGroupTest, givenBlitterSupportCCSAndLinkedBcsDisabledThenThreeQueueGroupsAreReturned, IsXeHpcCore) {
193- const uint32_t rootDeviceIndex = 0u ;
194- NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get ();
195- hwInfo.featureTable .flags .ftrCCSNode = true ;
196- hwInfo.capabilityTable .blitterOperationsSupported = true ;
197- hwInfo.featureTable .ftrBcsInfo .set (0 );
198- auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
199- Mock<L0::DeviceImp> deviceImp (neoMockDevice, neoMockDevice->getExecutionEnvironment ());
200-
201- uint32_t count = 0 ;
202- ze_result_t res = deviceImp.getCommandQueueGroupProperties (&count, nullptr );
203- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
204- EXPECT_GE (count, 3u );
205-
206- std::vector<ze_command_queue_group_properties_t > properties (count);
207- res = deviceImp.getCommandQueueGroupProperties (&count, properties.data ());
208- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
209-
210- auto &engineGroups = neoMockDevice->getEngineGroups ();
211- for (uint32_t i = 0 ; i < count; i++) {
212- if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
213- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
214- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
215- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
216- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
217- EXPECT_EQ (properties[i].numQueues , 1u );
218- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
219- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Compute) {
220- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
221- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
222- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
223- uint32_t numerOfCCSEnabled = hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled ;
224- EXPECT_EQ (properties[i].numQueues , numerOfCCSEnabled);
225- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
226- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Copy) {
227- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
228- EXPECT_EQ (properties[i].numQueues , 1u );
229- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
230- }
231- }
232- }
233-
23486HWTEST2_F (DeviceQueueGroupTest, givenBlitterDisabledAndAllBcsSetThenTwoQueueGroupsAreReturned, IsXeHpcCore) {
23587 DebugManagerStateRestore dbgRestorer;
23688 DebugManager.flags .EnableBlitterOperationsSupport .set (0 );
@@ -286,69 +138,6 @@ HWTEST2_F(DeviceCopyQueueGroupTest,
286138 }
287139}
288140
289- class DeviceQueueGroupTestPVC : public DeviceFixture , public testing ::TestWithParam<uint32_t > {
290- public:
291- void SetUp () override {
292- DeviceFixture::SetUp ();
293- }
294-
295- void TearDown () override {
296- DeviceFixture::TearDown ();
297- }
298- };
299-
300- HWTEST2_P (DeviceQueueGroupTestPVC, givenVaryingBlitterSupportAndCCSThenBCSGroupContainsCorrectNumberOfEngines, IsXeHpcCore) {
301- const uint32_t rootDeviceIndex = 0u ;
302- NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo.get ();
303- hwInfo.featureTable .flags .ftrCCSNode = true ;
304- hwInfo.capabilityTable .blitterOperationsSupported = true ;
305- hwInfo.featureTable .ftrBcsInfo = maxNBitValue (2 );
306- hwInfo.featureTable .ftrBcsInfo .set (GetParam ());
307- auto *neoMockDevice = NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, rootDeviceIndex);
308- Mock<L0::DeviceImp> deviceImp (neoMockDevice, neoMockDevice->getExecutionEnvironment ());
309-
310- uint32_t count = 0 ;
311- ze_result_t res = deviceImp.getCommandQueueGroupProperties (&count, nullptr );
312- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
313- EXPECT_GE (count, 3u );
314-
315- std::vector<ze_command_queue_group_properties_t > properties (count);
316- res = deviceImp.getCommandQueueGroupProperties (&count, properties.data ());
317- EXPECT_EQ (ZE_RESULT_SUCCESS, res);
318-
319- auto &engineGroups = neoMockDevice->getEngineGroups ();
320- for (uint32_t i = 0 ; i < count; i++) {
321- if (engineGroups[i].engineGroupType == NEO::EngineGroupType::RenderCompute) {
322- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
323- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
324- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
325- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
326- EXPECT_EQ (properties[i].numQueues , 1u );
327- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
328- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Compute) {
329- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
330- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
331- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
332- uint32_t numerOfCCSEnabled = hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled ;
333- EXPECT_EQ (properties[i].numQueues , numerOfCCSEnabled);
334- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , std::numeric_limits<size_t >::max ());
335- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::Copy) {
336- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
337- EXPECT_EQ (properties[i].numQueues , 1u );
338- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
339- } else if (engineGroups[i].engineGroupType == NEO::EngineGroupType::LinkedCopy) {
340- EXPECT_TRUE (properties[i].flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
341- EXPECT_EQ (properties[i].numQueues , hwInfo.featureTable .ftrBcsInfo .count () - 1u );
342- EXPECT_EQ (properties[i].maxMemoryFillPatternSize , sizeof (uint8_t ));
343- }
344- }
345- }
346-
347- INSTANTIATE_TEST_CASE_P (
348- DeviceQueueGroupTestPVCValues,
349- DeviceQueueGroupTestPVC,
350- testing::Values (0 , 1 , 2 , 3 ));
351-
352141HWTEST2_F (DeviceFixturePVC, givenReturnedDevicePropertiesThenExpectedPropertyFlagsSet, IsPVC) {
353142 ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
354143
0 commit comments