aboutsummaryrefslogtreecommitdiff
path: root/python/tosa
AgeCommit message (Collapse)Author
7 daysUpdate flatbuffer to v24.3.7HEADmainTai Ly
Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I9ab0e8ab4e3c37f1dd135b57661b25e18a5df5cb
2024-04-18Remove TRANSPOSE_CONV2D out_shape argumentSuraj Sudhir
Change-Id: I1a52c596ea225355fe505f783d875a01023ff63e
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-13[serialization_lib] Add acc_type to Conv AttrsTai Ly
This adds acc_type to ConvAttribute and TransposeConvAttribute Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I73bab71b2eb90f6451fadee21d5bed1811ecbfd7
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
2024-02-22[serialization_lib] Align to Tosa SpecTai Ly
removed attributes for Reshape, Slice and Tile Ops renamed field accum_dtype to acc_type, renamed then_branch/else_branch to then_graph/else_graph renamed cond_branch/body_branch to cond_graph/body_graph Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I2001f19519987d9e64c18b1f11762f9d3b9be4ec
2024-02-20Add Tosa Sin/Cos to schemaJerry Ge
- Add Tosa Sin/Cos to the serialization_lib schema - Generated related header files with the new schema Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: If424ff2b64538e8ffd5342b6ebb9a022537d5c4c
2024-02-06[serialization_lib] Add support for FP8E4M3 and FP8E5M2Won Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ife50592890be020b6c6122581eeb2175c8f331e0
2024-01-12[serialization_lib] Add tosa shape opsTai Ly
Added tosa shape ops to tosa.fbs also added convert I64 to and from U8 for storing const_shape data values Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I1e938dec7398fbcbe5be657dad65cdd61af5b597
2023-11-09Update CustomOp's attribute NamesJerry Ge
- CustomOp's two attribute names have been changed to - domain to domain_name - operator to operator_name Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I382ff2cf98da0487f096938c3693428e91dce386
2023-11-01Add support for local_bound attributeEric Kunze
local_bound is used to determine when fast convolution algorithms can be used in implementing the operation. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I9970a2544e90a620f46ac4d3d01cec90a15710a9
2023-09-19Add variable_name to tensorsTai Ly
Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ia142c8b1a9e0869daefb3eef71100fd0c2a0effc
2023-09-07Add new signedness attributes to RESCALEEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I96202b90bff833654735a2f2306eb782d202b6e6
2023-08-23Add is_unranked flag to TensorsTai Ly
This adds a bool field, is_unranked to TosaTensor in tosa.fbs to indicate whether a tensor with shape = {} is an unranked tensor or an 0-D tensor. For older tosa files without this field, the default value is false. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I86950050b522565509863c483cd3a3c1c50f8f69
2023-08-22[Serialization_lib] Support StatefulOps for TOSAJerry Ge
- Add variable in TosaTensor to schema file - Update TosaSerializationTensor regarding variable change - Rename internal zero_pad() and expose interface as ForceAlignTensorData() Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I36fa64eb0802cb5b8d3564ea7233460ef8c9f539
2023-08-10Add DIM operator to serialization libraryWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: I7c68f94a088e206c99d34d152601cf342bff5541
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-06-07Add ERF operator to serialization_libWon Jeon
Signed-off-by: Won Jeon <won.jeon@arm.com> Change-Id: Idc253e51e7a613cfc0c7da653073a71bf0fcb162
2023-05-23Change default value for draft versionEric Kunze
Default draft = True means that a TOSA flatbuffer with no value stored for the draft flag is true. Serialized TOSA with draft = False are release versions. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1304292ef83008a61a2a72e03171d00d5fe13442
2023-05-18Modify TOSA schema to force version to be writtenEric Kunze
Previously if the values were the default, they would not be written to the file Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ibdf13d3ce672d3e8f062a7853d65a966ab5b0877
2023-03-16Update version to 0.70.0 draftEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ie139b262f7bd5966e72a3535ac2253e13d7b3604
2023-03-08Update version number to 0.60 for releasev0.60.0Eric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I2eb93e6e88ee358c9ec9562c3b4d876eb41cc38c
2023-01-23Remove accumulator attributes from all but AVG_POOL2DJames Ward
* Also add missing CustomAttribute.py (flatbuffers generated file) Signed-off-by: James Ward <james.ward@arm.com> Change-Id: Ib71847e03d622995dd86afcb6ec9ed2bc147ee7a
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
2023-01-13Add FFT2d and RFFT2d serialization supportLuke Hutton
Signed-off-by: Luke Hutton <luke.hutton@arm.com> Change-Id: I79b3684ae1cf24e71ec7098ed7db5be5bc2f6fb2
2023-01-04Add attributes to serialization of custom opEric Kunze
Change-Id: I4a1d7675b247efcf34aadd59eac17b966e3705af Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-12-15[region] Add TosaSerializationRegion to serialization_libJerry Ge
- Rationale: add this fix to support constants access between multiple blocks by another layer of abstraction called Region - Changes: - flatbuffers schema update, regenerate header files - add TosaSerializationRegion for the handler - other relevant fixes Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I4bb72503abfd629ae017d2f905184efbab244aa8
2022-12-07Update revision to 0.51.0 draftEric Kunze
Change-Id: I6adfd59be1799fc004c9051daa409c902bc4bd1d
2022-12-06Update serialization lib version to 0.50.0v0.50.0v0.50Eric Kunze
In preparation for release Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I58337a835b2afa47f80f27e4a0ebc70836a544ab
2022-10-26BF16 support in TOSA serializationJames Ward
Change-Id: I98072019e3dbbf1eab0bc95f74a4546ed82519db Signed-off-by: James Ward <james.ward@arm.com>
2022-10-04Rename FLOAT type to FP32Jeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I2cd6ae85f59fd62a62b7f03ae9667228b54e82db
2022-10-04FP16 support in serializationJames Ward
* Allow serialization of fp16 data * Add package to support integrated half data-type (half_float::half), independent of native float: http://half.sourceforge.net/ * Allow passing of accumulate data-type in serialization Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I54357f02e3776d81958228f699ea5044f2014f4b
2022-09-15Fix for CONST floats always truncated to integer values.Jeremy Johnson
Add way of saving CONSTs to numpy file for testing purposes. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ic3a22da8ec3432037832374090b7ceff345d48de
2022-09-13Update serialization lib to flatbuffers 2.0.6Eric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I64ac03a2fa8711c2050efd5fedbc34a4c2a67bd5
2022-09-08Increment revision to 0.41 draftEric Kunze
Change-Id: I34cc007cb9efc659fe772299217b9178cead9ce0
2022-08-30Remove draft tag for 0.40 releasev0.40.0v0.40Eric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I9ca5eb956b2ea7eb01e34ecbfb250748abdd0f04
2022-08-29Update version to 0.40 draftEric Kunze
In preparation for version 0.40 release Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I8c02f88bf8af7bdc6f23671bae057748f612e820
2022-08-03Update TOSA resize to match specificationTatWai Chong
Attribute stride and shift are removed, and has new scale and border. For serializing int16 attributes, add a new member vector container and a building function to do so. Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: I6d101a37d294dcf0a4d5bbb6c64bfa3c49a98f9e
2022-07-06Bump schema version number to 0.31 draftEric Kunze
0.30 is released, future schema changes need a new version number. Change-Id: I812d6f2a2539b21f902990298bda570cb1166a42
2022-06-16Remove the draft tag from the schema for v0.30v0.30.0v0.30Eric Kunze
Preparing for v0.30 release Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I5426515f7cf0f83c9f606050969c94667f2dabb9
2022-06-15Remove quantinfo typesEric Kunze
Any needed information has been moved into the attributes for each operator. This aligns with the structure of the attributes in the TOSA specification, and generally simplifies the code. Change-Id: I8243e91b09de1a9115f8af09c5e7def7e8f2866b Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-06-13Remove dilation from transpose_conv2dEric Kunze
The specification does not have dilation for transpose_conv2d. Removed dilation from the attributes for transpose. Rename outpad to out_pad for transpose conv2d to align with specification Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ifb0fb7121a6bf33601420366ce86f2f0b56353de
2022-06-13Increment version to 0.25Eric Kunze
Also insert the TOSA file identifier in the flatbuffer. Reports a warning if the identifier is not present when loading. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1cd4a9cc78e898ba5015e29be1c65cb640dd6a00
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>
2022-06-07Align the serialization schema with TOSA 0.24.0 specificationTatWai Chong
The operators are pool, conv, reshape, slice, transpose, and table. Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: I425ab407e699159f75834f31ad2d48e206c71749
2022-05-26Add support for uint16_tJeremy Johnson
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ieab5c56db49549726dd5efb0d9b728713fc6f86a
2021-11-16Update flatbuffer to v2.0.0Kevin Cheng
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ia09cb04a06015dd196d006a91a8c83924ff1b0c7
2021-11-03Increment version to 0.24.0 draftEric Kunze
Main branch is now 0.24.0 draft version. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I053fc2f87c05e3237c10a8d41b1833591087651a
2021-10-29Remove draft tag for 0.23 releasev0.23.0v0.23Eric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I928b5ebb90b148acddff4a1a6c9e05e1791196a8