pub struct DistributedExecutor { /* private fields */ }Expand description
Distributed graph executor
Implementations§
Source§impl DistributedExecutor
impl DistributedExecutor
Sourcepub fn new(config: DistributedConfig) -> TorshResult<Self>
pub fn new(config: DistributedConfig) -> TorshResult<Self>
Create a new distributed executor
Sourcepub fn init(&mut self) -> TorshResult<()>
pub fn init(&mut self) -> TorshResult<()>
Initialize the executor
Sourcepub fn set_execution_plan(&mut self, plan: DistributedExecutionPlan)
pub fn set_execution_plan(&mut self, plan: DistributedExecutionPlan)
Set execution plan
Sourcepub fn execute(
&self,
graph: &FxGraph,
inputs: HashMap<String, Tensor>,
) -> TorshResult<Vec<Tensor>>
pub fn execute( &self, graph: &FxGraph, inputs: HashMap<String, Tensor>, ) -> TorshResult<Vec<Tensor>>
Execute a distributed graph
Sourcepub fn finalize(&mut self) -> TorshResult<()>
pub fn finalize(&mut self) -> TorshResult<()>
Finalize the executor
Auto Trait Implementations§
impl Freeze for DistributedExecutor
impl RefUnwindSafe for DistributedExecutor
impl Send for DistributedExecutor
impl Sync for DistributedExecutor
impl Unpin for DistributedExecutor
impl UnsafeUnpin for DistributedExecutor
impl UnwindSafe for DistributedExecutor
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
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