diff options
author | wilisa01 <william.isaksson@arm.com> | 2022-12-22 08:00:08 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2023-01-20 15:49:01 +0000 |
commit | 82593deacc7e97b9a667469bcee4392b78a7a768 (patch) | |
tree | ad99b40940ebe67e1bbf23491898e77c9984c5bf /ethosu/vela | |
parent | 3b1578e44b4c6a8c8c9a8e0891d3866a89bd66af (diff) | |
download | ethos-u-vela-82593deacc7e97b9a667469bcee4392b78a7a768.tar.gz |
MLBEDSW-6954: Update to TensorFlow 2.11
Updated FlatBuffers autogenerated files to TensorFlow 2.11
Change-Id: Ied60f9fbacdcf91ec8d289cafbde0d88169bb349
Signed-off-by: wilisa01 <william.isaksson@arm.com>
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/tflite/TensorType.py | 1 | ||||
-rw-r--r-- | ethosu/vela/tflite/TransposeConvOptions.py | 12 | ||||
-rw-r--r-- | ethosu/vela/tflite_mapping.py | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/ethosu/vela/tflite/TensorType.py b/ethosu/vela/tflite/TensorType.py index 621d0c54..604d4362 100644 --- a/ethosu/vela/tflite/TensorType.py +++ b/ethosu/vela/tflite/TensorType.py @@ -20,3 +20,4 @@ class TensorType(object): VARIANT = 14 UINT32 = 15 UINT16 = 16 + INT4 = 17 diff --git a/ethosu/vela/tflite/TransposeConvOptions.py b/ethosu/vela/tflite/TransposeConvOptions.py index a11a79e9..af9159c2 100644 --- a/ethosu/vela/tflite/TransposeConvOptions.py +++ b/ethosu/vela/tflite/TransposeConvOptions.py @@ -49,7 +49,14 @@ class TransposeConvOptions(object): return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def TransposeConvOptionsStart(builder): builder.StartObject(3) + # TransposeConvOptions + def FusedActivationFunction(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + +def TransposeConvOptionsStart(builder): builder.StartObject(4) def Start(builder): return TransposeConvOptionsStart(builder) def TransposeConvOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0) @@ -61,6 +68,9 @@ def AddStrideW(builder, strideW): def TransposeConvOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(2, strideH, 0) def AddStrideH(builder, strideH): return TransposeConvOptionsAddStrideH(builder, strideH) +def TransposeConvOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(3, fusedActivationFunction, 0) +def AddFusedActivationFunction(builder, fusedActivationFunction): + return TransposeConvOptionsAddFusedActivationFunction(builder, fusedActivationFunction) def TransposeConvOptionsEnd(builder): return builder.EndObject() def End(builder): return TransposeConvOptionsEnd(builder)
\ No newline at end of file diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py index 8ec01737..11f74ba9 100644 --- a/ethosu/vela/tflite_mapping.py +++ b/ethosu/vela/tflite_mapping.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates <open-source-office@arm.com> +# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> # # SPDX-License-Identifier: Apache-2.0 # @@ -162,6 +162,7 @@ def inverse_map(map): datatype_map = { + TensorType.INT4: DataType.int4, TensorType.UINT8: DataType.uint8, TensorType.INT8: DataType.int8, TensorType.INT16: DataType.int16, @@ -184,6 +185,7 @@ datatype_map = { datatype_inv_map = inverse_map(datatype_map) datatype_inv_map[DataType.quint8] = TensorType.UINT8 +datatype_inv_map[DataType.qint4] = TensorType.INT4 datatype_inv_map[DataType.qint8] = TensorType.INT8 datatype_inv_map[DataType.qint16] = TensorType.INT16 datatype_inv_map[DataType.qint32] = TensorType.INT32 |