aboutsummaryrefslogtreecommitdiff
path: root/python/tosa/ClampAttribute.py
AgeCommit message (Collapse)Author
13 daysUpdate flatbuffer to v24.3.7Tai Ly
Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I9ab0e8ab4e3c37f1dd135b57661b25e18a5df5cb
2024-04-09[serialization_lib] Remove unused type field from Pad and ClampTai Ly
This patch removes the "type" field from PadAttribute and ClampAttribute because they are unused and unneeded. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I378291b340ecee86824f25b3887aa4511207db23
2024-04-08Add conversions of U8 to/from BF16 and FP8Tai Ly
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
2024-03-11[serialization_lib] Fix Clamp and Pad AttributesTai Ly
This patch implements following changes to attribute fields: - PadAttribute: delete padding field, replace pad_const_int and pad_const_fp fields by pad_const, a field of ubyte array - ClampAttribute: replace min_int, max_int, min_fp and max_fp fields by min_val and max_val, fields of ubyte arrays - RescaleAttribute: delete multiplier and shift fields Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I5b075d29677cffca9ff2292708141d48410e7e72
2023-07-18Update to use GenTextTai Ly
changed GenerateText to GenText, with reversed return polarity. updated flatbuffer to v23.5.26, and regenerated headers Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I7278dfe9c7b55b9afbe2329e3058b63a1cdce586
2023-01-18Schema changes for CLAMP, PAD float attributesJames Ward
* Float attributes now serialized as uint8 vectors, but treated as floats at input/output to serialization Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I417b0fabe0ef11fea263fe937b57d49bbfdb00da
2022-09-13Update serialization lib to flatbuffers 2.0.6Eric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I64ac03a2fa8711c2050efd5fedbc34a4c2a67bd5
2022-06-07Change to flatbuffers 1.12 as the submoduleEric Kunze
The code should be compatible with both flatbuffers 2.0 and 1.12 through try/except blocks. Generally other projects seem to still be using 1.12, so move the submodule back to 1.12 for maximum compatibility. Change-Id: I9733c7df0a7e4226f87473e19e48d3a80a3db6c6 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2021-11-16Update flatbuffer to v2.0.0Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ia09cb04a06015dd196d006a91a8c83924ff1b0c7
2021-10-29Remove copyright notice from generated headersEric Kunze
Copyright has not changed, it is governed by the LICENSE.txt in the root directory of the project. This avoids the need for manual updates of the generated headers. Change-Id: I4a877125dcd0510eb449bef22b1b16297bfaa190 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2021-04-26Initial commit of serialization library codeEric Kunze
Change-Id: Ie09a7245176aa799e59622e5118b145833b23590 Signed-off-by: Eric Kunze <eric.kunze@arm.com>