Documentation updates for AMDSMI_GPU_METRICS_CACHE_MS (#564)

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
This commit is contained in:
Pryor, Adam
2025-08-05 19:58:37 -05:00
committed by GitHub
parent 4044d1da41
commit 2dc2e12a97
6 changed files with 58 additions and 1 deletions
+7 -1
View File
@@ -1104,7 +1104,7 @@ namespace {
// Keep 1 cache map, with an entry for each gpu
std::unordered_map<std::string, GpuMetricsCache> g_gpu_metrics_cache_map;
static const std::chrono::milliseconds kGpuMetricsCacheDuration(
read_env_ms("AMDSMI_GPU_METRICS_CACHE_MS", 100)
read_env_ms("AMDSMI_GPU_METRICS_CACHE_MS", 1)
);
}
@@ -1113,6 +1113,12 @@ int Device::readDevInfoBinary(DevInfoTypes type, std::size_t b_size,
auto sysfs_path = path_;
std::ostringstream ss;
ss << __PRETTY_FUNCTION__
<< " | AMDSMI_GPU_METRICS_CACHE_MS = "
<< kGpuMetricsCacheDuration.count()
<< " ms";
LOG_DEBUG(ss);
// Size will either be 4, or 3872+. When 4, it's only reading from the header.
// If this header read is inconsequential, we could only cache full read.
// However, it seems reading the gpu_metrics sysfs in any capacity