Skip to main content

EpContextNode

Struct EpContextNode 

Source
pub struct EpContextNode<'g> {
    pub node: NodeId,
    pub source: Option<&'g str>,
    pub main_context: bool,
    pub embed_mode: EmbedMode,
    pub sdk_version: Option<&'g str>,
    pub partition_name: Option<&'g str>,
    /* private fields */
}
Expand description

A typed view over a com.microsoft::EPContext node in the Graph IR (§55.3). Backed by an ordinary Node plus its attributes — no separate IR node kind. Constructed via EpContextNode::from_node or enumerated with ep_context_nodes.

Variadic boundary tensors are read straight from the underlying node via inputs / outputs; no fixed arity is assumed.

Fields§

§node: NodeId

The id of the backing IR node.

§source: Option<&'g str>

source attribute — the EP dispatch key (§55.6). None if absent.

§main_context: bool

main_context != 0 (§55.2 default true when the attribute is absent).

§embed_mode: EmbedMode

Embedded vs. external payload (§55.2 default EmbedMode::Embedded).

§sdk_version: Option<&'g str>

ep_sdk_version attribute — SDK/toolchain version (diagnostics).

§partition_name: Option<&'g str>

partition_name attribute — the ORT-partitioned graph name.

Implementations§

Source§

impl<'g> EpContextNode<'g>

Source

pub fn from_node(node: &'g Node) -> Option<Self>

Build the typed view if node is a com.microsoft::EPContext node, otherwise None. Attribute parsing is defensive: missing or wrong-typed attributes fall back to the §55.2 defaults rather than erroring.

Source

pub fn inputs(&self) -> &'g [Option<ValueId>]

The node’s variadic input value slots (partition boundary inputs, in order). None slots preserve positional arity for skipped optionals.

Source

pub fn outputs(&self) -> &'g [ValueId]

The node’s variadic output values (partition boundary outputs, in order).

Source

pub fn inner(&self) -> &'g Node

The backing Node.

Trait Implementations§

Source§

impl<'g> Debug for EpContextNode<'g>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'g> Freeze for EpContextNode<'g>

§

impl<'g> RefUnwindSafe for EpContextNode<'g>

§

impl<'g> Send for EpContextNode<'g>

§

impl<'g> Sync for EpContextNode<'g>

§

impl<'g> Unpin for EpContextNode<'g>

§

impl<'g> UnsafeUnpin for EpContextNode<'g>

§

impl<'g> UnwindSafe for EpContextNode<'g>

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.