fix: check RCS support in OS agnostic path

Related-To: HSD-18035019656

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-11-16 11:17:43 +00:00
committed by Compute-Runtime-Automation
parent 140532f8b6
commit 2981c78d34
2 changed files with 16 additions and 0 deletions

View File

@@ -97,6 +97,7 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
hardwareInfo->ipVersion.value = compilerProductHelper.getHwIpVersion(*hardwareInfo);
rootDeviceEnvironment.initReleaseHelper();
rootDeviceEnvironment.setRcsExposure();
if (DebugManager.flags.OverrideGpuAddressSpace.get() != -1) {
hardwareInfo->capabilityTable.gpuAddressSpace = maxNBitValue(static_cast<uint64_t>(DebugManager.flags.OverrideGpuAddressSpace.get()));

View File

@@ -106,3 +106,18 @@ TEST_F(DeviceFactoryTests, givenHwIpVersionAndProductFamilyOverrideWhenPrepareDe
EXPECT_TRUE(success);
EXPECT_EQ(0x1234u, executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->ipVersion.value);
}
TEST_F(DeviceFactoryTests, givenDisabledRcsWhenPrepareDeviceEnvironmentsCalledThenSetFtrFlag) {
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(executionEnvironment);
ASSERT_TRUE(success);
auto releaseHelper = executionEnvironment.rootDeviceEnvironments[0]->getReleaseHelper();
if (releaseHelper == nullptr) {
EXPECT_TRUE(executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->featureTable.flags.ftrRcsNode);
} else {
EXPECT_NE(executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo()->featureTable.flags.ftrRcsNode, releaseHelper->isRcsExposureDisabled());
}
}