pub trait PreparedDecodePlan {
// Required methods
fn backend(&self) -> PreparedBackend;
fn state(&self) -> PreparedPlanState;
fn counters(&self) -> ExecutionCounters;
fn run_decode_step(
&mut self,
input: DecodeStepInput<'_>,
output: &mut DecodeStepOutput,
) -> Result<(), DecodeStepError>;
}Expand description
Tier-1 execution contract for an already prepared model/backend pair.
Required Methods§
Sourcefn backend(&self) -> PreparedBackend
fn backend(&self) -> PreparedBackend
Prepared backend.
Sourcefn state(&self) -> PreparedPlanState
fn state(&self) -> PreparedPlanState
Plan state.
Sourcefn counters(&self) -> ExecutionCounters
fn counters(&self) -> ExecutionCounters
Execution counters.
Sourcefn run_decode_step(
&mut self,
input: DecodeStepInput<'_>,
output: &mut DecodeStepOutput,
) -> Result<(), DecodeStepError>
fn run_decode_step( &mut self, input: DecodeStepInput<'_>, output: &mut DecodeStepOutput, ) -> Result<(), DecodeStepError>
Execute one autoregressive step.
Implementations must not allocate, compile, discover tensors, upload immutable data, or select another backend. A failure is returned to the owner, which records any explicit fallback outside this call.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".