bench: record the memory clock alongside the SM clock (schema 2)
ci / fmt (pull_request) Successful in 36s
bench / build (pull_request) Successful in 1m37s
ci / doc (pull_request) Successful in 1m42s
ci / clippy (pull_request) Successful in 2m5s
bench / measure (pull_request) Successful in 3m48s
ci / test (pull_request) Successful in 7m3s
ci / fmt (pull_request) Successful in 36s
bench / build (pull_request) Successful in 1m37s
ci / doc (pull_request) Successful in 1m42s
ci / clippy (pull_request) Successful in 2m5s
bench / measure (pull_request) Successful in 3m48s
ci / test (pull_request) Successful in 7m3s
The memory clock is a confound like the power limit: locking it at 810 MHz gave +13% on the 4090 at the same watts (lair/quantus#10). Records from before and after that change must be distinguishable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
This commit is contained in:
@@ -93,6 +93,10 @@ struct GpuState {
|
||||
power_limit_w: f64,
|
||||
power_draw_w: f64,
|
||||
sm_clock_mhz: f64,
|
||||
/// The memory clock is a confound like the power limit: the miner never
|
||||
/// touches VRAM, and a card with memory locked low gives the SMs more of
|
||||
/// the same power budget (lair/quantus#10).
|
||||
mem_clock_mhz: f64,
|
||||
temperature_c: f64,
|
||||
}
|
||||
|
||||
@@ -178,7 +182,7 @@ impl Engine {
|
||||
fn nvidia_smi() -> Vec<GpuState> {
|
||||
let out = Command::new("nvidia-smi")
|
||||
.args([
|
||||
"--query-gpu=index,name,driver_version,power.limit,power.draw,clocks.sm,temperature.gpu",
|
||||
"--query-gpu=index,name,driver_version,power.limit,power.draw,clocks.sm,clocks.mem,temperature.gpu",
|
||||
"--format=csv,noheader,nounits",
|
||||
])
|
||||
.output();
|
||||
@@ -194,7 +198,7 @@ fn nvidia_smi() -> Vec<GpuState> {
|
||||
.lines()
|
||||
.filter_map(|l| {
|
||||
let f: Vec<&str> = l.split(',').map(str::trim).collect();
|
||||
if f.len() != 7 {
|
||||
if f.len() != 8 {
|
||||
return None;
|
||||
}
|
||||
let num = |s: &str| s.parse::<f64>().unwrap_or(f64::NAN);
|
||||
@@ -205,7 +209,8 @@ fn nvidia_smi() -> Vec<GpuState> {
|
||||
power_limit_w: num(f[3]),
|
||||
power_draw_w: num(f[4]),
|
||||
sm_clock_mhz: num(f[5]),
|
||||
temperature_c: num(f[6]),
|
||||
mem_clock_mhz: num(f[6]),
|
||||
temperature_c: num(f[7]),
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
@@ -414,7 +419,7 @@ fn main() {
|
||||
};
|
||||
|
||||
let record = Record {
|
||||
schema: 1,
|
||||
schema: 2,
|
||||
timestamp_unix: SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.map(|d| d.as_secs())
|
||||
@@ -461,13 +466,14 @@ fn main() {
|
||||
);
|
||||
for g in &record.gpu_after {
|
||||
println!(
|
||||
"- gpu {} {}: driver {}, limit {:.0} W, draw {:.0} W, sm {:.0} MHz, {:.0} C",
|
||||
"- gpu {} {}: driver {}, limit {:.0} W, draw {:.0} W, sm {:.0} MHz, mem {:.0} MHz, {:.0} C",
|
||||
g.index,
|
||||
g.name,
|
||||
g.driver,
|
||||
g.power_limit_w,
|
||||
g.power_draw_w,
|
||||
g.sm_clock_mhz,
|
||||
g.mem_clock_mhz,
|
||||
g.temperature_c
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user