diff --git a/opencl/test/unit_test/device/sub_device_tests.cpp b/opencl/test/unit_test/device/sub_device_tests.cpp index 3e9b88ed21..38a8862034 100644 --- a/opencl/test/unit_test/device/sub_device_tests.cpp +++ b/opencl/test/unit_test/device/sub_device_tests.cpp @@ -755,7 +755,7 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle2rdLevelDeviceOnlyW constexpr uint32_t genericDeviceIndex = 0; constexpr uint32_t engineInstancedEngineIndex = 1; - DebugManager.flags.ZE_AFFINITY_MASK.set("0.1, 0.9"); + DebugManager.flags.ZE_AFFINITY_MASK.set("0.0.1, 0.9"); if (!createDevices(genericDevicesCount, ccsCount)) { GTEST_SKIP(); @@ -778,6 +778,23 @@ TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSingle2rdLevelDeviceOnlyW EXPECT_TRUE(hasEngineInstancedEngines(rootDevice, engineType)); } +TEST_F(EngineInstancedDeviceTests, givenAffinityMaskForSecondLevelOnSingleTileDeviceWhenCreatingThenEnableAllEngineInstancedDevices) { + constexpr uint32_t genericDevicesCount = 1; + constexpr uint32_t ccsCount = 2; + + DebugManager.flags.ZE_AFFINITY_MASK.set("0.0"); + + if (!createDevices(genericDevicesCount, ccsCount)) { + GTEST_SKIP(); + } + + EXPECT_FALSE(hasRootCsrOnly(rootDevice)); + + EXPECT_FALSE(rootDevice->isEngineInstanced()); + EXPECT_EQ(0u, rootDevice->getNumGenericSubDevices()); + EXPECT_EQ(ccsCount, rootDevice->getNumSubDevices()); +} + HWTEST2_F(EngineInstancedDeviceTests, givenEngineInstancedDeviceWhenProgrammingCfeStateThenSetSingleSliceDispatch, IsAtLeastXeHpCore) { using CFE_STATE = typename FamilyType::CFE_STATE; diff --git a/shared/source/execution_environment/execution_environment.cpp b/shared/source/execution_environment/execution_environment.cpp index 786debf42a..370fb0d543 100644 --- a/shared/source/execution_environment/execution_environment.cpp +++ b/shared/source/execution_environment/execution_environment.cpp @@ -136,15 +136,7 @@ void ExecutionEnvironment::parseAffinityMask() { if (subEntries.size() > 1) { uint32_t subDeviceIndex = StringHelpers::toUint32t(subEntries[1]); - bool enableSecondLevelEngineInstanced = ((subDevicesCount == 1) && (hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1)); - - if (enableSecondLevelEngineInstanced) { - UNRECOVERABLE_IF(subEntries.size() != 2); - - if (subDeviceIndex < hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled) { - affinityMaskHelper[rootDeviceIndex].enableEngineInstancedSubDevice(0, subDeviceIndex); // Mask: X.Y - } - } else if (subDeviceIndex < subDevicesCount) { + if (subDeviceIndex < subDevicesCount) { if (subEntries.size() == 2) { affinityMaskHelper[rootDeviceIndex].enableGenericSubDevice(subDeviceIndex); // Mask: X.Y } else {