mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
test: removing isEngineInstanced from tests
Related-To: NEO-12594 Signed-off-by: Wojciech Konior <wojciech.konior@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
08f57c0fd4
commit
c1edd23fd2
@@ -82,31 +82,29 @@ TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectVal
|
||||
productHelper.fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport, *defaultHwInfo);
|
||||
properties.initSupport(rootDeviceEnvironment);
|
||||
|
||||
for (auto isEngineInstanced : ::testing::Bool()) {
|
||||
for (auto isCooperativeKernel : ::testing::Bool()) {
|
||||
for (auto disableOverdispatch : ::testing::Bool()) {
|
||||
for (auto disableEUFusion : ::testing::Bool()) {
|
||||
properties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEUFusion, disableOverdispatch, isEngineInstanced);
|
||||
if (frontEndPropertiesSupport.computeDispatchAllWalker) {
|
||||
EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.computeDispatchAllWalkerEnable.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.disableEuFusion) {
|
||||
EXPECT_EQ(disableEUFusion, properties.frontEndState.disableEUFusion.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.disableEUFusion.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.disableOverdispatch) {
|
||||
EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.disableOverdispatch.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.singleSliceDispatchCcsMode) {
|
||||
EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
}
|
||||
for (auto isCooperativeKernel : ::testing::Bool()) {
|
||||
for (auto disableOverdispatch : ::testing::Bool()) {
|
||||
for (auto disableEUFusion : ::testing::Bool()) {
|
||||
properties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEUFusion, disableOverdispatch, false);
|
||||
if (frontEndPropertiesSupport.computeDispatchAllWalker) {
|
||||
EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.computeDispatchAllWalkerEnable.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.disableEuFusion) {
|
||||
EXPECT_EQ(disableEUFusion, properties.frontEndState.disableEUFusion.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.disableEUFusion.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.disableOverdispatch) {
|
||||
EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.disableOverdispatch.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.singleSliceDispatchCcsMode) {
|
||||
EXPECT_EQ(false, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1638,33 +1638,30 @@ HWTEST_F(GfxCoreHelperTest, GivenCooperativeEngineSupportedAndNotUsedWhenAdjustM
|
||||
}
|
||||
hwInfo.platform.usRevId = hwRevId;
|
||||
|
||||
for (auto isEngineInstanced : ::testing::Bool()) {
|
||||
for (auto isRcsEnabled : ::testing::Bool()) {
|
||||
hwInfo.featureTable.flags.ftrRcsNode = isRcsEnabled;
|
||||
for (auto engineGroupType : {EngineGroupType::renderCompute, EngineGroupType::compute, EngineGroupType::cooperativeCompute}) {
|
||||
if (productHelper.isCooperativeEngineSupported(hwInfo)) {
|
||||
bool disallowDispatch = (engineGroupType == EngineGroupType::renderCompute) ||
|
||||
((engineGroupType == EngineGroupType::compute) && isRcsEnabled);
|
||||
bool applyLimitation = !isEngineInstanced &&
|
||||
(engineGroupType != EngineGroupType::cooperativeCompute);
|
||||
if (disallowDispatch) {
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
} else if (applyLimitation) {
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 4;
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(256u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 2;
|
||||
EXPECT_EQ(2u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(512u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
} else {
|
||||
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
}
|
||||
for (auto isRcsEnabled : ::testing::Bool()) {
|
||||
hwInfo.featureTable.flags.ftrRcsNode = isRcsEnabled;
|
||||
for (auto engineGroupType : {EngineGroupType::renderCompute, EngineGroupType::compute, EngineGroupType::cooperativeCompute}) {
|
||||
if (productHelper.isCooperativeEngineSupported(hwInfo)) {
|
||||
bool disallowDispatch = (engineGroupType == EngineGroupType::renderCompute) ||
|
||||
((engineGroupType == EngineGroupType::compute) && isRcsEnabled);
|
||||
bool applyLimitation = engineGroupType != EngineGroupType::cooperativeCompute;
|
||||
if (disallowDispatch) {
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
|
||||
} else if (applyLimitation) {
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 4;
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
|
||||
EXPECT_EQ(256u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 2;
|
||||
EXPECT_EQ(2u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
|
||||
EXPECT_EQ(512u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
|
||||
} else {
|
||||
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
|
||||
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
|
||||
}
|
||||
} else {
|
||||
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
|
||||
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ HWTEST_F(IoctlHelperXeTestFixture, givenDeviceIndexWhenCreatingContextThenSetCor
|
||||
drm->engineInfo = std::move(engineInfo);
|
||||
|
||||
auto engineDescriptor = EngineDescriptorHelper::getDefaultDescriptor({aub_stream::EngineType::ENGINE_CCS, EngineUsage::regular});
|
||||
engineDescriptor.isEngineInstanced = true;
|
||||
OsContextLinux osContext(*drm, 0, 0u, engineDescriptor);
|
||||
|
||||
uint16_t tileId = 1u;
|
||||
@@ -112,8 +111,8 @@ HWTEST_F(IoctlHelperXeTestFixture, givenDeviceIndexWhenCreatingContextThenSetCor
|
||||
|
||||
xeIoctlHelper->createDrmContext(*drm, osContext, 0, tileId, false);
|
||||
|
||||
EXPECT_EQ(1u, drm->execQueueCreateParams.num_placements);
|
||||
ASSERT_EQ(1u, drm->execQueueEngineInstances.size());
|
||||
EXPECT_EQ(4u, drm->execQueueCreateParams.num_placements);
|
||||
ASSERT_EQ(4u, drm->execQueueEngineInstances.size());
|
||||
|
||||
EXPECT_EQ(expectedGtId, drm->execQueueEngineInstances[0].gt_id);
|
||||
}
|
||||
|
||||
@@ -182,17 +182,15 @@ PVCTEST_F(GfxCoreHelperTestsPvc, GivenCooperativeEngineSupportedAndNotUsedWhenAd
|
||||
bool disallowDispatch = (engineGroupType == EngineGroupType::renderCompute ||
|
||||
(engineGroupType == EngineGroupType::compute && isRcsEnabled)) &&
|
||||
productHelper.isCooperativeEngineSupported(hwInfo);
|
||||
for (auto isEngineInstanced : ::testing::Bool()) {
|
||||
if (disallowDispatch) {
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
} else {
|
||||
for (uint32_t ccsCount : {1, 2, 4}) {
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = ccsCount;
|
||||
tilePartsForConcurrentKernels = ccsCount == 1 ? 1
|
||||
: ccsCount == 2 ? 4
|
||||
: 8;
|
||||
EXPECT_EQ(passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, isEngineInstanced));
|
||||
}
|
||||
if (disallowDispatch) {
|
||||
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, false));
|
||||
} else {
|
||||
for (uint32_t ccsCount : {1, 2, 4}) {
|
||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = ccsCount;
|
||||
tilePartsForConcurrentKernels = ccsCount == 1 ? 1
|
||||
: ccsCount == 2 ? 4
|
||||
: 8;
|
||||
EXPECT_EQ(passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user