TensorTraceHandler

Trait TensorTraceHandler 

Source
pub trait TensorTraceHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn trace_tensor_activity(
        &self,
        trace: &Trace,
        event: Activity,
        tensor_data: &Buffer,
        tensor_shape: Shape,
    );
}
Expand description

Tensor event handler trait.

Required Methods§

Source

fn trace_tensor_activity( &self, trace: &Trace, event: Activity, tensor_data: &Buffer, tensor_shape: Shape, )

This function is invoked each time the tensor event occures.

trace: Trace object that was reported. Note that child traces of constructed one also are reported with this fn. Check Trace::new_with_handle for more info.
event: activity that has occurred.
tensor_data: borrowed buffer containing data of the tensor.
tensor_shape: shape (name, data_type and dims) of the tensor.

Implementations on Foreign Types§

Source§

impl TensorTraceHandler for ()

Source§

fn trace_tensor_activity( &self, _trace: &Trace, _event: Activity, _tensor_data: &Buffer, _tensor_shape: Shape, )

Implementors§