mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
correct and unify programming of front end disable overdispatch property support
Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
f6bcdfafaa
commit
81f2d04f5a
@ -365,8 +365,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, whenUpdateStreamPropertiesIsCalledThenR
|
||||
EXPECT_EQ(-1, pCommandList->finalStreamState.frontEndState.disableOverdispatch.value);
|
||||
|
||||
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
int32_t expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*defaultHwInfo) ? 1 : 0;
|
||||
expectedDisableOverdispatch = hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport() ? expectedDisableOverdispatch : -1;
|
||||
int32_t expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*defaultHwInfo) ? 1 : -1;
|
||||
|
||||
pCommandList->updateStreamProperties(kernel, false);
|
||||
EXPECT_EQ(expectedDisableOverdispatch, pCommandList->requiredStreamState.frontEndState.disableOverdispatch.value);
|
||||
|
@ -645,6 +645,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, whenProgramVFEStateIsCalledThenCorrectCom
|
||||
pHwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, *pHwInfo);
|
||||
|
||||
{
|
||||
mockCsr->getStreamProperties().frontEndState = {};
|
||||
auto flags = DispatchFlagsHelper::createDefaultDispatchFlags();
|
||||
LinearStream commandStream{&memory, sizeof(memory)};
|
||||
mockCsr->mediaVfeStateDirty = true;
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||
@ -94,13 +95,20 @@ XEHPTEST_F(XeHPHwHelperTest, givenXeHPMultiConfigWhenAllowCompressionIsCalledThe
|
||||
}
|
||||
|
||||
XEHPTEST_F(XeHPHwInfoConfig, givenHwInfoConfigWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hwInfo);
|
||||
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
|
||||
|
||||
FrontEndPropertiesSupport fePropertiesSupport{};
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
|
||||
EXPECT_FALSE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
|
||||
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
}
|
||||
|
||||
XEHPTEST_F(XeHPHwInfoConfig, givenHwInfoConfigWithMultipleCSSWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledThenTrueIsReturned) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
||||
@ -28,12 +29,19 @@ PVCTEST_F(PvcHwInfoConfig, givenPvcWhenCallingGetDeviceMemoryNameThenHbmIsReturn
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcHwInfoConfig, givenHwInfoConfigWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
|
||||
|
||||
FrontEndPropertiesSupport fePropertiesSupport{};
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
|
||||
EXPECT_FALSE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
|
||||
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcHwInfoConfig, givenHwInfoConfigWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenTrueIsReturned) {
|
||||
|
@ -218,7 +218,7 @@ std::string HwInfoConfigHw<gfxProduct>::getDeviceMemoryName() const {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
return getFrontEndPropertyDisableOverDispatchSupport();
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
@ -622,7 +622,7 @@ template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) {
|
||||
propertiesSupport.computeDispatchAllWalker = isComputeDispatchAllWalkerEnableInCfeStateRequired(hwInfo);
|
||||
propertiesSupport.disableEuFusion = getFrontEndPropertyDisableEuFusionSupport();
|
||||
propertiesSupport.disableOverdispatch = getFrontEndPropertyDisableOverDispatchSupport();
|
||||
propertiesSupport.disableOverdispatch = isDisableOverdispatchAvailable(hwInfo);
|
||||
propertiesSupport.singleSliceDispatchCcsMode = getFrontEndPropertySingleSliceDispatchCcsModeSupport();
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ HWTEST_F(HwInfoConfigTest, WhenFillingFrontEndPropertiesSupportThenExpectUseCorr
|
||||
hwInfoConfig->fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport, pInHwInfo);
|
||||
EXPECT_EQ(hwInfoConfig->isComputeDispatchAllWalkerEnableInCfeStateRequired(pInHwInfo), frontEndPropertiesSupport.computeDispatchAllWalker);
|
||||
EXPECT_EQ(hwInfoConfig->getFrontEndPropertyDisableEuFusionSupport(), frontEndPropertiesSupport.disableEuFusion);
|
||||
EXPECT_EQ(hwInfoConfig->getFrontEndPropertyDisableOverDispatchSupport(), frontEndPropertiesSupport.disableOverdispatch);
|
||||
EXPECT_EQ(hwInfoConfig->isDisableOverdispatchAvailable(pInHwInfo), frontEndPropertiesSupport.disableOverdispatch);
|
||||
EXPECT_EQ(hwInfoConfig->getFrontEndPropertySingleSliceDispatchCcsModeSupport(), frontEndPropertiesSupport.singleSliceDispatchCcsMode);
|
||||
}
|
||||
|
||||
|
@ -55,37 +55,64 @@ DG2TEST_F(HwInfoConfigTestDg2, givenDg2ConfigWhenSetupHardwareInfoThenGtSystemIn
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenG10DevIdWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
myHwInfo.platform.usDeviceID = dg2G10DeviceIds[0];
|
||||
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
|
||||
FrontEndPropertiesSupport fePropertiesSupport{};
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_FALSE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenG11DevIdWhenIsDisableOverdispatchAvailableCalledThenTrueReturnedForAllSteppings) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
FrontEndPropertiesSupport fePropertiesSupport{};
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
|
||||
myHwInfo.platform.usDeviceID = dg2G11DeviceIds[0];
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_C, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenG12DevIdWhenIsDisableOverdispatchAvailableCalledThenTrueReturnedForAllSteppings) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
FrontEndPropertiesSupport fePropertiesSupport{};
|
||||
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
|
||||
myHwInfo.platform.usDeviceID = dg2G12DeviceIds[0];
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
|
||||
myHwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_C, myHwInfo);
|
||||
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(myHwInfo));
|
||||
hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport, myHwInfo);
|
||||
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, whenAdjustingDefaultEngineTypeThenSelectEngineTypeBasedOnRevisionId) {
|
||||
|
Reference in New Issue
Block a user