pub struct OperatorCustom {
pub name: Option<String>,
pub machine_ops: MachineOpCounts,
}Fields§
§name: Option<String>§machine_ops: MachineOpCountsTrait Implementations§
Source§impl Clone for OperatorCustom
impl Clone for OperatorCustom
Source§fn clone(&self) -> OperatorCustom
fn clone(&self) -> OperatorCustom
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperatorCustom
impl Debug for OperatorCustom
Source§impl<'de> Deserialize<'de> for OperatorCustom
impl<'de> Deserialize<'de> for OperatorCustom
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Operator for OperatorCustom
impl Operator for OperatorCustom
Source§fn validate_tensors(
&self,
_inputs: &[Option<Tensor>],
_outputs: &[Option<Tensor>],
) -> SimResult
fn validate_tensors( &self, _inputs: &[Option<Tensor>], _outputs: &[Option<Tensor>], ) -> SimResult
Validate that the input and output tensors are valid shapes and
datatypes
Source§fn compute_delay_ticks(
&self,
compute_capabilities: &Rc<ComputeCapabilities>,
_inputs: &[Option<TensorView>],
_outputs: &[Option<TensorView>],
) -> Result<usize, SimError>
fn compute_delay_ticks( &self, compute_capabilities: &Rc<ComputeCapabilities>, _inputs: &[Option<TensorView>], _outputs: &[Option<TensorView>], ) -> Result<usize, SimError>
Returns the number of clock ticks needed to perform the
specified computation give the machine capabilities
Source§fn compute_machine_ops(
&self,
_inputs: &[Option<TensorView>],
_outputs: &[Option<TensorView>],
) -> Result<MachineOpCounts, SimError>
fn compute_machine_ops( &self, _inputs: &[Option<TensorView>], _outputs: &[Option<TensorView>], ) -> Result<MachineOpCounts, SimError>
Returns the number of machine operations performed by the specified
computation, broken down by operation type.
Source§fn partition_views(
&self,
input_views: &[Option<TensorView>],
output_views: &[Option<TensorView>],
_num_partitions: usize,
) -> Result<Vec<TensorPartition>, SimError>
fn partition_views( &self, input_views: &[Option<TensorView>], output_views: &[Option<TensorView>], _num_partitions: usize, ) -> Result<Vec<TensorPartition>, SimError>
Partition the operation into one or more views that can be executed in
parallel. Implementations may return fewer than
num_partitions if the
operator cannot be split that finely.Source§fn compute_flops(
&self,
inputs: &[Option<TensorView>],
outputs: &[Option<TensorView>],
) -> Result<usize, SimError>
fn compute_flops( &self, inputs: &[Option<TensorView>], outputs: &[Option<TensorView>], ) -> Result<usize, SimError>
Returns the total number of FLOPs performed by the specified
computation.
Auto Trait Implementations§
impl Freeze for OperatorCustom
impl RefUnwindSafe for OperatorCustom
impl Send for OperatorCustom
impl Sync for OperatorCustom
impl Unpin for OperatorCustom
impl UnsafeUnpin for OperatorCustom
impl UnwindSafe for OperatorCustom
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