diff options
author | Won Jeon <won.jeon@arm.com> | 2023-12-29 22:43:11 +0000 |
---|---|---|
committer | Tai Ly <tai.ly@arm.com> | 2024-02-06 19:07:37 +0000 |
commit | a029f1f02707f40f6990df53fd4f56684490d58f (patch) | |
tree | 7054cd1d91d68ec87d1f052efec82dbd7d025009 /include | |
parent | 8137a4369acefa4c01f08db95a2b1b290e8dd70a (diff) | |
download | serialization_lib-a029f1f02707f40f6990df53fd4f56684490d58f.tar.gz |
[serialization_lib] Add support for FP8E4M3 and FP8E5M2
Signed-off-by: Won Jeon <won.jeon@arm.com>
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: Ife50592890be020b6c6122581eeb2175c8f331e0
Diffstat (limited to 'include')
-rw-r--r-- | include/tosa_generated.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/tosa_generated.h b/include/tosa_generated.h index 2ecd35a..b5a8bd5 100644 --- a/include/tosa_generated.h +++ b/include/tosa_generated.h @@ -116,11 +116,13 @@ enum DType : uint32_t { DType_FP16 = 10, DType_BF16 = 11, DType_SHAPE = 12, + DType_FP8E4M3 = 13, + DType_FP8E5M2 = 14, DType_MIN = DType_UNKNOWN, - DType_MAX = DType_SHAPE + DType_MAX = DType_FP8E5M2 }; -inline const DType (&EnumValuesDType())[13] { +inline const DType (&EnumValuesDType())[15] { static const DType values[] = { DType_UNKNOWN, DType_BOOL, @@ -134,13 +136,15 @@ inline const DType (&EnumValuesDType())[13] { DType_UINT16, DType_FP16, DType_BF16, - DType_SHAPE + DType_SHAPE, + DType_FP8E4M3, + DType_FP8E5M2 }; return values; } inline const char * const *EnumNamesDType() { - static const char * const names[14] = { + static const char * const names[16] = { "UNKNOWN", "BOOL", "UINT8", @@ -154,13 +158,15 @@ inline const char * const *EnumNamesDType() { "FP16", "BF16", "SHAPE", + "FP8E4M3", + "FP8E5M2", nullptr }; return names; } inline const char *EnumNameDType(DType e) { - if (::flatbuffers::IsOutRange(e, DType_UNKNOWN, DType_SHAPE)) return ""; + if (::flatbuffers::IsOutRange(e, DType_UNKNOWN, DType_FP8E5M2)) return ""; const size_t index = static_cast<size_t>(e); return EnumNamesDType()[index]; } |