Skip to main content

NodeCaps

Struct NodeCaps 

Source
pub struct NodeCaps {
    pub addr: String,
    pub os: String,
    pub cores: usize,
    pub ram_total: u64,
    pub ram_avail: u64,
    pub disk_free: u64,
    pub devices: Vec<DeviceInfo>,
    pub gflops: f64,
    pub io_mbps: f64,
}
Expand description

A node’s measured hardware profile.

Fields§

§addr: String

Address the coordinator reaches this node’s worker at (host:port).

§os: String

OS string (macos, linux).

§cores: usize

Logical CPU cores.

§ram_total: u64

Total / currently-available host RAM (bytes).

§ram_avail: u64§disk_free: u64

Free disk at the checkpoint location (bytes).

§devices: Vec<DeviceInfo>

Compute devices, CPU first.

§gflops: f64

Rough sustained matmul throughput (GFLOP/s, f32) from a micro-bench.

§io_mbps: f64

Rough disk read throughput (MB/s) from a micro-bench (0 if not measured).

Implementations§

Source§

impl NodeCaps

Source

pub fn accel_mem(&self) -> u64

Best (non-CPU) accelerator memory ceiling, else host RAM — the largest a stage can occupy on this node’s device. A GPU that reports a positive mem_bytes (discrete VRAM, or an APU’s GTT / GPU-addressable system RAM) caps the stage even when it is “unified”: an amdgpu APU shares system RAM but the kernel bounds GPU access at GTT, so we must honor it. Devices with no meaningful ceiling (Apple Metal, mem_bytes == 0) fall through to RAM.

Source

pub fn gflops_for(&self, dev: Device) -> f64

Measured throughput of dev specifically, falling back to the node’s headline figure when that device was not benched.

Costing a stage by Self::gflops — the node’s fastest device — is only right when the stage runs there, and it need not: the device is picked for its memory ceiling (or pinned by hand in the config). On an M4 Pro the CPU’s AMX benches ~1100 GFLOP/s against Metal’s ~540, so a node placed on Metal and costed on the headline is priced at twice the throughput it will deliver.

Source

pub fn summary(&self) -> String

One-line summary for logs / the monitor table.

Trait Implementations§

Source§

impl Clone for NodeCaps

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeCaps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NodeCaps

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for NodeCaps

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.