Struct caffe2_plan::ExecutionStepWrapper
source · pub struct ExecutionStepWrapper { /* private fields */ }
Expand description
| Controls compilation and runtime cloning
| of execution steps.
|
| If step.create_workspace=False,
| this wrapper will compile the execution
| step and its children once, and calls
| to ExecutionStepWrapper::compiled()
| will always return the same compiled
| step. If step.create_workspace=True,
| no compilation is done at creation time.
| Instead, a new CompiledExecutionStep
| is created for every compiled() call.
|
| CompiledExecutionStep owns its Workspace,
| and the lifetime of the compiled step
| along with its workspace will be tied
| to the lifetime of the CompileGuard
| object returned by compiled().
|
| ExecuteStepRecursive will call call
| compiled() once before the given execution
| step is run and keep it alive for the length
| of its execution. This means that, for
| steps with create_workspace=true,
| a child workspace will be created every
| time the step is executed, and destroyed
| right afterwards.
|
Implementations§
source§impl ExecutionStepWrapper
impl ExecutionStepWrapper
pub fn new( step: *const ExecutionStep, external_workspace: *mut Workspace, external_should_continue: fn(_u0: i32) -> bool, net_defs: *mut NetDefMap, ws_id_injector: *mut WorkspaceIdInjector ) -> Self
pub fn step(&mut self) -> &ExecutionStep
pub fn compiled(&mut self) -> CompiledGuard
source§impl ExecutionStepWrapper
impl ExecutionStepWrapper
pub fn cancel(&mut self)
pub fn do_compile(&mut self) -> Box<CompiledExecutionStep>
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionStepWrapper
impl !Send for ExecutionStepWrapper
impl !Sync for ExecutionStepWrapper
impl Unpin for ExecutionStepWrapper
impl !UnwindSafe for ExecutionStepWrapper
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.