Skip to main content

Env

Struct Env 

Source
pub struct Env {
Show 13 fields pub commit_sha: String, pub hw_id: String, pub driver: Option<String>, pub cuda: Option<String>, pub rust: String, pub ferrum_features: Vec<String>, pub gpu_clock_lock_mhz: Option<u32>, pub gpu_power_limit_w: Option<u32>, pub gpu_persistence_mode: Option<bool>, pub gpu_auto_boost: Option<bool>, pub ferrum_env: BTreeMap<String, String>, pub runtime_config: RuntimeConfigSnapshot, pub vllm_args: Option<Vec<String>>,
}
Expand description

Snapshot of everything we expect to affect bench outcomes.

BTreeMap (not HashMap) for ferrum_env so JSON serialization is deterministic — required for env_hash reproducibility.

Fields§

§commit_sha: String

ferrum git commit short SHA.

§hw_id: String

Stable hardware identifier (e.g. rtx-4090, m1-max-32gb).

§driver: Option<String>

NVIDIA driver version (e.g. 555.42.06). Omitted on non-CUDA hosts.

§cuda: Option<String>

CUDA toolkit version (e.g. 12.4). Omitted on non-CUDA hosts.

§rust: String

Rust toolchain version (e.g. 1.78.0).

§ferrum_features: Vec<String>

Cargo features enabled on the ferrum build (sorted).

§gpu_clock_lock_mhz: Option<u32>

GPU clock lock value in MHz (nvidia-smi -lgc <mhz>,<mhz>).

§gpu_power_limit_w: Option<u32>

Power limit in watts (nvidia-smi -pl <W>).

§gpu_persistence_mode: Option<bool>

Persistence mode state (nvidia-smi -pm 1).

§gpu_auto_boost: Option<bool>

Auto-boost state (false ⇒ disabled).

§ferrum_env: BTreeMap<String, String>

Selected FERRUM_* env vars affecting runtime (sorted by BTreeMap).

§runtime_config: RuntimeConfigSnapshot

Stable sorted runtime config snapshot for non-default FERRUM_* values.

§vllm_args: Option<Vec<String>>

vllm serve effective args, populated only for vLLM cells. None for ferrum cells — used by the config-parity report block.

Implementations§

Source§

impl Env

Source

pub fn hash(&self) -> EnvHash

Compute the env_hash. Deterministic given:

  • BTreeMap (sorted) for ferrum_env
  • explicit struct field order (serde serializes in declaration order)
  • Vec<String> fields are caller-sorted (we don’t sort here so the raw order is preserved for display — callers should sort ferrum_features before constructing Env if they want order-independent hashes).
Source

pub fn capture_minimal(commit_sha: String, ferrum_features: Vec<String>) -> Self

Capture commit + rust + features + auto-detected hw/driver/cuda. On CUDA hosts populates GPU driver + CUDA toolkit versions via nvidia-smi and nvcc --version; on macOS uses sysctl.

Trait Implementations§

Source§

impl Clone for Env

Source§

fn clone(&self) -> Env

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 Env

Source§

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

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

impl Default for Env

Source§

fn default() -> Env

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Env

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 Env

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§

§

impl Freeze for Env

§

impl RefUnwindSafe for Env

§

impl Send for Env

§

impl Sync for Env

§

impl Unpin for Env

§

impl UnsafeUnpin for Env

§

impl UnwindSafe for Env

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V