mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Improve affinity mask handling
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
984f697ae2
commit
3216302499
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user