pub struct CommunicationTensorLimits { /* private fields */ }Expand description
Maximum tensor and per-peer counts admitted for one operation.
Implementations§
Source§impl CommunicationTensorLimits
impl CommunicationTensorLimits
Sourcepub fn new(
max_tensors: usize,
max_tensor_rank: usize,
max_tensor_elements: usize,
max_count_per_peer: Option<usize>,
) -> Result<Self, CommunicationManifestError>
pub fn new( max_tensors: usize, max_tensor_rank: usize, max_tensor_elements: usize, max_count_per_peer: Option<usize>, ) -> Result<Self, CommunicationManifestError>
Validates positive payload limits. Tensor rank may be zero for scalars.
Sourcepub fn with_output_tensor_elements(
self,
max_output_tensor_elements: usize,
) -> Result<Self, CommunicationManifestError>
pub fn with_output_tensor_elements( self, max_output_tensor_elements: usize, ) -> Result<Self, CommunicationManifestError>
Selects a distinct upper bound for the completed result tensor.
Gather and variable-count operations can return more elements than one rank submits.
Sourcepub const fn max_tensors(self) -> usize
pub const fn max_tensors(self) -> usize
Maximum tensors submitted in one operation.
Sourcepub const fn max_tensor_rank(self) -> usize
pub const fn max_tensor_rank(self) -> usize
Maximum logical rank of one tensor. Zero admits scalars only.
Sourcepub const fn max_tensor_elements(self) -> usize
pub const fn max_tensor_elements(self) -> usize
Maximum logical elements in one tensor.
Sourcepub const fn max_output_tensor_elements(self) -> usize
pub const fn max_output_tensor_elements(self) -> usize
Maximum logical elements in one completed result tensor.
Sourcepub const fn max_count_per_peer(self) -> Option<usize>
pub const fn max_count_per_peer(self) -> Option<usize>
Maximum elements addressed to or received from one peer, when used.
Trait Implementations§
Source§impl Clone for CommunicationTensorLimits
impl Clone for CommunicationTensorLimits
Source§fn clone(&self) -> CommunicationTensorLimits
fn clone(&self) -> CommunicationTensorLimits
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 moreimpl Copy for CommunicationTensorLimits
Source§impl Debug for CommunicationTensorLimits
impl Debug for CommunicationTensorLimits
Source§impl<'de> Deserialize<'de> for CommunicationTensorLimits
impl<'de> Deserialize<'de> for CommunicationTensorLimits
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 CommunicationTensorLimits
impl StructuralPartialEq for CommunicationTensorLimits
Auto Trait Implementations§
impl Freeze for CommunicationTensorLimits
impl RefUnwindSafe for CommunicationTensorLimits
impl Send for CommunicationTensorLimits
impl Sync for CommunicationTensorLimits
impl Unpin for CommunicationTensorLimits
impl UnsafeUnpin for CommunicationTensorLimits
impl UnwindSafe for CommunicationTensorLimits
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