Skip to content

Commit

Permalink
Merge pull request #101 from charles-r-earp/as_primitive_f16_to_bf16
Browse files Browse the repository at this point in the history
AsPrimitive f16 <-> bf16
  • Loading branch information
starkat99 authored Feb 26, 2024
2 parents 1b59e9e + 3223add commit 7cf20dc
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 7cf20dc

Please sign in to comment.