aboutsummaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2024-03-21 17:01:14 +0000
committerTai Ly <tai.ly@arm.com>2024-04-08 22:18:34 +0000
commitce911a2f1d9cd678fb9fe82a40c86ad0c6772f5a (patch)
tree68faf6d7b1c676705a022b32d8aa7950db03ab5e /schema
parent8f9e2842ce7d25645233ad4f6fa406be982346ae (diff)
downloadserialization_lib-ce911a2f1d9cd678fb9fe82a40c86ad0c6772f5a.tar.gz
Add conversions of U8 to/from BF16 and FP8
Adds type to PadAttribute and ClampAttribute so their pad_const and max_val/min_val can be deserialized according to type Adds conversion functions of U8 arrays to/from BF16/FP8 values Also, refactor and expose TosaSerializer.convertDataToUint8Vec for converting dtype/data to uint8 list for serialization And modify convertDataToUint8Vec to serialize bf16 values into 2 bytes each, and serialize fp8 values into single bytes each. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I05659e8187c76d359f1cc9f71c8c23cafd0e877f
Diffstat (limited to 'schema')
-rw-r--r--schema/tosa.fbs2
1 files changed, 2 insertions, 0 deletions
diff --git a/schema/tosa.fbs b/schema/tosa.fbs
index 79b83b1..7b5948b 100644
--- a/schema/tosa.fbs
+++ b/schema/tosa.fbs
@@ -185,6 +185,7 @@ table TransposeConvAttribute {
table PadAttribute {
pad_const: [ubyte] (force_align: 8);
+ type: DType;
}
table AxisAttribute {
@@ -201,6 +202,7 @@ table ResizeAttribute {
table ClampAttribute {
min_val: [ubyte] (force_align: 8);
max_val: [ubyte] (force_align: 8);
+ type: DType;
}
table RescaleAttribute {