aboutsummaryrefslogtreecommitdiff
path: root/include/tosa_generated.h
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2022-10-18 17:27:40 +0100
committerJames Ward <james.ward@arm.com>2022-10-26 11:57:21 +0100
commit34a627959a61b4eccbeea4400cf9684debb331dc (patch)
tree7b6be68e49010f9a621c8e8f67f55163a534fe69 /include/tosa_generated.h
parente1072a9ed871fd474e7b09b7a74ae7be5f0a6f78 (diff)
downloadserialization_lib-34a627959a61b4eccbeea4400cf9684debb331dc.tar.gz
BF16 support in TOSA serialization
Change-Id: I98072019e3dbbf1eab0bc95f74a4546ed82519db Signed-off-by: James Ward <james.ward@arm.com>
Diffstat (limited to 'include/tosa_generated.h')
-rw-r--r--include/tosa_generated.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/tosa_generated.h b/include/tosa_generated.h
index 2b9d0ea..f36ed37 100644
--- a/include/tosa_generated.h
+++ b/include/tosa_generated.h
@@ -95,11 +95,12 @@ enum DType : uint32_t {
DType_FP32 = 8,
DType_UINT16 = 9,
DType_FP16 = 10,
+ DType_BF16 = 11,
DType_MIN = DType_UNKNOWN,
- DType_MAX = DType_FP16
+ DType_MAX = DType_BF16
};
-inline const DType (&EnumValuesDType())[11] {
+inline const DType (&EnumValuesDType())[12] {
static const DType values[] = {
DType_UNKNOWN,
DType_BOOL,
@@ -111,13 +112,14 @@ inline const DType (&EnumValuesDType())[11] {
DType_INT48,
DType_FP32,
DType_UINT16,
- DType_FP16
+ DType_FP16,
+ DType_BF16
};
return values;
}
inline const char * const *EnumNamesDType() {
- static const char * const names[12] = {
+ static const char * const names[13] = {
"UNKNOWN",
"BOOL",
"UINT8",
@@ -129,13 +131,14 @@ inline const char * const *EnumNamesDType() {
"FP32",
"UINT16",
"FP16",
+ "BF16",
nullptr
};
return names;
}
inline const char *EnumNameDType(DType e) {
- if (flatbuffers::IsOutRange(e, DType_UNKNOWN, DType_FP16)) return "";
+ if (flatbuffers::IsOutRange(e, DType_UNKNOWN, DType_BF16)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesDType()[index];
}