Add debug variable to control whether large grf should be programmed with SCM

Add debug variable ForceGrfNumProgrammingWithScm.
Do not update large grf value in StreamProperties when unnecessary.

Related-To: NEO-6659

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-04-29 14:33:41 +00:00
committed by Compute-Runtime-Automation
parent 6e8cabdce5
commit 3413039a69
15 changed files with 58 additions and 14 deletions

View File

@@ -7,6 +7,7 @@
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
@@ -51,4 +52,20 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenGetThreadEuRatioForScratchThen8I
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_NE(hwInfoConfig.getProductConfigFromHwInfo(*defaultHwInfo), UNKNOWN_ISA);
}
}
HWTEST_F(HwInfoConfigTest, whenIsGrfNumReportedWithScmIsQueriedThenTrueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig.isGrfNumReportedWithScm());
}
HWTEST_F(HwInfoConfigTest, givenForceGrfNumProgrammingWithScmFlagSetWhenIsGrfNumReportedWithScmIsQueriedThenCorrectValueIsReturned) {
DebugManagerStateRestore restorer;
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
DebugManager.flags.ForceGrfNumProgrammingWithScm.set(0);
EXPECT_FALSE(hwInfoConfig.isGrfNumReportedWithScm());
DebugManager.flags.ForceGrfNumProgrammingWithScm.set(1);
EXPECT_TRUE(hwInfoConfig.isGrfNumReportedWithScm());
}