From cf2b56598508dc1d8e03afe8e21a1495dcb5db1d Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Thu, 25 Oct 2018 14:13:55 -0500 Subject: [PATCH] Add support for new performance levels Also added tests for new performance levels and clean up some formatting/style issues. [ROCm/rocm_smi_lib commit: 767fa53d8c62332641a25223a33d0f97892a35b7] --- .../rocm-smi-lib/include/rocm_smi/rocm_smi.h | 27 ++++--- .../include/rocm_smi/rocm_smi_common.h | 6 +- .../include/rocm_smi/rocm_smi_device.h | 8 +- .../include/rocm_smi/rocm_smi_main.h | 6 +- .../include/rocm_smi/rocm_smi_monitor.h | 6 +- .../include/rocm_smi/rocm_smi_power_mon.h | 6 +- .../include/rocm_smi/rocm_smi_utils.h | 6 +- projects/rocm-smi-lib/src/rocm_smi.cc | 13 +--- projects/rocm-smi-lib/src/rocm_smi_device.cc | 23 +++++- .../tests/rocm_smi_test/CMakeLists.txt | 1 - .../rocm_smi_test/functional/rsmi_sanity.cc | 77 +++++++++++++------ .../tests/rocm_smi_test/test_base.h | 6 +- .../tests/rocm_smi_test/test_common.h | 6 +- 13 files changed, 122 insertions(+), 69 deletions(-) diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi.h index 4bbfd0d91f..9c353980af 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_H_ #ifdef __cplusplus extern "C" { @@ -94,14 +94,21 @@ typedef enum { RSMI_DEV_PERF_LEVEL_AUTO = 0, //!< Performance level is "auto" RSMI_DEV_PERF_LEVEL_FIRST = RSMI_DEV_PERF_LEVEL_AUTO, - RSMI_DEV_PERF_LEVEL_LOW, //!< Keep PowerPlay levels "low", - //!< regardless of workload - RSMI_DEV_PERF_LEVEL_HIGH, //!< Keep PowerPlay levels "high", - //!< regardless of workload - RSMI_DEV_PERF_LEVEL_MANUAL, //!< Only use values defined by manually - //!< setting the RSMI_CLK_TYPE_SYS speed + RSMI_DEV_PERF_LEVEL_LOW, //!< Keep PowerPlay levels "low", + //!< regardless of workload + RSMI_DEV_PERF_LEVEL_HIGH, //!< Keep PowerPlay levels "high", + //!< regardless of workload + RSMI_DEV_PERF_LEVEL_MANUAL, //!< Only use values defined by manually + //!< setting the RSMI_CLK_TYPE_SYS speed + RSMI_DEV_PERF_LEVEL_STABLE_STD, //!< Stable power state with profiling + //!< clocks + RSMI_DEV_PERF_LEVEL_STABLE_PEAK, //!< Stable power state with peak clocks + RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK, //!< Stable power state with minimum + //!< memory clock + RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK, //!< Stable power state with minimum + //!< system clock - RSMI_DEV_PERF_LEVEL_LAST = RSMI_DEV_PERF_LEVEL_MANUAL, + RSMI_DEV_PERF_LEVEL_LAST = RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK, RSMI_DEV_PERF_LEVEL_UNKNOWN = 0x100 //!< Unknown performance level } rsmi_dev_perf_level; @@ -762,4 +769,4 @@ rsmi_status_string(rsmi_status_t status, const char **status_string); #ifdef __cplusplus } #endif // __cplusplus -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h index 057de8d90d..95db33e8d8 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ #define DBG_FILE_ERROR(STR) \ if (env_->debug_output_bitfield & RSMI_DEBUG_SYSFS_FILE_PATHS) { \ @@ -60,4 +60,4 @@ struct RocmSMI_env_vars { uint32_t debug_output_bitfield; }; -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_COMMON_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_device.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_device.h index f7ec051b4d..807d5f46fd 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_device.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_device.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ #include #include #include @@ -53,6 +53,7 @@ #include "rocm_smi/rocm_smi_monitor.h" #include "rocm_smi/rocm_smi_power_mon.h" #include "rocm_smi/rocm_smi_common.h" +#include "rocm_smi/rocm_smi.h" namespace amd { namespace smi { @@ -84,6 +85,7 @@ class Device { int writeDevInfo(DevInfoTypes type, std::string val); uint32_t index(void) const {return index_;} void set_index(uint32_t index) {index_ = index;} + static rsmi_dev_perf_level perfLvlStrToEnum(std::string s); private: std::shared_ptr monitor_; @@ -100,4 +102,4 @@ class Device { } // namespace smi } // namespace amd -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_DEVICE_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_main.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_main.h index cf5ecba0e6..9aed22df11 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_main.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_main.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ #include #include @@ -95,4 +95,4 @@ class RocmSMI { } // namespace smi } // namespace amd -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_MAIN_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_monitor.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_monitor.h index 0e60b789a2..68ca4921e2 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_monitor.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_monitor.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ #include #include @@ -97,4 +97,4 @@ class Monitor { } // namespace smi } // namespace amd -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_MONITOR_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_power_mon.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_power_mon.h index ea693d3878..fff1bbb819 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_power_mon.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_power_mon.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ #include #include @@ -78,4 +78,4 @@ class PowerMon { } // namespace smi } // namespace amd -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_POWER_MON_H_ diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_utils.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_utils.h index ceaae2daff..57c0754536 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_utils.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_utils.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ -#define ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ +#ifndef INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ +#define INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ #include #include @@ -68,4 +68,4 @@ int WriteSysfsStr(std::string path, std::string val); } // namespace smi } // namespace amd -#endif // ROCM_SMI_LIB_INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ +#endif // INCLUDE_ROCM_SMI_ROCM_SMI_UTILS_H_ diff --git a/projects/rocm-smi-lib/src/rocm_smi.cc b/projects/rocm-smi-lib/src/rocm_smi.cc index 3b15b12d40..6678b2644f 100755 --- a/projects/rocm-smi-lib/src/rocm_smi.cc +++ b/projects/rocm-smi-lib/src/rocm_smi.cc @@ -364,17 +364,8 @@ rsmi_dev_perf_level_get(uint32_t dv_ind, rsmi_dev_perf_level *perf) { return ret; } - if (val_str == "auto") { - *perf = RSMI_DEV_PERF_LEVEL_AUTO; - } else if (val_str == "low") { - *perf = RSMI_DEV_PERF_LEVEL_LOW; - } else if (val_str == "high") { - *perf = RSMI_DEV_PERF_LEVEL_HIGH; - } else if (val_str == "manual") { - *perf = RSMI_DEV_PERF_LEVEL_MANUAL; - } else { - *perf = RSMI_DEV_PERF_LEVEL_UNKNOWN; - } + *perf = amd::smi::Device::perfLvlStrToEnum(val_str); + return ret; CATCH } diff --git a/projects/rocm-smi-lib/src/rocm_smi_device.cc b/projects/rocm-smi-lib/src/rocm_smi_device.cc index 853635da55..1f1a63cdc9 100755 --- a/projects/rocm-smi-lib/src/rocm_smi_device.cc +++ b/projects/rocm-smi-lib/src/rocm_smi_device.cc @@ -69,6 +69,10 @@ static const char *kDevPerfLevelAutoStr = "auto"; static const char *kDevPerfLevelLowStr = "low"; static const char *kDevPerfLevelHighStr = "high"; static const char *kDevPerfLevelManualStr = "manual"; +static const char *kDevPerfLevelStandardStr = "profile_standard"; +static const char *kDevPerfLevelMinMClkStr = "profile_min_mclk"; +static const char *kDevPerfLevelMinSClkStr = "profile_min_sclk"; +static const char *kDevPerfLevelPeakStr = "profile_peak"; static const char *kDevPerfLevelUnknownStr = "unknown"; static const std::map kDevAttribNameMap = { @@ -85,6 +89,11 @@ static const std::map kDevPerfLvlMap = { {RSMI_DEV_PERF_LEVEL_LOW, kDevPerfLevelLowStr}, {RSMI_DEV_PERF_LEVEL_HIGH, kDevPerfLevelHighStr}, {RSMI_DEV_PERF_LEVEL_MANUAL, kDevPerfLevelManualStr}, + {RSMI_DEV_PERF_LEVEL_STABLE_STD, kDevPerfLevelStandardStr}, + {RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK, kDevPerfLevelMinMClkStr}, + {RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK, kDevPerfLevelMinSClkStr}, + {RSMI_DEV_PERF_LEVEL_STABLE_PEAK, kDevPerfLevelPeakStr}, + {RSMI_DEV_PERF_LEVEL_UNKNOWN, kDevPerfLevelUnknownStr}, }; @@ -157,6 +166,18 @@ int Device::writeDevInfoStr(DevInfoTypes type, std::string valStr) { return 0; } +rsmi_dev_perf_level Device::perfLvlStrToEnum(std::string s) { + rsmi_dev_perf_level pl; + + for (pl = RSMI_DEV_PERF_LEVEL_FIRST; pl <= RSMI_DEV_PERF_LEVEL_LAST; ) { + if (s == kDevPerfLvlMap.at(pl)) { + return pl; + } + pl = static_cast(static_cast(pl) + 1); + } + return RSMI_DEV_PERF_LEVEL_UNKNOWN; +} + int Device::writeDevInfo(DevInfoTypes type, uint64_t val) { switch (type) { // The caller is responsible for making sure "val" is within a valid range @@ -165,7 +186,7 @@ int Device::writeDevInfo(DevInfoTypes type, uint64_t val) { return writeDevInfoStr(type, std::to_string(val)); break; - case kDevPerfLevel: // string: "auto", "low", "high", "manual" + case kDevPerfLevel: // string: "auto", "low", "high", "manual", ... return writeDevInfoStr(type, kDevPerfLvlMap.at((rsmi_dev_perf_level)val)); break; diff --git a/projects/rocm-smi-lib/tests/rocm_smi_test/CMakeLists.txt b/projects/rocm-smi-lib/tests/rocm_smi_test/CMakeLists.txt index 4181b8d5fe..112872e47d 100755 --- a/projects/rocm-smi-lib/tests/rocm_smi_test/CMakeLists.txt +++ b/projects/rocm-smi-lib/tests/rocm_smi_test/CMakeLists.txt @@ -198,7 +198,6 @@ aux_source_directory(${RSMITST_ROOT} rsmitstSources) # Header file include path include_directories(${RSMI_INC_DIR}) -include_directories(${RSMITST_ROOT}) include_directories(${RSMITST_ROOT}/..) include_directories(${RSMITST_ROOT}/gtest/include) diff --git a/projects/rocm-smi-lib/tests/rocm_smi_test/functional/rsmi_sanity.cc b/projects/rocm-smi-lib/tests/rocm_smi_test/functional/rsmi_sanity.cc index 301cc2cdf7..d5c88de4ce 100755 --- a/projects/rocm-smi-lib/tests/rocm_smi_test/functional/rsmi_sanity.cc +++ b/projects/rocm-smi-lib/tests/rocm_smi_test/functional/rsmi_sanity.cc @@ -48,9 +48,10 @@ #include #include #include +#include #include "rocm_smi/rocm_smi.h" -#include "functional/rsmi_sanity.h" +#include "rocm_smi_test/functional/rsmi_sanity.h" #include "gtest/gtest.h" static const uint32_t kNumBufferElements = 256; @@ -86,7 +87,7 @@ static uint32_t gVerbosity = 3; } \ } -#define ALT_ASSERT_EQ(A,B) { \ +#define ALT_ASSERT_EQ(A, B) { \ if ((A) != (B)) { \ std::cout << "ASSERT failure: Expected " << #A << " == " << #B << \ ", but got " << #A << " = " << (A) << ", and " << #B << " = " << \ @@ -334,6 +335,21 @@ static rsmi_status_t test_set_fan_speed(uint32_t dv_ind) { return ret; } +static const std::map kDevPerfLvlNameMap = { + {RSMI_DEV_PERF_LEVEL_AUTO, "RSMI_DEV_PERF_LEVEL_AUTO"}, + {RSMI_DEV_PERF_LEVEL_LOW, "RSMI_DEV_PERF_LEVEL_LOW"}, + {RSMI_DEV_PERF_LEVEL_HIGH, "RSMI_DEV_PERF_LEVEL_HIGH"}, + {RSMI_DEV_PERF_LEVEL_MANUAL, "RSMI_DEV_PERF_LEVEL_MANUAL"}, + {RSMI_DEV_PERF_LEVEL_STABLE_STD, "RSMI_DEV_PERF_LEVEL_STABLE_STD"}, + {RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK, + "RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK"}, + {RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK, + "RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK"}, + {RSMI_DEV_PERF_LEVEL_STABLE_PEAK, "RSMI_DEV_PERF_LEVEL_STABLE_PEAK"}, + + {RSMI_DEV_PERF_LEVEL_UNKNOWN, "RSMI_DEV_PERF_LEVEL_UNKNOWN"}, +}; + static rsmi_status_t test_set_perf_level(uint32_t dv_ind) { rsmi_status_t ret; @@ -345,30 +361,41 @@ static rsmi_status_t test_set_perf_level(uint32_t dv_ind) { CHK_ERR_RET(ret) IF_VERB(STANDARD) { - std::cout << "\t**Original Perf Level:" << (uint32_t)orig_pfl << std::endl; + std::cout << "\t**Original Perf Level:" << + kDevPerfLvlNameMap.at(orig_pfl) << std::endl; } - pfl = (rsmi_dev_perf_level)((orig_pfl + 1) % (RSMI_DEV_PERF_LEVEL_LAST + 1)); + uint32_t pfl_i = static_cast(RSMI_DEV_PERF_LEVEL_FIRST); + for (; pfl_i <= static_cast(RSMI_DEV_PERF_LEVEL_LAST); pfl_i++) { + if (pfl_i == static_cast(orig_pfl)) { + continue; + } - IF_VERB(STANDARD) { - std::cout << "Set Performance Level to " << (uint32_t)pfl << " ..." << - std::endl; - } - ret = rsmi_dev_perf_level_set(dv_ind, pfl); - CHK_ERR_RET(ret) - ret = rsmi_dev_perf_level_get(dv_ind, &pfl); - CHK_ERR_RET(ret) - IF_VERB(STANDARD) { - std::cout << "\t**New Perf Level:" << (uint32_t)pfl << std::endl; - std::cout << "Reset Perf level to " << orig_pfl << " ..." << std::endl; + IF_VERB(STANDARD) { + std::cout << "Set Performance Level to " << + kDevPerfLvlNameMap.at(static_cast(pfl_i)) << + " ..." << std::endl; + } + ret = rsmi_dev_perf_level_set(dv_ind, + static_cast(pfl_i)); + CHK_ERR_RET(ret) + ret = rsmi_dev_perf_level_get(dv_ind, &pfl); + CHK_ERR_RET(ret) + IF_VERB(STANDARD) { + std::cout << "\t**New Perf Level:" << kDevPerfLvlNameMap.at(pfl) << + std::endl; + } } + std::cout << "Reset Perf level to " << kDevPerfLvlNameMap.at(orig_pfl) << + " ..." << std::endl; ret = rsmi_dev_perf_level_set(dv_ind, orig_pfl); CHK_ERR_RET(ret) ret = rsmi_dev_perf_level_get(dv_ind, &pfl); CHK_ERR_RET(ret) IF_VERB(STANDARD) { - std::cout << "\t**New Perf Level:" << (uint32_t)pfl << std::endl; + std::cout << "\t**New Perf Level:" << kDevPerfLvlNameMap.at(pfl) << + std::endl; } return ret; } @@ -553,14 +580,20 @@ void TestSanity::Run(void) { print_temp_metric(RSMI_TEMP_CURRENT, "Current Temp."); print_temp_metric(RSMI_TEMP_MAX, "Temperature max value"); print_temp_metric(RSMI_TEMP_MIN, "Temperature min value"); - print_temp_metric(RSMI_TEMP_MAX_HYST, "Temperature hysteresis value for max limit"); - print_temp_metric(RSMI_TEMP_MIN_HYST, "Temperature hysteresis value for min limit"); + print_temp_metric(RSMI_TEMP_MAX_HYST, + "Temperature hysteresis value for max limit"); + print_temp_metric(RSMI_TEMP_MIN_HYST, + "Temperature hysteresis value for min limit"); print_temp_metric(RSMI_TEMP_CRITICAL, "Temperature critical max value"); - print_temp_metric(RSMI_TEMP_CRITICAL_HYST, "Temperature hysteresis value for critical limit"); - print_temp_metric(RSMI_TEMP_EMERGENCY, "Temperature emergency max value"); - print_temp_metric(RSMI_TEMP_EMERGENCY_HYST, "Temperature hysteresis value for emergency limit"); + print_temp_metric(RSMI_TEMP_CRITICAL_HYST, + "Temperature hysteresis value for critical limit"); + print_temp_metric(RSMI_TEMP_EMERGENCY, + "Temperature emergency max value"); + print_temp_metric(RSMI_TEMP_EMERGENCY_HYST, + "Temperature hysteresis value for emergency limit"); print_temp_metric(RSMI_TEMP_CRIT_MIN, "Temperature critical min value"); - print_temp_metric(RSMI_TEMP_CRIT_MIN_HYST, "Temperature hysteresis value for critical min value"); + print_temp_metric(RSMI_TEMP_CRIT_MIN_HYST, + "Temperature hysteresis value for critical min value"); print_temp_metric(RSMI_TEMP_OFFSET, "Temperature offset"); print_temp_metric(RSMI_TEMP_LOWEST, "Historical minimum temperature"); print_temp_metric(RSMI_TEMP_HIGHEST, "Historical maximum temperature"); diff --git a/projects/rocm-smi-lib/tests/rocm_smi_test/test_base.h b/projects/rocm-smi-lib/tests/rocm_smi_test/test_base.h index 7f0afa7830..4b1a6f56ba 100755 --- a/projects/rocm-smi-lib/tests/rocm_smi_test/test_base.h +++ b/projects/rocm-smi-lib/tests/rocm_smi_test/test_base.h @@ -42,8 +42,8 @@ * DEALINGS WITH THE SOFTWARE. * */ -#ifndef ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_BASE_H_ -#define ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_BASE_H_ +#ifndef TESTS_ROCM_SMI_TEST_TEST_BASE_H_ +#define TESTS_ROCM_SMI_TEST_TEST_BASE_H_ #include @@ -102,4 +102,4 @@ class TestBase { uint32_t verbosity_; ///< How much additional output to produce }; -#endif // ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_BASE_H_ +#endif // TESTS_ROCM_SMI_TEST_TEST_BASE_H_ diff --git a/projects/rocm-smi-lib/tests/rocm_smi_test/test_common.h b/projects/rocm-smi-lib/tests/rocm_smi_test/test_common.h index e41f01cede..8512ffe2f9 100755 --- a/projects/rocm-smi-lib/tests/rocm_smi_test/test_common.h +++ b/projects/rocm-smi-lib/tests/rocm_smi_test/test_common.h @@ -43,8 +43,8 @@ * */ -#ifndef ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_COMMON_H_ -#define ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_COMMON_H_ +#ifndef TESTS_ROCM_SMI_TEST_TEST_COMMON_H_ +#define TESTS_ROCM_SMI_TEST_TEST_COMMON_H_ #include #include @@ -63,4 +63,4 @@ uint32_t ProcessCmdline(RSMITstGlobals* test, int arg_cnt, char** arg_list); void DumpMonitorInfo(const TestBase *test); #endif -#endif // ROCM_SMI_LIB_TESTS_ROCM_SMI_TEST_TEST_COMMON_H_ +#endif // TESTS_ROCM_SMI_TEST_TEST_COMMON_H_