pub struct WeightLoweringDescriptor { /* private fields */ }Expand description
Exact source-to-executable lowering query presented to a backend.
Implementations§
Source§impl WeightLoweringDescriptor
impl WeightLoweringDescriptor
Sourcepub fn has_valid_direct_geometry(&self) -> bool
pub fn has_valid_direct_geometry(&self) -> bool
Validates source encoding geometry without choosing a native implementation.
Sourcepub fn has_valid_transform_geometry(&self) -> bool
pub fn has_valid_transform_geometry(&self) -> bool
Validates an unpacked source and the selected transform’s packing geometry.
Source§impl WeightLoweringDescriptor
impl WeightLoweringDescriptor
Sourcepub fn new(
source: SourceTensorEncoding,
executable: LinearFormat,
physical_shape: Vec<usize>,
logical_shape: Vec<usize>,
packed_axis: Option<usize>,
) -> Result<Self, ReplicatedTextContractError>
pub fn new( source: SourceTensorEncoding, executable: LinearFormat, physical_shape: Vec<usize>, logical_shape: Vec<usize>, packed_axis: Option<usize>, ) -> Result<Self, ReplicatedTextContractError>
Creates a geometry-bearing lowering query.
Sourcepub const fn source(&self) -> &SourceTensorEncoding
pub const fn source(&self) -> &SourceTensorEncoding
Returns the admitted source encoding.
Sourcepub const fn executable(&self) -> LinearFormat
pub const fn executable(&self) -> LinearFormat
Returns the selected executable format.
Sourcepub fn physical_shape(&self) -> &[usize]
pub fn physical_shape(&self) -> &[usize]
Returns the admitted physical source shape.
Sourcepub fn logical_shape(&self) -> &[usize]
pub fn logical_shape(&self) -> &[usize]
Returns the architecture-declared logical shape.
Sourcepub const fn packed_axis(&self) -> Option<usize>
pub const fn packed_axis(&self) -> Option<usize>
Returns the executable packing axis, when the parameter is packable.
Sourcepub fn packed_extent(&self) -> Option<usize>
pub fn packed_extent(&self) -> Option<usize>
Returns the exact extent along the packing axis.
Trait Implementations§
Source§impl Clone for WeightLoweringDescriptor
impl Clone for WeightLoweringDescriptor
Source§fn clone(&self) -> WeightLoweringDescriptor
fn clone(&self) -> WeightLoweringDescriptor
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 WeightLoweringDescriptor
impl Debug for WeightLoweringDescriptor
impl Eq for WeightLoweringDescriptor
Source§impl PartialEq for WeightLoweringDescriptor
impl PartialEq for WeightLoweringDescriptor
impl StructuralPartialEq for WeightLoweringDescriptor
Auto Trait Implementations§
impl Freeze for WeightLoweringDescriptor
impl RefUnwindSafe for WeightLoweringDescriptor
impl Send for WeightLoweringDescriptor
impl Sync for WeightLoweringDescriptor
impl Unpin for WeightLoweringDescriptor
impl UnsafeUnpin for WeightLoweringDescriptor
impl UnwindSafe for WeightLoweringDescriptor
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