pub struct RecurrentStateSpec {
pub request_id: RequestId,
pub num_layers: usize,
pub tensors: Vec<RecurrentStateTensorSpec>,
pub device: Device,
pub max_batch_slots: usize,
}Expand description
Allocation request for recurrent state.
Fields§
§request_id: RequestIdRequest ID this allocation is for.
num_layers: usizeNumber of model layers that may carry recurrent state.
tensors: Vec<RecurrentStateTensorSpec>Concrete state tensors to allocate.
device: DeviceTarget device.
max_batch_slots: usizeNumber of request/batch slots reserved by this handle.
Implementations§
Source§impl RecurrentStateSpec
impl RecurrentStateSpec
pub fn estimated_memory_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for RecurrentStateSpec
impl Clone for RecurrentStateSpec
Source§fn clone(&self) -> RecurrentStateSpec
fn clone(&self) -> RecurrentStateSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecurrentStateSpec
impl Debug for RecurrentStateSpec
Source§impl<'de> Deserialize<'de> for RecurrentStateSpec
impl<'de> Deserialize<'de> for RecurrentStateSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RecurrentStateSpec
Source§impl PartialEq for RecurrentStateSpec
impl PartialEq for RecurrentStateSpec
Source§impl Serialize for RecurrentStateSpec
impl Serialize for RecurrentStateSpec
impl StructuralPartialEq for RecurrentStateSpec
Auto Trait Implementations§
impl Freeze for RecurrentStateSpec
impl RefUnwindSafe for RecurrentStateSpec
impl Send for RecurrentStateSpec
impl Sync for RecurrentStateSpec
impl Unpin for RecurrentStateSpec
impl UnsafeUnpin for RecurrentStateSpec
impl UnwindSafe for RecurrentStateSpec
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