Trait BackendTypes
pub trait BackendTypes:
Clone
+ Send
+ Sync
+ Debug
+ 'static {
type Device: DeviceOps;
type FloatTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static;
type IntTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static;
type BoolTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static;
type QuantizedTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static;
type GraphPrimitive: Clone + Send + Sync + Debug + 'static;
}Expand description
The mapping of types used by Backend and traits.
Required Associated Types§
type FloatTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
type FloatTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
Tensor primitive to be used for all float operations.
type IntTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
type IntTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
Tensor primitive to be used for all int operations.
type BoolTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
type BoolTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
Tensor primitive to be used for all bool operations.
type QuantizedTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
type QuantizedTensorPrimitive: TensorMetadata<Device = Self::Device> + 'static
Tensor primitive to be used for all quantized operations.
type GraphPrimitive: Clone + Send + Sync + Debug + 'static
type GraphPrimitive: Clone + Send + Sync + Debug + 'static
Captured graph primitive returned by Backend::graph_stop_capture and
consumed by Backend::graph_replay: a backend-owned recording of a
launch sequence that replays as a single dispatch.
Backends without graph-capture support use GraphUnsupported, an
uninhabited type — their capture methods only ever error, so no value of
it can exist.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".