refactor: engineInstancedType removed

Related-To: NEO-12594

Signed-off-by: Wojciech Konior <wojciech.konior@intel.com>
This commit is contained in:
Wojciech Konior
2024-10-08 13:23:41 +00:00
committed by Compute-Runtime-Automation
parent 834f00d48b
commit 6b40f9bc5a
65 changed files with 195 additions and 966 deletions

View File

@@ -85,7 +85,7 @@ TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectVal
for (auto isCooperativeKernel : ::testing::Bool()) {
for (auto disableOverdispatch : ::testing::Bool()) {
for (auto disableEUFusion : ::testing::Bool()) {
properties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEUFusion, disableOverdispatch, false);
properties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEUFusion, disableOverdispatch);
if (frontEndPropertiesSupport.computeDispatchAllWalker) {
EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value);
} else {
@@ -102,7 +102,7 @@ TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectVal
EXPECT_EQ(-1, properties.frontEndState.disableOverdispatch.value);
}
if (frontEndPropertiesSupport.singleSliceDispatchCcsMode) {
EXPECT_EQ(false, properties.frontEndState.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value);
} else {
EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value);
}
@@ -512,88 +512,75 @@ TEST(StreamPropertiesTests, givenSingleDispatchCcsFrontEndPropertyWhenSettingPro
feProperties.initSupport(*mockExecutionEnvironment.rootDeviceEnvironments[0]);
EXPECT_TRUE(feProperties.propertiesSupportLoaded);
int32_t engineInstancedDevice = 1;
feProperties.setPropertySingleSliceDispatchCcsMode(engineInstancedDevice);
if (fePropertiesSupport.singleSliceDispatchCcsMode) {
EXPECT_TRUE(feProperties.singleSliceDispatchCcsMode.isDirty);
EXPECT_EQ(engineInstancedDevice, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_FALSE(feProperties.singleSliceDispatchCcsMode.isDirty);
} else {
EXPECT_FALSE(feProperties.singleSliceDispatchCcsMode.isDirty);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
}
feProperties.frontEndPropertiesSupport.singleSliceDispatchCcsMode = true;
engineInstancedDevice = 2;
feProperties.setPropertySingleSliceDispatchCcsMode(engineInstancedDevice);
EXPECT_TRUE(feProperties.singleSliceDispatchCcsMode.isDirty);
EXPECT_EQ(engineInstancedDevice, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_FALSE(feProperties.singleSliceDispatchCcsMode.isDirty);
}
TEST(StreamPropertiesTests, givenDisableOverdispatchEngineInstancedFrontEndPropertyWhenSettingPropertyAndCheckIfSupportedThenExpectCorrectState) {
TEST(StreamPropertiesTests, givenDisableOverdispatchFrontEndPropertyWhenSettingPropertyAndCheckIfSupportedThenExpectCorrectState) {
bool clearDirtyState = false;
MockFrontEndProperties feProperties{};
feProperties.propertiesSupportLoaded = true;
feProperties.frontEndPropertiesSupport.disableOverdispatch = false;
feProperties.frontEndPropertiesSupport.singleSliceDispatchCcsMode = false;
int32_t engineInstancedDevice = 0;
bool disableOverdispatch = false;
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(-1, feProperties.disableOverdispatch.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.frontEndPropertiesSupport.disableOverdispatch = true;
feProperties.frontEndPropertiesSupport.singleSliceDispatchCcsMode = true;
engineInstancedDevice = -1;
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
engineInstancedDevice = 0;
feProperties.setPropertiesAll(false, false, disableOverdispatch, engineInstancedDevice);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(0, feProperties.singleSliceDispatchCcsMode.value);
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesAll(false, false, disableOverdispatch);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(0, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
engineInstancedDevice = 1;
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(1, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
disableOverdispatch = true;
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(1, feProperties.disableOverdispatch.value);
EXPECT_EQ(1, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(1, feProperties.disableOverdispatch.value);
EXPECT_EQ(1, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
clearDirtyState = true;
disableOverdispatch = false;
engineInstancedDevice = 0;
feProperties.setPropertiesDisableOverdispatchEngineInstanced(disableOverdispatch, engineInstancedDevice, clearDirtyState);
feProperties.setPropertiesDisableOverdispatch(disableOverdispatch, clearDirtyState);
EXPECT_FALSE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
EXPECT_EQ(0, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
}
TEST(StreamPropertiesTests, givenComputeDispatchAllWalkerEnableAndDisableEuFusionFrontEndPropertiesWhenSettingPropertiesAndCheckIfSupportedThenExpectCorrectState) {
@@ -611,7 +598,7 @@ TEST(StreamPropertiesTests, givenComputeDispatchAllWalkerEnableAndDisableEuFusio
feProperties.frontEndPropertiesSupport.disableEuFusion = true;
feProperties.frontEndPropertiesSupport.computeDispatchAllWalker = true;
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, false, -1);
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, false);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.disableEUFusion.value);
EXPECT_EQ(0, feProperties.computeDispatchAllWalkerEnable.value);
@@ -685,13 +672,12 @@ TEST(StreamPropertiesTests, givenSetAllFrontEndPropertiesWhenResettingStateThenR
bool isCooperativeKernel = false;
bool disableEuFusion = true;
bool disableOverdispatch = true;
int32_t engineInstancedDevice = 3;
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice);
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch);
EXPECT_TRUE(feProperties.isDirty());
EXPECT_EQ(0, feProperties.computeDispatchAllWalkerEnable.value);
EXPECT_EQ(1, feProperties.disableEUFusion.value);
EXPECT_EQ(1, feProperties.disableOverdispatch.value);
EXPECT_EQ(3, feProperties.singleSliceDispatchCcsMode.value);
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
feProperties.resetState();
EXPECT_FALSE(feProperties.isDirty());
@@ -1446,8 +1432,7 @@ TEST(StreamPropertiesTests, givenAllStreamPropertiesSetWhenAllStreamPropertiesRe
bool isCooperativeKernel = false;
bool disableEuFusion = true;
bool disableOverdispatch = true;
int32_t engineInstancedDevice = 3;
globalStreamProperties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice);
globalStreamProperties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch);
bool modeSelected = false;
bool mediaSamplerDopClockGate = false;

View File

@@ -463,7 +463,6 @@ TEST(ExecutionEnvironment, whenCalculateMaxOsContexCountThenGlobalVariableHasPro
uint32_t expectedOsContextCountForCcs = 0u;
{
debugManager.flags.EngineInstancedSubDevices.set(false);
MockExecutionEnvironment executionEnvironment(nullptr, true, numRootDevices);
for (const auto &rootDeviceEnvironment : executionEnvironment.rootDeviceEnvironments) {
@@ -485,7 +484,6 @@ TEST(ExecutionEnvironment, whenCalculateMaxOsContexCountThenGlobalVariableHasPro
}
{
debugManager.flags.EngineInstancedSubDevices.set(true);
MockExecutionEnvironment executionEnvironment(nullptr, true, numRootDevices);
EXPECT_EQ(expectedOsContextCount + expectedOsContextCountForCcs, MemoryManager::maxOsContextCount);

View File

@@ -1611,22 +1611,22 @@ HWTEST_F(GfxCoreHelperTest, GivenCooperativeEngineSupportedAndNotUsedWhenAdjustM
((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));
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment));
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment));
} 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));
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment));
EXPECT_EQ(256u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment));
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 2;
EXPECT_EQ(2u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(512u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(2u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment));
EXPECT_EQ(512u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment));
} else {
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment));
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment));
}
} else {
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(4u, gfxCoreHelper.adjustMaxWorkGroupCount(4u, engineGroupType, rootDeviceEnvironment));
EXPECT_EQ(1024u, gfxCoreHelper.adjustMaxWorkGroupCount(1024u, engineGroupType, rootDeviceEnvironment));
}
}
}

View File

@@ -46,7 +46,7 @@ struct KernelHelperMaxWorkGroupsTests : ::testing::Test {
hwInfo->gtSystemInfo.DualSubSliceCount = dssCount;
hwInfo->capabilityTable.slmSize = (availableSlm / MemoryConstants::kiloByte) / dssCount;
return KernelHelper::getMaxWorkGroupCount(*rootDeviceEnvironment, descriptor, numSubdevices, usedSlm, workDim, lws, engineType, false);
return KernelHelper::getMaxWorkGroupCount(*rootDeviceEnvironment, descriptor, numSubdevices, usedSlm, workDim, lws, engineType);
}
std::unique_ptr<MockExecutionEnvironment> executionEnvironment;
@@ -59,7 +59,7 @@ TEST_F(KernelHelperMaxWorkGroupsTests, GivenNoBarriersOrSlmUsedWhenCalculatingMa
uint32_t workGroupSize = static_cast<uint32_t>(lws[0] * lws[1] * lws[2]);
uint32_t expected = helper.calculateAvailableThreadCount(*rootDeviceEnvironment->getHardwareInfo(), grf) / static_cast<uint32_t>(Math::divideAndRoundUp(workGroupSize, simd));
expected = helper.adjustMaxWorkGroupCount(expected, EngineGroupType::compute, *rootDeviceEnvironment, false);
expected = helper.adjustMaxWorkGroupCount(expected, EngineGroupType::compute, *rootDeviceEnvironment);
EXPECT_EQ(expected, getMaxWorkGroupCount());
}
@@ -246,4 +246,4 @@ TEST_F(KernelHelperTest, GivenPtrByValueWhenCheckingIsAnyArgumentPtrByValueThenT
kernelDescriptor.payloadMappings.explicitArgs.push_back(pointerArg);
kernelDescriptor.payloadMappings.explicitArgs.push_back(valueArg);
EXPECT_TRUE(KernelHelper::isAnyArgumentPtrByValue(kernelDescriptor));
}
}

View File

@@ -369,7 +369,7 @@ TEST_F(DrmDebugPrelimTest, givenAddedBindExtHandlesInBoWhenBindingWithinInternal
bo.addBindExtHandle(4);
bo.addBindExtHandle(5);
OsContextLinux osContext(drm, 0, 0u, {{aub_stream::EngineType::ENGINE_RCS, EngineUsage::internal}, 1 /*deviceBitfield*/, PreemptionMode::Disabled, true /* isRootDevice*/, false /* isEngineInstanced*/});
OsContextLinux osContext(drm, 0, 0u, {{aub_stream::EngineType::ENGINE_RCS, EngineUsage::internal}, 1 /*deviceBitfield*/, PreemptionMode::Disabled, true /* isRootDevice*/});
osContext.ensureContextInitialized(false);
bo.bind(&osContext, 0);
@@ -385,7 +385,7 @@ TEST_F(DrmDebugPrelimTest, givenAddedBindExtHandlesInBoWhenBindingWithinCopyEngi
drm.context.receivedVmBindUuidExt[0].reset();
OsContextLinux osContext(drm, 0, 0u, {{aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular}, 1 /*deviceBitfield*/, PreemptionMode::Disabled, true /* isRootDevice*/, false /* isEngineInstanced*/});
OsContextLinux osContext(drm, 0, 0u, {{aub_stream::EngineType::ENGINE_BCS, EngineUsage::regular}, 1 /*deviceBitfield*/, PreemptionMode::Disabled, true /* isRootDevice*/});
osContext.ensureContextInitialized(false);
bo.bind(&osContext, 0);

View File

@@ -176,7 +176,7 @@ static void givenEngineTypeWhenBindingDrmContextThenContextParamEngineIsSet(std:
ASSERT_NE(nullptr, drm->engineInfo);
auto drmContextId = 42u;
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
I915_DEFINE_CONTEXT_PARAM_ENGINES(enginesStruct, 1){};
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
@@ -206,7 +206,7 @@ TEST(DrmTest, givenRcsEngineWhenBindingDrmContextThenContextParamEngineIsSet) {
static void givenBcsEngineTypeWhenBindingDrmContextThenContextParamEngineIsSet(std::unique_ptr<DrmQueryMock> &drm, aub_stream::EngineType engineType, size_t numBcsSiblings, unsigned int engineIndex, uint32_t tileId) {
auto drmContextId = 42u;
drm->receivedContextParamRequestCount = 0u;
auto engineFlag = drm->bindDrmContext(drmContextId, tileId, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, tileId, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
@@ -305,7 +305,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DrmTestXeHPAndLater, givenLinkBcsEngineWithoutMainC
engineType = static_cast<aub_stream::EngineType>(aub_stream::ENGINE_BCS1 + engineIndex - 1);
numBcsSiblings -= 1;
}
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
if (engineIndex == 0) {
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_BLT), engineFlag);
@@ -358,7 +358,7 @@ HWTEST2_F(DrmTestXeHPAndLater, givenNotAllLinkBcsEnginesWhenBindingSingleTileDrm
auto drmContextId = 42u;
drm->receivedContextParamRequestCount = 0u;
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
if (drm->supportedCopyEnginesMask.test(engineIndex)) {
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
@@ -504,7 +504,7 @@ HWTEST2_F(DrmTestXeHPCAndLater, givenBcsVirtualEnginesDisabledWhenCreatingContex
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineType = static_cast<aub_stream::EngineType>(engineBase + engineIndex);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
@@ -546,7 +546,7 @@ TEST(DrmTest, givenVirtualEnginesEnabledWhenCreatingContextThenEnableLoadBalanci
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineType = static_cast<aub_stream::EngineType>(aub_stream::ENGINE_CCS + engineIndex);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
@@ -588,7 +588,7 @@ TEST(DrmTest, givenVirtualEnginesEnabledWhenCreatingContextThenEnableLoadBalanci
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineType = static_cast<aub_stream::EngineType>(aub_stream::ENGINE_CCS + engineIndex);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
@@ -654,7 +654,7 @@ TEST(DrmTest, givenVirtualEnginesDisabledWhenCreatingContextThenDontEnableLoadBa
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineType = static_cast<aub_stream::EngineType>(aub_stream::ENGINE_CCS + engineIndex);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
@@ -667,7 +667,7 @@ TEST(DrmTest, givenVirtualEnginesDisabledWhenCreatingContextThenDontEnableLoadBa
}
}
TEST(DrmTest, givenEngineInstancedDeviceWhenCreatingContextThenDontUseVirtualEngines) {
TEST(DrmTest, givenDeviceWhenCreatingContextThenDontUseVirtualEngines) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
@@ -685,16 +685,12 @@ TEST(DrmTest, givenEngineInstancedDeviceWhenCreatingContextThenDontUseVirtualEng
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineType = static_cast<aub_stream::EngineType>(aub_stream::ENGINE_CCS + engineIndex);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType, true);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, engineType);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
EXPECT_EQ(drmContextId, drm->receivedContextParamRequest.contextId);
EXPECT_EQ(static_cast<uint64_t>(I915_CONTEXT_PARAM_ENGINES), drm->receivedContextParamRequest.param);
EXPECT_EQ(ptrDiff(drm->receivedContextParamEngines.engines + 1, &drm->receivedContextParamEngines), drm->receivedContextParamRequest.size);
auto extensions = drm->receivedContextParamEngines.extensions;
EXPECT_EQ(0ull, extensions);
EXPECT_EQ(static_cast<__u16>(DrmPrelimHelper::getComputeEngineClass()), drm->receivedContextParamEngines.engines[0].engineClass);
EXPECT_EQ(static_cast<__u16>(engineIndex), DrmMockHelper::getIdFromEngineOrMemoryInstance(drm->receivedContextParamEngines.engines[0].engineInstance));
EXPECT_EQ(ptrDiff(drm->receivedContextParamEngines.engines + 5, &drm->receivedContextParamEngines), drm->receivedContextParamRequest.size);
}
}
@@ -712,7 +708,7 @@ TEST(DrmTest, givenVirtualEnginesEnabledAndNotEnoughCcsEnginesWhenCreatingContex
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, aub_stream::ENGINE_CCS, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, aub_stream::ENGINE_CCS);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
@@ -740,7 +736,7 @@ TEST(DrmTest, givenVirtualEnginesEnabledAndNonCcsEnginesWhenCreatingContextThenD
drm->receivedContextParamRequestCount = 0u;
auto drmContextId = 42u;
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, defaultCopyEngine, false);
auto engineFlag = drm->bindDrmContext(drmContextId, 0u, defaultCopyEngine);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(1u, drm->receivedContextParamRequestCount);
@@ -766,7 +762,7 @@ TEST(DrmTest, givenInvalidTileWhenBindingDrmContextThenErrorIsReturned) {
EXPECT_EQ(haveLocalMemory ? 3u : 2u, drm->ioctlCallsCount);
ASSERT_NE(nullptr, drm->engineInfo);
auto engineFlag = drm->bindDrmContext(42u, 20u, aub_stream::ENGINE_CCS, false);
auto engineFlag = drm->bindDrmContext(42u, 20u, aub_stream::ENGINE_CCS);
EXPECT_EQ(static_cast<unsigned int>(I915_EXEC_DEFAULT), engineFlag);
EXPECT_EQ(haveLocalMemory ? 3u : 2u, drm->ioctlCallsCount);
EXPECT_EQ(0u, drm->receivedContextParamRequestCount);
@@ -785,7 +781,7 @@ TEST(DrmTest, givenInvalidEngineTypeWhenBindingDrmContextThenExceptionIsThrown)
EXPECT_EQ(haveLocalMemory ? 3u : 2u, drm->ioctlCallsCount);
ASSERT_NE(nullptr, drm->engineInfo);
EXPECT_THROW(drm->bindDrmContext(42u, 0u, aub_stream::ENGINE_VCS, false), std::exception);
EXPECT_THROW(drm->bindDrmContext(42u, 0u, aub_stream::ENGINE_VCS), std::exception);
EXPECT_EQ(haveLocalMemory ? 3u : 2u, drm->ioctlCallsCount);
EXPECT_EQ(0u, drm->receivedContextParamRequestCount);
}
@@ -807,7 +803,7 @@ TEST(DrmTest, givenSetParamEnginesFailsWhenBindingDrmContextThenCallUnrecoverabl
drm->storedRetValForSetParamEngines = -1;
auto drmContextId = 42u;
EXPECT_ANY_THROW(drm->bindDrmContext(drmContextId, 0u, renderEngine, false));
EXPECT_ANY_THROW(drm->bindDrmContext(drmContextId, 0u, renderEngine));
}
TEST(DrmTest, whenQueryingEngineInfoThenMultiTileArchInfoIsUnchanged) {

View File

@@ -1886,9 +1886,9 @@ TEST(IoctlHelperXeTest, whenBindingDrmContextWithoutVirtualEnginesThenProperEngi
uint16_t tileId = 1u;
uint16_t expectedGtId = 2u;
EXPECT_EQ(expectedValue, drm->bindDrmContext(0, tileId, aub_stream::EngineType::ENGINE_CCS, true));
EXPECT_EQ(expectedValue, drm->bindDrmContext(0, tileId, aub_stream::EngineType::ENGINE_CCS));
EXPECT_EQ(1u, ioctlHelper->contextParamEngine.size());
EXPECT_EQ(4u, ioctlHelper->contextParamEngine.size());
auto expectedEngine = drm->getEngineInfo()->getEngineInstance(1, aub_stream::EngineType::ENGINE_CCS);
auto notExpectedEngine = drm->getEngineInfo()->getEngineInstance(0, aub_stream::EngineType::ENGINE_CCS);
EXPECT_NE(expectedEngine->engineInstance, notExpectedEngine->engineInstance);
@@ -1910,7 +1910,7 @@ TEST(IoctlHelperXeTest, whenBindingDrmContextWithVirtualEnginesThenProperEngines
unsigned int expectedValue = DRM_XE_ENGINE_CLASS_COMPUTE;
uint16_t tileId = 1u;
uint16_t expectedGtId = 2u;
EXPECT_EQ(expectedValue, drm->bindDrmContext(0, tileId, aub_stream::EngineType::ENGINE_CCS, false));
EXPECT_EQ(expectedValue, drm->bindDrmContext(0, tileId, aub_stream::EngineType::ENGINE_CCS));
EXPECT_EQ(2u, ioctlHelper->contextParamEngine.size());
{

View File

@@ -157,7 +157,7 @@ TEST(WddmNewRsourceTest, whenSetNewResourcesBoundToPageTableThenSetInContextFrom
executionEnvironment.initializeMemoryManager();
auto csr1 = std::unique_ptr<CommandStreamReceiver>(createCommandStream(executionEnvironment, 0, 1));
auto csr2 = std::unique_ptr<CommandStreamReceiver>(createCommandStream(executionEnvironment, 1, 1));
EngineDescriptor engineDesc({aub_stream::ENGINE_CCS, EngineUsage::regular}, 1, PreemptionMode::Disabled, false, false);
EngineDescriptor engineDesc({aub_stream::ENGINE_CCS, EngineUsage::regular}, 1, PreemptionMode::Disabled, false);
executionEnvironment.memoryManager->createAndRegisterOsContext(csr1.get(), engineDesc);
executionEnvironment.memoryManager->createAndRegisterOsContext(csr2.get(), engineDesc);

View File

@@ -183,14 +183,14 @@ PVCTEST_F(GfxCoreHelperTestsPvc, GivenCooperativeEngineSupportedAndNotUsedWhenAd
(engineGroupType == EngineGroupType::compute && isRcsEnabled)) &&
productHelper.isCooperativeEngineSupported(hwInfo);
if (disallowDispatch) {
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment, false));
EXPECT_EQ(1u, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment));
} 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));
EXPECT_EQ(passedMaxWorkGroupCount / tilePartsForConcurrentKernels, gfxCoreHelper.adjustMaxWorkGroupCount(passedMaxWorkGroupCount, engineGroupType, rootDeviceEnvironment));
}
}
}

View File

@@ -32,7 +32,7 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli
StreamProperties streamProperties{};
streamProperties.initSupport(pDevice->getRootDeviceEnvironment());
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(revision, *hwInfo);
streamProperties.frontEndState.setPropertiesAll(kernelExecutionType, false, false, false);
streamProperties.frontEndState.setPropertiesAll(kernelExecutionType, false, false);
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties);
parseCommands<FamilyType>(linearStream);

View File

@@ -48,7 +48,7 @@ XE_HPC_CORETEST_F(PreambleCfeState, givenKernelExecutionTypeConcurrentAndRevisio
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::renderCompute);
StreamProperties streamProperties{};
streamProperties.initSupport(pDevice->getRootDeviceEnvironment());
streamProperties.frontEndState.setPropertiesAll(true, false, false, false);
streamProperties.frontEndState.setPropertiesAll(true, false, false);
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties);
parseCommands<FamilyType>(linearStream);