BackendTypes

Trait BackendTypes 

pub trait BackendTypes {
    type Device: DeviceOps;
    type FloatTensorPrimitive: TensorMetadata + 'static;
    type FloatElem: Element;
    type IntTensorPrimitive: TensorMetadata + 'static;
    type IntElem: Element;
    type BoolTensorPrimitive: TensorMetadata + 'static;
    type BoolElem: Element;
    type QuantizedTensorPrimitive: TensorMetadata + QTensorPrimitive + 'static;
}
Expand description

The mapping of types used by Backend and traits like Numeric, BasicOps

Required Associated Types§

type Device: DeviceOps

Device type.

type FloatTensorPrimitive: TensorMetadata + 'static

Tensor primitive to be used for all float operations.

type FloatElem: Element

Default float element type.

type IntTensorPrimitive: TensorMetadata + 'static

Tensor primitive to be used for all int operations.

type IntElem: Element

Int element type.

type BoolTensorPrimitive: TensorMetadata + 'static

Tensor primitive to be used for all bool operations.

type BoolElem: Element

Tensor primitive to be used for all bool operations.

type QuantizedTensorPrimitive: TensorMetadata + QTensorPrimitive + 'static

Tensor primitive to be used for all quantized operations.

Implementations on Foreign Types§

§

impl BackendTypes for Flex

§

type FloatElem = f32

Default float element type. Determines the dtype for .float() conversions and Tensor::from_data when no explicit dtype is provided. Prefer explicit dtypes via (&device, DType::F32).

§

type IntElem = i32

Default int element type. Determines the dtype for .int() conversions and Tensor::from_data when no explicit dtype is provided. Set to i32 to match burn’s ecosystem default (test suite, record settings, burn-remote). Prefer explicit dtypes via (&device, DType::I32).

§

type Device = FlexDevice

§

type FloatTensorPrimitive = FlexTensor

§

type IntTensorPrimitive = FlexTensor

§

type BoolTensorPrimitive = FlexTensor

§

type BoolElem = bool

§

type QuantizedTensorPrimitive = FlexQTensor

Implementors§