@@ -172,27 +172,35 @@ PVCTEST_F(GfxCoreHelperTestsPvc, GivenCooperativeEngineSupportedAndNotUsedWhenAd
172
172
auto tilePartsForConcurrentKernels = PVC::numberOfpartsInTileForConcurrentKernels;
173
173
auto passedMaxWorkGroupCount = 1024 ;
174
174
175
- uint32_t revisions[] = {REVISION_A0, REVISION_B, REVISION_C };
175
+ uint32_t revisions[] = {REVISION_A0, REVISION_B};
176
176
for (auto &revision : revisions) {
177
177
auto hwRevId = productHelper.getHwRevIdFromStepping (revision, hwInfo);
178
+ if (hwRevId == CommonConstants::invalidStepping) {
179
+ continue ;
180
+ }
178
181
hwInfo.platform .usRevId = hwRevId;
179
- for (auto engineGroupType : {EngineGroupType::RenderCompute, EngineGroupType::Compute, EngineGroupType::CooperativeCompute}) {
182
+
183
+ for (auto isEngineInstanced : ::testing::Bool ()) {
180
184
for (auto isRcsEnabled : ::testing::Bool ()) {
181
185
hwInfo.featureTable .flags .ftrRcsNode = isRcsEnabled;
182
- bool disallowDispatch = (engineGroupType == EngineGroupType::RenderCompute ||
183
- (engineGroupType == EngineGroupType::Compute && isRcsEnabled)) &&
184
- productHelper.isCooperativeEngineSupported (hwInfo);
185
- for (auto isEngineInstanced : ::testing::Bool ()) {
186
- if (disallowDispatch) {
187
- EXPECT_EQ (1u , gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
188
- } else {
189
- for (uint32_t ccsCount : {1 , 2 , 4 }) {
190
- hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled = ccsCount;
191
- tilePartsForConcurrentKernels = ccsCount == 1 ? 1
192
- : ccsCount == 2 ? 4
193
- : 8 ;
186
+ for (auto engineGroupType : {EngineGroupType::RenderCompute, EngineGroupType::Compute, EngineGroupType::CooperativeCompute}) {
187
+ if (productHelper.isCooperativeEngineSupported (hwInfo)) {
188
+ bool disallowDispatch = (engineGroupType == EngineGroupType::RenderCompute) ||
189
+ ((engineGroupType == EngineGroupType::Compute) && isRcsEnabled);
190
+ bool applyLimitation = !isEngineInstanced &&
191
+ (engineGroupType != EngineGroupType::CooperativeCompute);
192
+ if (disallowDispatch) {
193
+ EXPECT_EQ (1u , gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
194
+ } else if (applyLimitation) {
195
+ hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled = 4 ;
196
+ EXPECT_EQ (passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
197
+ hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled = 16 ;
198
+ EXPECT_EQ (passedMaxWorkGroupCount / hwInfo.gtSystemInfo .CCSInfo .NumberOfCCSEnabled , gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
199
+ } else {
194
200
EXPECT_EQ (passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
195
201
}
202
+ } else {
203
+ EXPECT_EQ (passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount (passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
196
204
}
197
205
}
198
206
}
0 commit comments