pub struct DiscoveredWorker {
pub name: String,
pub host: String,
pub port: u16,
pub gpus: Vec<GpuInfo>,
pub backend: String,
pub hostname: String,
pub os: String,
}Expand description
A worker discovered via broadcast.
Fields§
§name: String§host: String§port: u16§gpus: Vec<GpuInfo>§backend: String§hostname: String§os: StringImplementations§
Source§impl DiscoveredWorker
impl DiscoveredWorker
Sourcepub fn total_vram(&self) -> u64
pub fn total_vram(&self) -> u64
Total VRAM across all GPUs.
Sourcepub fn max_layers_for_size(&self, layer_size_bytes: u64) -> usize
pub fn max_layers_for_size(&self, layer_size_bytes: u64) -> usize
Maximum number of layers this worker can fit, based on per-GPU VRAM.
For dedicated GPUs (CUDA), reserves ~5% for driver/runtime overhead (typically 200–600 MiB for CUDA context + cuBLAS workspace). For unified-memory devices (Apple Silicon), reserves 28% of total (minimum 6 GiB) for macOS + inference working memory, since model weights compete with the OS for the same physical RAM and insufficient headroom causes catastrophic memory-compressor thrashing.
Sourcepub fn total_tflops(&self) -> f64
pub fn total_tflops(&self) -> f64
Total estimated TFLOPS across all GPUs. Falls back to a VRAM-based estimate when workers report 0 (old binaries).
Trait Implementations§
Source§impl Clone for DiscoveredWorker
impl Clone for DiscoveredWorker
Source§fn clone(&self) -> DiscoveredWorker
fn clone(&self) -> DiscoveredWorker
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiscoveredWorker
impl RefUnwindSafe for DiscoveredWorker
impl Send for DiscoveredWorker
impl Sync for DiscoveredWorker
impl Unpin for DiscoveredWorker
impl UnsafeUnpin for DiscoveredWorker
impl UnwindSafe for DiscoveredWorker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more