level-zero v1.0 (2/N)

Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Jaime Arteaga
2020-07-29 02:45:54 -07:00
committed by sys_ocldev
parent e8246a8179
commit 902fc2f6c4
255 changed files with 3200 additions and 12829 deletions

View File

@@ -27,9 +27,9 @@ ze_result_t LinuxTemperatureImp::getSensorTemperature(double *pTemperature) {
// GT temperature could be read via 8th to 15th bit in the value read in temperature
computeTemperature = (computeTemperature >> 8) & 0xff;
if ((zetType == ZET_TEMP_SENSORS_GPU) || (type == ZES_TEMP_SENSORS_GPU)) {
if ((zetType == ZES_TEMP_SENSORS_GPU) || (type == ZES_TEMP_SENSORS_GPU)) {
*pTemperature = static_cast<double>(computeTemperature);
} else if ((zetType == ZET_TEMP_SENSORS_GLOBAL) || (type == ZES_TEMP_SENSORS_GLOBAL)) {
} else if ((zetType == ZES_TEMP_SENSORS_GLOBAL) || (type == ZES_TEMP_SENSORS_GLOBAL)) {
key = "SOC_TEMPERATURES";
result = pPmt->readValue(key, socTemperature);
if (result != ZE_RESULT_SUCCESS) {
@@ -70,10 +70,6 @@ bool LinuxTemperatureImp::isTempModuleSupported() {
return pPmt->isPmtSupported();
}
void LinuxTemperatureImp::setSensorType(zet_temp_sensors_t sensorType) {
zetType = sensorType;
}
void LinuxTemperatureImp::setSensorType(zes_temp_sensors_t sensorType) {
type = sensorType;
}
@@ -83,12 +79,6 @@ LinuxTemperatureImp::LinuxTemperatureImp(OsSysman *pOsSysman) {
pPmt = &pLinuxSysmanImp->getPlatformMonitoringTechAccess();
}
OsTemperature *OsTemperature::create(OsSysman *pOsSysman, zet_temp_sensors_t sensorType) {
LinuxTemperatureImp *pLinuxTemperatureImp = new LinuxTemperatureImp(pOsSysman);
pLinuxTemperatureImp->setSensorType(sensorType);
return static_cast<OsTemperature *>(pLinuxTemperatureImp);
}
OsTemperature *OsTemperature::create(OsSysman *pOsSysman, zes_temp_sensors_t sensorType) {
LinuxTemperatureImp *pLinuxTemperatureImp = new LinuxTemperatureImp(pOsSysman);
pLinuxTemperatureImp->setSensorType(sensorType);

View File

@@ -18,7 +18,6 @@ class LinuxTemperatureImp : public OsTemperature, NEO::NonCopyableOrMovableClass
public:
ze_result_t getSensorTemperature(double *pTemperature) override;
bool isTempModuleSupported() override;
void setSensorType(zet_temp_sensors_t sensorType);
void setSensorType(zes_temp_sensors_t sensorType);
LinuxTemperatureImp(OsSysman *pOsSysman);
LinuxTemperatureImp() = default;
@@ -27,6 +26,6 @@ class LinuxTemperatureImp : public OsTemperature, NEO::NonCopyableOrMovableClass
protected:
PlatformMonitoringTech *pPmt = nullptr;
int zetType = 0x7fffffff;
zes_temp_sensors_t type = ZES_TEMP_SENSORS_FORCE_UINT32;
zes_temp_sensors_t type = ZES_TEMP_SENSORS_GLOBAL;
};
} // namespace L0