pub struct DummyExecutor {
pub tensors: HashMap<String, DummyTensor>,
/* private fields */
}Expand description
Minimal executor implementation for testing and prototyping.
This provides a simple, reference implementation that verifies the execution logic without requiring heavy dependencies.
Fields§
§tensors: HashMap<String, DummyTensor>Implementations§
Source§impl DummyExecutor
impl DummyExecutor
pub fn new() -> Self
pub fn add_tensor(&mut self, name: impl Into<String>, tensor: DummyTensor)
pub fn get_tensor(&self, name: &str) -> Option<&DummyTensor>
Trait Implementations§
Source§impl Default for DummyExecutor
impl Default for DummyExecutor
Source§impl TlAutodiff for DummyExecutor
impl TlAutodiff for DummyExecutor
Source§impl TlBatchExecutor for DummyExecutor
impl TlBatchExecutor for DummyExecutor
type Tensor = DummyTensor
type Error = ExecutorError
Source§fn execute_batch(
&mut self,
graph: &EinsumGraph,
batch_inputs: Vec<Vec<Self::Tensor>>,
) -> Result<BatchResult<Self::Tensor>, Self::Error>
fn execute_batch( &mut self, graph: &EinsumGraph, batch_inputs: Vec<Vec<Self::Tensor>>, ) -> Result<BatchResult<Self::Tensor>, Self::Error>
Execute a graph on a batch of inputs
Source§fn execute_batch_parallel(
&mut self,
graph: &EinsumGraph,
batch_inputs: Vec<Vec<Self::Tensor>>,
_num_threads: Option<usize>,
) -> Result<BatchResult<Self::Tensor>, Self::Error>
fn execute_batch_parallel( &mut self, graph: &EinsumGraph, batch_inputs: Vec<Vec<Self::Tensor>>, _num_threads: Option<usize>, ) -> Result<BatchResult<Self::Tensor>, Self::Error>
Execute a graph on a batch of inputs with parallel processing
Source§fn optimal_batch_size(&self) -> usize
fn optimal_batch_size(&self) -> usize
Get optimal batch size for this executor
Source§fn max_batch_size(&self) -> Option<usize>
fn max_batch_size(&self) -> Option<usize>
Get maximum recommended batch size for this executor
Source§impl TlCapabilities for DummyExecutor
impl TlCapabilities for DummyExecutor
Source§fn capabilities(&self) -> &BackendCapabilities
fn capabilities(&self) -> &BackendCapabilities
Get backend capabilities
Source§fn supports_elem_op(&self, _op: ElemOp) -> bool
fn supports_elem_op(&self, _op: ElemOp) -> bool
Check if a specific operation is supported
Source§fn supports_reduce_op(&self, _op: ReduceOp) -> bool
fn supports_reduce_op(&self, _op: ReduceOp) -> bool
Check if a specific reduction operation is supported
Source§fn supports_einsum(&self, _spec: &str) -> bool
fn supports_einsum(&self, _spec: &str) -> bool
Check if einsum is supported with the given spec
Source§fn available_devices(&self) -> Vec<DeviceType>
fn available_devices(&self) -> Vec<DeviceType>
Get available devices
Source§fn default_device(&self) -> DeviceType
fn default_device(&self) -> DeviceType
Get default device
Source§impl TlExecutor for DummyExecutor
impl TlExecutor for DummyExecutor
type Tensor = DummyTensor
type Error = ExecutorError
Source§fn einsum(
&mut self,
spec: &str,
inputs: &[Self::Tensor],
) -> Result<Self::Tensor, Self::Error>
fn einsum( &mut self, spec: &str, inputs: &[Self::Tensor], ) -> Result<Self::Tensor, Self::Error>
Execute an einsum operation on input tensors.
Source§fn elem_op(
&mut self,
op: ElemOp,
x: &Self::Tensor,
) -> Result<Self::Tensor, Self::Error>
fn elem_op( &mut self, op: ElemOp, x: &Self::Tensor, ) -> Result<Self::Tensor, Self::Error>
Apply an element-wise unary operation.
Source§impl TlProfiledExecutor for DummyExecutor
impl TlProfiledExecutor for DummyExecutor
Source§fn profiler_mut(&mut self) -> Option<&mut Profiler>
fn profiler_mut(&mut self) -> Option<&mut Profiler>
Get mutable access to profiler
Source§fn enable_profiling(&mut self)
fn enable_profiling(&mut self)
Enable profiling
Source§fn disable_profiling(&mut self)
fn disable_profiling(&mut self)
Disable profiling
Source§fn get_profile_data(&self) -> Option<&ProfileData>
fn get_profile_data(&self) -> Option<&ProfileData>
Get profiling data
Auto Trait Implementations§
impl Freeze for DummyExecutor
impl RefUnwindSafe for DummyExecutor
impl Send for DummyExecutor
impl Sync for DummyExecutor
impl Unpin for DummyExecutor
impl UnwindSafe for DummyExecutor
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