fix(agent): box the NVML handle variant (clippy large_enum_variant)
CI clippy runs with -D warnings; Nvml is a large struct next to the 16-byte Box<dyn Gpu> variant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ mod worker {
|
|||||||
/// ship only libnvidia-ml.so.1 (the unversioned symlink lives in the
|
/// ship only libnvidia-ml.so.1 (the unversioned symlink lives in the
|
||||||
/// dev package), so gfxinfo's default dlopen fails there even though
|
/// dev package), so gfxinfo's default dlopen fails there even though
|
||||||
/// the driver is fully functional.
|
/// the driver is fully functional.
|
||||||
Nvml(nvml_wrapper::Nvml),
|
Nvml(Box<nvml_wrapper::Nvml>),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn probe() -> Option<Handle> {
|
fn probe() -> Option<Handle> {
|
||||||
@@ -69,7 +69,7 @@ mod worker {
|
|||||||
.lib_path(std::ffi::OsStr::new("libnvidia-ml.so.1"))
|
.lib_path(std::ffi::OsStr::new("libnvidia-ml.so.1"))
|
||||||
.init()
|
.init()
|
||||||
.ok()
|
.ok()
|
||||||
.map(Handle::Nvml)
|
.map(|nvml| Handle::Nvml(Box::new(nvml)))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn collect_from(handle: &Handle) -> Option<Vec<GpuMetrics>> {
|
fn collect_from(handle: &Handle) -> Option<Vec<GpuMetrics>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user