Skip to main content

TosaAnalysis

Struct TosaAnalysis 

Source
pub struct TosaAnalysis<'a> { /* private fields */ }
Expand description

Compact provider-neutral overlay used by lowering and specialization code.

The plan owns only bounded indexes and bookkeeping. Names, tensor metadata, shape metadata, and constant payloads remain borrowed from the verified model.

Implementations§

Source§

impl<'a> TosaAnalysis<'a>

Source

pub fn build(model: &Model<'a>, target: Target) -> Result<Self, AnalysisError>

Source

pub fn build_with_options( model: &Model<'a>, target: Target, options: AnalysisOptions, ) -> Result<Self, AnalysisError>

Source

pub const fn target(&self) -> Target

Source

pub fn serialized_constant(&self, id: ValueId) -> Option<&'a [u8]>

Serialized bytes for a CONST/CONST_SHAPE value, including external constant storage.

Source

pub fn regions(&self) -> &[AnalyzedRegion<'a>]

Source

pub fn blocks(&self) -> &[AnalyzedBlock<'a>]

Source

pub fn values(&self) -> &[AnalyzedValue<'a>]

Source

pub fn operators(&self) -> &[AnalyzedOperator<'a>]

Source

pub fn conditions(&self) -> &[RuntimeCondition<'a>]

Source

pub fn value(&self, id: ValueId) -> &AnalyzedValue<'a>

Source

pub fn operator(&self, id: OperatorId) -> &AnalyzedOperator<'a>

Source

pub fn operator_inputs(&self, operator: OperatorId) -> &[ValueId]

Source

pub fn operator_outputs(&self, operator: OperatorId) -> &[ValueId]

Source

pub fn operator_conditions( &self, operator: OperatorId, ) -> &[RuntimeCondition<'a>]

Source

pub fn block_values(&self, block: BlockId) -> &[AnalyzedValue<'a>]

Source

pub fn block_operators(&self, block: BlockId) -> &[AnalyzedOperator<'a>]

Source

pub fn block_inputs(&self, block: BlockId) -> &[ValueId]

Source

pub fn block_outputs(&self, block: BlockId) -> &[ValueId]

Source

pub fn execution_order(&self, block: BlockId) -> &[OperatorId]

Source

pub fn region_blocks(&self, region: RegionId) -> &[AnalyzedBlock<'a>]

Trait Implementations§

Source§

impl<'a> Debug for TosaAnalysis<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TosaAnalysis<'a>

§

impl<'a> RefUnwindSafe for TosaAnalysis<'a>

§

impl<'a> Send for TosaAnalysis<'a>

§

impl<'a> Sync for TosaAnalysis<'a>

§

impl<'a> Unpin for TosaAnalysis<'a>

§

impl<'a> UnsafeUnpin for TosaAnalysis<'a>

§

impl<'a> UnwindSafe for TosaAnalysis<'a>

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