Skip to main content

Stage

Struct Stage 

Source
pub struct Stage {
Show 14 fields pub dev: usize, pub gpu: Gpu, pub layers: Vec<LayerDev>, pub embed: Option<CudaSlice<u8>>, pub head: Option<CudaSlice<u8>>, pub trunk_norm: Option<CudaSlice<f32>>, pub hc_head_fn: Option<CudaSlice<f32>>, pub fc_yarn: CudaSlice<f32>, pub fc_plain: CudaSlice<f32>, pub ws: CudaSlice<u8>, pub deq: [CudaSlice<u8>; 3], pub loaded_bytes: u64, pub hc_head_base_dev: Option<CudaSlice<f32>>, pub hc_head_scale_dev: Option<CudaSlice<f32>>,
}
Expand description

One stage = one GPU: its runtime handle plus the resident weights of its layer range.

Fields§

§dev: usize§gpu: Gpu§layers: Vec<LayerDev>§embed: Option<CudaSlice<u8>>§head: Option<CudaSlice<u8>>§trunk_norm: Option<CudaSlice<f32>>§hc_head_fn: Option<CudaSlice<f32>>§fc_yarn: CudaSlice<f32>§fc_plain: CudaSlice<f32>§ws: CudaSlice<u8>§deq: [CudaSlice<u8>; 3]§loaded_bytes: u64§hc_head_base_dev: Option<CudaSlice<f32>>§hc_head_scale_dev: Option<CudaSlice<f32>>

Auto Trait Implementations§

§

impl Freeze for Stage

§

impl RefUnwindSafe for Stage

§

impl Send for Stage

§

impl Sync for Stage

§

impl Unpin for Stage

§

impl UnsafeUnpin for Stage

§

impl UnwindSafe for Stage

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> 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, 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.