diff options
author | Tai Ly <tai.ly@arm.com> | 2024-03-21 17:01:14 +0000 |
---|---|---|
committer | Tai Ly <tai.ly@arm.com> | 2024-04-08 22:18:34 +0000 |
commit | ce911a2f1d9cd678fb9fe82a40c86ad0c6772f5a (patch) | |
tree | 68faf6d7b1c676705a022b32d8aa7950db03ab5e /python/tosa/MulAttribute.py | |
parent | 8f9e2842ce7d25645233ad4f6fa406be982346ae (diff) | |
download | serialization_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 'python/tosa/MulAttribute.py')
0 files changed, 0 insertions, 0 deletions