Skip to content

Commit

Permalink
AsPrimitive f16 <-> bf16
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-r-earp committed Feb 22, 2024
1 parent a513d3b commit 3223add
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/num_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ impl_as_primitive_to_f16!(isize, to_f32);
impl_as_primitive_to_f16!(usize, to_f32);
impl_as_primitive_to_f16!(f32, to_f32);
impl_as_primitive_to_f16!(f64, to_f64);
impl_as_primitive_to_f16!(bf16, to_f32);

macro_rules! impl_as_primitive_f16_from {
($ty:ty, $meth:ident) => {
Expand Down Expand Up @@ -1457,6 +1458,7 @@ impl_as_primitive_to_bf16!(isize, to_f32);
impl_as_primitive_to_bf16!(usize, to_f32);
impl_as_primitive_to_bf16!(f32, to_f32);
impl_as_primitive_to_bf16!(f64, to_f64);
impl_as_primitive_to_bf16!(f16, to_f32);

macro_rules! impl_as_primitive_bf16_from {
($ty:ty, $meth:ident) => {
Expand Down

0 comments on commit 3223add

Please sign in to comment.