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: NodeIdThe id of the backing IR node.
source: Option<&'g str>source attribute — the EP dispatch key (§55.6). None if absent.
main_context: boolmain_context != 0 (§55.2 default true when the attribute is absent).
embed_mode: EmbedModeEmbedded 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>
impl<'g> EpContextNode<'g>
Sourcepub fn from_node(node: &'g Node) -> Option<Self>
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.
Sourcepub fn inputs(&self) -> &'g [Option<ValueId>]
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.