From d048eec04c2c01af44124be1782a7739c6520273 Mon Sep 17 00:00:00 2001 From: Bo Wun Cheng Date: Tue, 19 Mar 2024 16:34:22 -0700 Subject: [PATCH] added bf16 to DAMType --- Cargo.toml | 1 + src/types/scalar.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f4f473d..5c7434d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ serde_json = "1.0.103" enum_dispatch = "0.3.12" petgraph = "0.6.3" rustc-hash = "1.1.0" +half = "2.4.0" # For running different thread priorities and enabling FIFO Execution thread-priority = "0.13.1" diff --git a/src/types/scalar.rs b/src/types/scalar.rs index 40c3cf0..21e72b7 100644 --- a/src/types/scalar.rs +++ b/src/types/scalar.rs @@ -2,6 +2,7 @@ //! This registers the common datatypes as statically sized DAMTypes, such as u64, f32, etc. use super::StaticallySized; +use half::bf16; macro_rules! builtin_ss { ($tp: tt, $nbits: literal) => { @@ -23,6 +24,7 @@ builtin_ss!(u64, 64); builtin_ss!(f32, 32); builtin_ss!(f64, 64); +builtin_ss!(bf16, 16); impl StaticallySized for usize { const SIZE: usize = unimplemented!();