burn_tch/
element.rs

1use burn_tensor::Element;
2use half::{bf16, f16};
3
4/// The element type for the tch backend.
5pub trait TchElement: Element + tch::kind::Element {}
6
7impl TchElement for f64 {}
8impl TchElement for f32 {}
9impl TchElement for f16 {}
10impl TchElement for bf16 {}
11
12impl TchElement for i64 {}
13impl TchElement for i32 {}
14impl TchElement for i16 {}
15impl TchElement for i8 {}
16
17impl TchElement for u8 {}
18
19impl TchElement for bool {}