pub struct GraphInterpreter { /* private fields */ }Expand description
Interpreter for executing FX graphs
Provides high-level interface for executing complete FX graphs with input tensors. Manages execution order, node dispatch, and output collection.
Implementations§
Source§impl GraphInterpreter
impl GraphInterpreter
Sourcepub fn new(device: DeviceType) -> Self
pub fn new(device: DeviceType) -> Self
Sourcepub fn run(
&mut self,
graph: &FxGraph,
inputs: HashMap<String, Tensor>,
) -> TorshResult<Vec<Tensor>>
pub fn run( &mut self, graph: &FxGraph, inputs: HashMap<String, Tensor>, ) -> TorshResult<Vec<Tensor>>
Sourcepub fn env(&self) -> &ExecutionEnvironment
pub fn env(&self) -> &ExecutionEnvironment
Get reference to execution environment
§Returns
&ExecutionEnvironment- Reference to execution environment
Sourcepub fn env_mut(&mut self) -> &mut ExecutionEnvironment
pub fn env_mut(&mut self) -> &mut ExecutionEnvironment
Get mutable reference to execution environment
§Returns
&mut ExecutionEnvironment- Mutable reference to execution environment
Auto Trait Implementations§
impl Freeze for GraphInterpreter
impl RefUnwindSafe for GraphInterpreter
impl Send for GraphInterpreter
impl Sync for GraphInterpreter
impl Unpin for GraphInterpreter
impl UnsafeUnpin for GraphInterpreter
impl UnwindSafe for GraphInterpreter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more