mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
fix: Fix front end programming for cooperative dispatch
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
eb256f1ffd
commit
36ddfaaf4d
@@ -86,7 +86,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, isEngineInstanced);
|
||||
properties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEUFusion, disableOverdispatch, isEngineInstanced, rootDeviceEnvironment);
|
||||
if (frontEndPropertiesSupport.computeDispatchAllWalker) {
|
||||
EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value);
|
||||
} else {
|
||||
@@ -103,7 +103,7 @@ TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectVal
|
||||
EXPECT_EQ(-1, properties.frontEndState.disableOverdispatch.value);
|
||||
}
|
||||
if (frontEndPropertiesSupport.singleSliceDispatchCcsMode) {
|
||||
EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
EXPECT_EQ(isEngineInstanced || (productHelper.isSingleSliceDispatchNeededForCooperativeKernel() && isCooperativeKernel), properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
} else {
|
||||
EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value);
|
||||
}
|
||||
@@ -518,6 +518,8 @@ TEST(StreamPropertiesTests, givenSingleDispatchCcsFrontEndPropertyWhenSettingPro
|
||||
}
|
||||
|
||||
TEST(StreamPropertiesTests, givenDisableOverdispatchEngineInstancedFrontEndPropertyWhenSettingPropertyAndCheckIfSupportedThenExpectCorrectState) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
bool clearDirtyState = false;
|
||||
MockFrontEndProperties feProperties{};
|
||||
feProperties.propertiesSupportLoaded = true;
|
||||
@@ -540,7 +542,7 @@ TEST(StreamPropertiesTests, givenDisableOverdispatchEngineInstancedFrontEndPrope
|
||||
EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value);
|
||||
|
||||
engineInstancedDevice = 0;
|
||||
feProperties.setPropertiesAll(false, false, disableOverdispatch, engineInstancedDevice);
|
||||
feProperties.setPropertiesAll(false, false, disableOverdispatch, engineInstancedDevice, rootDeviceEnvironment);
|
||||
EXPECT_TRUE(feProperties.isDirty());
|
||||
EXPECT_EQ(0, feProperties.disableOverdispatch.value);
|
||||
EXPECT_EQ(0, feProperties.singleSliceDispatchCcsMode.value);
|
||||
@@ -583,6 +585,8 @@ TEST(StreamPropertiesTests, givenDisableOverdispatchEngineInstancedFrontEndPrope
|
||||
}
|
||||
|
||||
TEST(StreamPropertiesTests, givenComputeDispatchAllWalkerEnableAndDisableEuFusionFrontEndPropertiesWhenSettingPropertiesAndCheckIfSupportedThenExpectCorrectState) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
MockFrontEndProperties feProperties{};
|
||||
feProperties.propertiesSupportLoaded = true;
|
||||
feProperties.frontEndPropertiesSupport.disableEuFusion = false;
|
||||
@@ -597,7 +601,7 @@ TEST(StreamPropertiesTests, givenComputeDispatchAllWalkerEnableAndDisableEuFusio
|
||||
|
||||
feProperties.frontEndPropertiesSupport.disableEuFusion = true;
|
||||
feProperties.frontEndPropertiesSupport.computeDispatchAllWalker = true;
|
||||
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, false, -1);
|
||||
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, false, false, rootDeviceEnvironment);
|
||||
EXPECT_TRUE(feProperties.isDirty());
|
||||
EXPECT_EQ(0, feProperties.disableEUFusion.value);
|
||||
EXPECT_EQ(0, feProperties.computeDispatchAllWalkerEnable.value);
|
||||
@@ -661,6 +665,8 @@ TEST(StreamPropertiesTests, givenComputeDispatchAllWalkerEnableAndDisableEuFusio
|
||||
}
|
||||
|
||||
TEST(StreamPropertiesTests, givenSetAllFrontEndPropertiesWhenResetingStateThenResetValuesAndDirtyKeepSupportFlagLoaded) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||
MockFrontEndProperties feProperties{};
|
||||
feProperties.propertiesSupportLoaded = true;
|
||||
feProperties.frontEndPropertiesSupport.computeDispatchAllWalker = true;
|
||||
@@ -671,13 +677,13 @@ TEST(StreamPropertiesTests, givenSetAllFrontEndPropertiesWhenResetingStateThenRe
|
||||
bool isCooperativeKernel = false;
|
||||
bool disableEuFusion = true;
|
||||
bool disableOverdispatch = true;
|
||||
int32_t engineInstancedDevice = 3;
|
||||
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice);
|
||||
bool engineInstancedDevice = true;
|
||||
feProperties.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice, rootDeviceEnvironment);
|
||||
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());
|
||||
@@ -1433,7 +1439,7 @@ TEST(StreamPropertiesTests, givenAllStreamPropertiesSetWhenAllStreamPropertiesRe
|
||||
bool disableEuFusion = true;
|
||||
bool disableOverdispatch = true;
|
||||
int32_t engineInstancedDevice = 3;
|
||||
globalStreamProperties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice);
|
||||
globalStreamProperties.frontEndState.setPropertiesAll(isCooperativeKernel, disableEuFusion, disableOverdispatch, engineInstancedDevice, rootDeviceEnvironment);
|
||||
|
||||
bool modeSelected = false;
|
||||
bool mediaSamplerDopClockGate = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -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, false, pDevice->getRootDeviceEnvironment());
|
||||
|
||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties);
|
||||
parseCommands<FamilyType>(linearStream);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -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, false, pDevice->getRootDeviceEnvironment());
|
||||
|
||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, streamProperties);
|
||||
parseCommands<FamilyType>(linearStream);
|
||||
|
||||
Reference in New Issue
Block a user