Skip to main content

CommunicationTensorMetadata

Trait CommunicationTensorMetadata 

Source
pub trait CommunicationTensorMetadata<B: NeuralBackend> {
    // Required methods
    fn dtype(&self, tensor: &B::Tensor) -> TensorDtype;
    fn shape(&self, tensor: &B::Tensor) -> Vec<usize>;
}
Expand description

Backend-native tensor metadata used only for mechanical communication validation.

Required Methods§

Source

fn dtype(&self, tensor: &B::Tensor) -> TensorDtype

Returns the portable logical dtype of one native tensor.

Source

fn shape(&self, tensor: &B::Tensor) -> Vec<usize>

Returns the exact logical shape of one native tensor.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§