Summary
all-smi 0.20.1 fails to compile against libamdgpu_top 0.11.4 because the upstream crate renamed FdInfoStat::get_all_proc_usage to FdInfoStat::update_proc_usage in a patch release. Cargo's caret semver resolves libamdgpu_top = "0.11.3" to 0.11.4 (released 2026-04-23), breaking all fresh builds on Linux glibc targets that pick up AMD GPU support.
Background
The Cargo.toml declares the AMD-target dependency as:
[target.'cfg(all(target_os = "linux", not(target_env = "musl")))'.dependencies]
libamdgpu_top = "0.11.3"
Cargo treats "0.11.3" as ^0.11.3 (i.e., >=0.11.3, <0.12.0). Once libamdgpu_top 0.11.4 was published on 2026-04-23, fresh resolutions select 0.11.4, and the call at src/device/readers/amd.rs fails to compile:
error[E0599]: no method named `get_all_proc_usage` found for struct `FdInfoStat` in the current scope
--> src/device/readers/amd.rs:572:20
help: there is a method `update_proc_usage` with a similar name
libamdgpu_top 0.11.4 contains additional internal renames (the pid_map field became pre_proc_usage_map, and get_cpu_time changed signature), but we do not consume those names — only get_all_proc_usage is reachable from our code.
This is upstream's failure to honor semver: the 0.11.x train shipped a public-API rename in a patch bump rather than a 0.12.0 minor bump. We need to both adapt to the rename and harden our version constraint so a future patch surprise does not recur.
Proposed Solution
- Adopt the new method name. Update the only call site at
src/device/readers/amd.rs:572 from fdinfo.get_all_proc_usage(&proc_index); to fdinfo.update_proc_usage(&proc_index);.
- Pin the dependency exactly. Change
libamdgpu_top = "0.11.3" to libamdgpu_top = "=0.11.4" in Cargo.toml. The exact-version requirement prevents Cargo from silently picking up a future patch that breaks the API again. Re-evaluate the pin when upstream restores semver discipline or when we are willing to verify each new release.
- Regenerate
Cargo.lock and run cargo build --release on a Linux glibc target to confirm AMD GPU support compiles.
Implementation Notes
- Affected file:
src/device/readers/amd.rs (one call site).
- Affected manifest:
Cargo.toml (single dependency line under the Linux-glibc target table).
- The fields we read after the call (
fdinfo.proc_usage, proc_usage.usage.vram_usage, proc_usage.usage.gtt_usage) remain public and unchanged in 0.11.4 — no further code changes required.
- musl and non-Linux targets are unaffected: the dependency block is gated on
cfg(all(target_os = "linux", not(target_env = "musl"))).
- After this fix, library consumers (e.g.,
all-smi = { version = "0.20", default-features = false, optional = true }) will resolve cleanly because the exact pin removes the version-resolution surprise.
- A patch release (e.g.,
0.20.2) should follow the merge so downstream crates pick up the fix without needing to wait for the next minor.
Acceptance Criteria
Original Suggestion
Title: Build fails on get_all_proc_usage in amd.rs
error[E0599]: no method named `get_all_proc_usage` found for struct `FdInfoStat` in the current scope
--> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/all-smi-0.20.1/src/device/readers/amd.rs:556:20
|
556 | fdinfo.get_all_proc_usage(&proc_index);
| ^^^^^^^^^^^^^^^^^^
|
help: there is a method `update_proc_usage` with a similar name
|
556 - fdinfo.get_all_proc_usage(&proc_index);
556 + fdinfo.update_proc_usage(&proc_index);
|
For more information about this error, try `rustc --explain E0599`.
with
all-smi = { version = "0.20", default-features = false, optional = true }
in the Cargo.toml of the library trying to use this code
Summary
all-smi0.20.1 fails to compile againstlibamdgpu_top0.11.4 because the upstream crate renamedFdInfoStat::get_all_proc_usagetoFdInfoStat::update_proc_usagein a patch release. Cargo's caret semver resolveslibamdgpu_top = "0.11.3"to 0.11.4 (released 2026-04-23), breaking all fresh builds on Linux glibc targets that pick up AMD GPU support.Background
The
Cargo.tomldeclares the AMD-target dependency as:Cargo treats
"0.11.3"as^0.11.3(i.e.,>=0.11.3, <0.12.0). Oncelibamdgpu_top0.11.4 was published on 2026-04-23, fresh resolutions select 0.11.4, and the call atsrc/device/readers/amd.rsfails to compile:libamdgpu_top0.11.4 contains additional internal renames (thepid_mapfield becamepre_proc_usage_map, andget_cpu_timechanged signature), but we do not consume those names — onlyget_all_proc_usageis reachable from our code.This is upstream's failure to honor semver: the 0.11.x train shipped a public-API rename in a patch bump rather than a
0.12.0minor bump. We need to both adapt to the rename and harden our version constraint so a future patch surprise does not recur.Proposed Solution
src/device/readers/amd.rs:572fromfdinfo.get_all_proc_usage(&proc_index);tofdinfo.update_proc_usage(&proc_index);.libamdgpu_top = "0.11.3"tolibamdgpu_top = "=0.11.4"inCargo.toml. The exact-version requirement prevents Cargo from silently picking up a future patch that breaks the API again. Re-evaluate the pin when upstream restores semver discipline or when we are willing to verify each new release.Cargo.lockand runcargo build --releaseon a Linux glibc target to confirm AMD GPU support compiles.Implementation Notes
src/device/readers/amd.rs(one call site).Cargo.toml(single dependency line under the Linux-glibc target table).fdinfo.proc_usage,proc_usage.usage.vram_usage,proc_usage.usage.gtt_usage) remain public and unchanged in 0.11.4 — no further code changes required.cfg(all(target_os = "linux", not(target_env = "musl"))).all-smi = { version = "0.20", default-features = false, optional = true }) will resolve cleanly because the exact pin removes the version-resolution surprise.0.20.2) should follow the merge so downstream crates pick up the fix without needing to wait for the next minor.Acceptance Criteria
Cargo.tomlpinslibamdgpu_topto=0.11.4under the Linux-glibc target table.src/device/readers/amd.rscallsupdate_proc_usageinstead ofget_all_proc_usage.cargo build --releasesucceeds on a Linux glibc target with the AMD reader compiled in.cargo clippypasses with no new warnings on the AMD reader.cargo build --releasecontinues to succeed on macOS, musl, and Windows targets (where this dependency is not pulled in).Original Suggestion
Title: Build fails on get_all_proc_usage in amd.rs
with
in the Cargo.toml of the library trying to use this code