pub struct NetworkMemory {
pub resident_bytes: u64,
pub load_peak_bytes: u64,
pub inference_fixed_bytes: u64,
pub inference_bytes_per_voxel: u64,
pub wasm_fixed_bytes: u64,
pub wasm_bytes_per_voxel: u64,
}Expand description
Measured heap of one network in tract (see the module docs for how).
Bytes of heap allocated by tract and QSM-Core’s ONNX layer. The bytes of the weight file itself
(WeightFile::bytes, held by whoever supplied them) are not included.
Fields§
§resident_bytes: u64Heap the parsed model (onnx::OnnxModel::load) holds for as long as it is loaded; for
NeXtQSM, both its networks.
load_peak_bytes: u64High-water of parsing the model, from nothing: about twice the resident size, as tract holds the decoded protobuf while it builds the graph.
inference_fixed_bytes: u64Native: the fixed part of one inference’s peak above the resident model.
inference_bytes_per_voxel: u64Native: the part of one inference’s peak above the resident model that grows with the input, per voxel of the network’s input (activations, the input and output tensors, the plan’s per-shape tables and tract’s scratch).
wasm_fixed_bytes: u64WASM: the fixed part of the heap’s growth over loading the model and running it once.
wasm_bytes_per_voxel: u64WASM: the part of that growth per voxel of the network’s input.
Trait Implementations§
Source§impl Clone for NetworkMemory
impl Clone for NetworkMemory
Source§fn clone(&self) -> NetworkMemory
fn clone(&self) -> NetworkMemory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NetworkMemory
Source§impl Debug for NetworkMemory
impl Debug for NetworkMemory
impl Eq for NetworkMemory
Source§impl PartialEq for NetworkMemory
impl PartialEq for NetworkMemory
Source§impl Serialize for NetworkMemory
impl Serialize for NetworkMemory
impl StructuralPartialEq for NetworkMemory
Auto Trait Implementations§
impl Freeze for NetworkMemory
impl RefUnwindSafe for NetworkMemory
impl Send for NetworkMemory
impl Sync for NetworkMemory
impl Unpin for NetworkMemory
impl UnsafeUnpin for NetworkMemory
impl UnwindSafe for NetworkMemory
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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