diff options
Diffstat (limited to 'reference_model/src/ops/template_types.h')
-rw-r--r-- | reference_model/src/ops/template_types.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/reference_model/src/ops/template_types.h b/reference_model/src/ops/template_types.h index 3de4899..647ca84 100644 --- a/reference_model/src/ops/template_types.h +++ b/reference_model/src/ops/template_types.h @@ -19,6 +19,8 @@ #include "tosa_generated.h" #include <Eigen/CXX11/Tensor> #include "half.hpp" +#include <Eigen/Core> +#include "arith_util.h" using namespace tosa; @@ -76,6 +78,12 @@ struct GetEigenType<DType_FP16> using type = float; }; template <> +struct GetEigenType<DType_BF16> +{ + // NOTE: full precision used + using type = float; +}; +template <> struct GetEigenType<DType_INT32> { using type = int32_t; @@ -132,12 +140,6 @@ struct GetAccEigenType using type = typename GetEigenType<Dtype>::type; }; -template <DType Dtype> -struct GetHalfEigenType -{ - using type = half_float::half; -}; - // Meta function to get number of bits template <DType T> struct GetNumBits |