pub trait SubmissionBackend: NeuralBackend {
type Executor: ?Sized;
type OwnedExecutor: Borrow<Self::Executor>;
type Completion: Completion;
// Required methods
fn fork_executors(
executor: &Self::Executor,
count: usize,
) -> Result<Vec<Self::OwnedExecutor>, <Self::Completion as Completion>::Error>;
fn submit<'a, I>(
executor: &Self::Executor,
values: I,
) -> Result<Self::Completion, <Self::Completion as Completion>::Error>
where Self::Tensor: 'a,
I: IntoIterator<Item = &'a Self::Tensor>;
fn order_after(
completion: &Self::Completion,
executor: &Self::Executor,
) -> Result<(), <Self::Completion as Completion>::Error>;
fn retain_until_complete<T: Send + 'static>(
executor: &Self::Executor,
completion: &Self::Completion,
value: T,
) -> Result<(), <Self::Completion as Completion>::Error>;
}Expand description
Submits backend-native work and retains values through exact completion.
Required Associated Types§
Sourcetype OwnedExecutor: Borrow<Self::Executor>
type OwnedExecutor: Borrow<Self::Executor>
Owned executor used for an independently schedulable graph lane.
Sourcetype Completion: Completion
type Completion: Completion
Exact completion object for one submission.
Required Methods§
Sourcefn fork_executors(
executor: &Self::Executor,
count: usize,
) -> Result<Vec<Self::OwnedExecutor>, <Self::Completion as Completion>::Error>
fn fork_executors( executor: &Self::Executor, count: usize, ) -> Result<Vec<Self::OwnedExecutor>, <Self::Completion as Completion>::Error>
Creates independently schedulable executors on the same backend device.
Sourcefn submit<'a, I>(
executor: &Self::Executor,
values: I,
) -> Result<Self::Completion, <Self::Completion as Completion>::Error>
fn submit<'a, I>( executor: &Self::Executor, values: I, ) -> Result<Self::Completion, <Self::Completion as Completion>::Error>
Submits evaluation of backend-native values on one executor.
Sourcefn order_after(
completion: &Self::Completion,
executor: &Self::Executor,
) -> Result<(), <Self::Completion as Completion>::Error>
fn order_after( completion: &Self::Completion, executor: &Self::Executor, ) -> Result<(), <Self::Completion as Completion>::Error>
Orders future work on executor after an exact producer completion.
Sourcefn retain_until_complete<T: Send + 'static>(
executor: &Self::Executor,
completion: &Self::Completion,
value: T,
) -> Result<(), <Self::Completion as Completion>::Error>
fn retain_until_complete<T: Send + 'static>( executor: &Self::Executor, completion: &Self::Completion, value: T, ) -> Result<(), <Self::Completion as Completion>::Error>
Retains an owned value until completion has completed exactly.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".