refactor(sysman): Add SysmanProductHelper In SysmanKmdInterface Creation

- The SysmanProductHelper Pointer is used in the SysmanKmdInterface
instance creation.
- The filename for the critical power limit is fetched via the
SysmanProductHelper instance.
- The native unit for the critical limit is fetched via the
SysmanProductHelper instance.

Related-To: NEO-11813, NEO-11811

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
Bari, Pratik
2024-06-26 14:20:43 +00:00
committed by Compute-Runtime-Automation
parent c8e1ba9683
commit 4aaf201d9e
34 changed files with 198 additions and 156 deletions

View File

@@ -40,7 +40,7 @@ static ze_result_t readSchedulerValueFromSysfs(SysfsName schedulerSysfsName,
}
result = pSysmanImp->getSysfsAccess().read(path, readValue);
if (result == ZE_RESULT_SUCCESS) {
pSysmanKmdInterface->convertSysfsValueUnit(SysmanKmdInterface::micro,
pSysmanKmdInterface->convertSysfsValueUnit(SysfsValueUnit::micro,
pSysmanKmdInterface->getNativeUnit(schedulerSysfsName),
readValue, readValue);
readValueVec[i] = readValue;
@@ -79,7 +79,7 @@ static ze_result_t writeSchedulerValueToSysfs(SysfsName schedulerSysfsName,
auto pSysmanKmdInterface = pSysmanImp->getSysmanKmdInterface();
auto sysfsName = pSysmanKmdInterface->getSysfsFilePath(schedulerSysfsName, subdeviceId, false);
pSysmanKmdInterface->convertSysfsValueUnit(pSysmanKmdInterface->getNativeUnit(schedulerSysfsName),
SysmanKmdInterface::micro, writeValue, writeValue);
SysfsValueUnit::micro, writeValue, writeValue);
auto engineBasePath = pSysmanKmdInterface->getEngineBasePath(subdeviceId);
for (const auto &engineName : listOfEngines) {
auto path = engineBasePath + "/" + engineName + "/" + sysfsName;