pub struct ReplicatedTextParameterRequirement { /* private fields */ }Expand description
Exact admitted source and executable constraints for one logical parameter.
Implementations§
Source§impl ReplicatedTextParameterRequirement
impl ReplicatedTextParameterRequirement
Sourcepub fn new(
name: impl Into<String>,
sources: Vec<String>,
physical_sources: Vec<ReplicatedTextPhysicalSource>,
aliases: Vec<String>,
source_encoding: Option<SourceTensorEncoding>,
physical_shape: Option<Vec<usize>>,
logical_shape: Vec<usize>,
native_executable: LinearFormat,
role: ReplicatedTextParameterRole,
owner: ReplicatedTextParameterOwner,
presence: ReplicatedTextParameterPresence,
transform: ParameterTransformConstraint,
) -> Result<Self, ReplicatedTextContractError>
pub fn new( name: impl Into<String>, sources: Vec<String>, physical_sources: Vec<ReplicatedTextPhysicalSource>, aliases: Vec<String>, source_encoding: Option<SourceTensorEncoding>, physical_shape: Option<Vec<usize>>, logical_shape: Vec<usize>, native_executable: LinearFormat, role: ReplicatedTextParameterRole, owner: ReplicatedTextParameterOwner, presence: ReplicatedTextParameterPresence, transform: ParameterTransformConstraint, ) -> Result<Self, ReplicatedTextContractError>
Creates one exact logical-parameter requirement.
Sourcepub fn physical_sources(&self) -> &[ReplicatedTextPhysicalSource]
pub fn physical_sources(&self) -> &[ReplicatedTextPhysicalSource]
Returns exact admitted shard and multi-output provenance.
Sourcepub fn aliases(&self) -> &[String]
pub fn aliases(&self) -> &[String]
Returns all architecture-admitted alternative source identities.
Sourcepub const fn source_encoding(&self) -> Option<&SourceTensorEncoding>
pub const fn source_encoding(&self) -> Option<&SourceTensorEncoding>
Returns the admitted physical source encoding.
Sourcepub fn physical_shape(&self) -> Option<&[usize]>
pub fn physical_shape(&self) -> Option<&[usize]>
Returns the selected physical shape, when a source is present.
Sourcepub fn logical_shape(&self) -> &[usize]
pub fn logical_shape(&self) -> &[usize]
Returns the architecture-declared logical shape.
Sourcepub const fn role(&self) -> ReplicatedTextParameterRole
pub const fn role(&self) -> ReplicatedTextParameterRole
Returns the architecture-owned semantic role.
Sourcepub const fn owner(&self) -> &ReplicatedTextParameterOwner
pub const fn owner(&self) -> &ReplicatedTextParameterOwner
Returns the architecture-owned static/group/unit location.
Sourcepub const fn presence(&self) -> &ReplicatedTextParameterPresence
pub const fn presence(&self) -> &ReplicatedTextParameterPresence
Returns exact artifact presence, tie, or derivation.
Sourcepub const fn transform_constraint(&self) -> ParameterTransformConstraint
pub const fn transform_constraint(&self) -> ParameterTransformConstraint
Returns exact transform eligibility and packing geometry.
Sourcepub const fn native_executable(&self) -> LinearFormat
pub const fn native_executable(&self) -> LinearFormat
Returns the architecture-native executable format.
Sourcepub fn transform_target(
&self,
request: QuantizationRequest,
) -> Result<Option<ParameterTransformTarget>, ReplicatedTextContractError>
pub fn transform_target( &self, request: QuantizationRequest, ) -> Result<Option<ParameterTransformTarget>, ReplicatedTextContractError>
Resolves a caller transform through architecture-owned constraints.
Sourcepub fn lowering_descriptor(
&self,
executable: LinearFormat,
) -> Result<WeightLoweringDescriptor, ReplicatedTextContractError>
pub fn lowering_descriptor( &self, executable: LinearFormat, ) -> Result<WeightLoweringDescriptor, ReplicatedTextContractError>
Forms the exact backend lowering query for one admitted executable format.
Trait Implementations§
Source§impl Clone for ReplicatedTextParameterRequirement
impl Clone for ReplicatedTextParameterRequirement
Source§fn clone(&self) -> ReplicatedTextParameterRequirement
fn clone(&self) -> ReplicatedTextParameterRequirement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more