mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix(sysman): enables memory health indicator for supported platforms only
Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
798c068ed1
commit
0ebaf7e1e2
@@ -52,6 +52,7 @@ class SysmanProductHelper {
|
||||
// Memory
|
||||
virtual ze_result_t getMemoryProperties(zes_mem_properties_t *pProperties, LinuxSysmanImp *pLinuxSysmanImp, NEO::Drm *pDrm, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subDeviceId, bool isSubdevice) = 0;
|
||||
virtual ze_result_t getMemoryBandwidth(zes_mem_bandwidth_t *pBandwidth, PlatformMonitoringTech *pPmt, SysmanDeviceImp *pDevice, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subdeviceId) = 0;
|
||||
virtual void getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) = 0;
|
||||
|
||||
// Performance
|
||||
virtual void getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) = 0;
|
||||
|
||||
@@ -29,6 +29,7 @@ class SysmanProductHelperHw : public SysmanProductHelper {
|
||||
// Memory
|
||||
ze_result_t getMemoryProperties(zes_mem_properties_t *pProperties, LinuxSysmanImp *pLinuxSysmanImp, NEO::Drm *pDrm, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subDeviceId, bool isSubdevice) override;
|
||||
ze_result_t getMemoryBandwidth(zes_mem_bandwidth_t *pBandwidth, PlatformMonitoringTech *pPmt, SysmanDeviceImp *pDevice, SysmanKmdInterface *pSysmanKmdInterface, uint32_t subdeviceId) override;
|
||||
void getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) override;
|
||||
|
||||
// Performance
|
||||
void getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) override;
|
||||
|
||||
@@ -92,6 +92,11 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryBandwidth(zes_mem_bandwi
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void SysmanProductHelperHw<gfxProduct>::getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) {
|
||||
*health = ZES_MEM_HEALTH_UNKNOWN;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void SysmanProductHelperHw<gfxProduct>::getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) {
|
||||
if (performanceFactor > halfOfMaxPerformanceFactor) {
|
||||
|
||||
@@ -190,6 +190,14 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryBandwidth(zes_mem_bandwi
|
||||
return getHBMBandwidth(pBandwidth, pPmt, pDevice, pSysmanKmdInterface, subdeviceId);
|
||||
}
|
||||
|
||||
template <>
|
||||
void SysmanProductHelperHw<gfxProduct>::getMemoryHealthIndicator(FirmwareUtil *pFwInterface, zes_mem_health_t *health) {
|
||||
*health = ZES_MEM_HEALTH_UNKNOWN;
|
||||
if (pFwInterface != nullptr) {
|
||||
pFwInterface->fwGetMemoryHealthIndicator(health);
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
void SysmanProductHelperHw<gfxProduct>::getMediaPerformanceFactorMultiplier(const double performanceFactor, double *pMultiplier) {
|
||||
if (performanceFactor > halfOfMaxPerformanceFactor) {
|
||||
|
||||
Reference in New Issue
Block a user