Move isCooperativeEngineSupported to HwInfoConfig

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2022-05-10 17:38:03 +00:00
committed by Compute-Runtime-Automation
parent fdb763aa7e
commit 0b68fdbe52
14 changed files with 767 additions and 329 deletions

View File

@@ -38,21 +38,17 @@ uint8_t HwHelperHw<Family>::getBarriersCountFromHasBarriers(uint8_t hasBarriers)
return possibleBarriersCounts[hasBarriers];
}
template <>
bool HwHelperHw<Family>::isCooperativeEngineSupported(const HardwareInfo &hwInfo) const {
return (HwInfoConfig::get(hwInfo.platform.eProductFamily)->getSteppingFromHwRevId(hwInfo) >= REVISION_B);
}
template <>
const EngineInstancesContainer HwHelperHw<Family>::getGpgpuEngineInstances(const HardwareInfo &hwInfo) const {
auto defaultEngine = getChosenEngineType(hwInfo);
auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
EngineInstancesContainer engines;
if (hwInfo.featureTable.flags.ftrCCSNode) {
for (uint32_t i = 0; i < hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled; i++) {
engines.push_back({static_cast<aub_stream::EngineType>(i + aub_stream::ENGINE_CCS), EngineUsage::Regular});
if (isCooperativeEngineSupported(hwInfo)) {
if (hwInfoConfig.isCooperativeEngineSupported(hwInfo)) {
engines.push_back({static_cast<aub_stream::EngineType>(i + aub_stream::ENGINE_CCS), EngineUsage::Cooperative});
}
}

View File

@@ -112,3 +112,8 @@ template <>
bool HwInfoConfigHw<gfxProduct>::isAdjustProgrammableIdPreferredSlmSizeRequired(const HardwareInfo &hwInfo) const {
return PVC::isXlA0(hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isCooperativeEngineSupported(const HardwareInfo &hwInfo) const {
return (HwInfoConfig::get(hwInfo.platform.eProductFamily)->getSteppingFromHwRevId(hwInfo) >= REVISION_B);
}