Skip to content

Commit

Permalink
Fix refresh kind methods
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui committed Feb 3, 2025
1 parent 47b5c91 commit 1398894
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend-comparison/src/persistence/system_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl BenchmarkSystemInfo {

fn enumerate_cpus() -> Vec<String> {
let system = sysinfo::System::new_with_specifics(
sysinfo::RefreshKind::new().with_cpu(sysinfo::CpuRefreshKind::everything()),
sysinfo::RefreshKind::nothing().with_cpu(sysinfo::CpuRefreshKind::everything()),
);
let cpu_names: HashSet<String> = system
.cpus()
Expand Down
4 changes: 3 additions & 1 deletion crates/burn-train/src/metric/cpu_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ impl CpuUse {
}

fn refresh(sys: &mut System) -> f64 {
sys.refresh_specifics(RefreshKind::new().with_cpu(CpuRefreshKind::new().with_cpu_usage()));
sys.refresh_specifics(
RefreshKind::nothing().with_cpu(CpuRefreshKind::nothing().with_cpu_usage()),
);

let cpus = sys.cpus();
let num_cpus = cpus.len();
Expand Down

0 comments on commit 1398894

Please sign in to comment.