BF16 support in TOSA serialization
Change-Id: I98072019e3dbbf1eab0bc95f74a4546ed82519db
Signed-off-by: James Ward <james.ward@arm.com>
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 @@
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 @@
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 @@
"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];
}