MLBEDSW-2734: TensorFlow 2.3 compatibility

Compiled the new TensorFlow 2.3 schema and added the new Operator
BatchMatMul to tflite_mapping.py.

Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com>
Change-Id: Ie62517bd56a6497820e4f1ef20326a4fd2ca89b0
diff --git a/PYPI.md b/PYPI.md
index 2024ecf..82fa522 100644
--- a/PYPI.md
+++ b/PYPI.md
@@ -25,8 +25,7 @@
 
 ## TensorFlow Support
 
-Vela supports TensorFlow 2.1.0 (for experimental Int16 support please use the
-latest nightly build of TensorFlow).
+Vela supports TensorFlow 2.3.0
 
 ## Environment
 
diff --git a/README.md b/README.md
index 56e3d44..54e3cbf 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,7 @@
 
 ## TensorFlow Support
 
-Vela supports TensorFlow 2.1.0 (for experimental Int16 support please use the
-latest nightly build of TensorFlow).
+Vela supports TensorFlow 2.3.0
 
 ## Environment
 
diff --git a/ethosu/vela/data_type.py b/ethosu/vela/data_type.py
index 4d05fef..a4b7b53 100644
--- a/ethosu/vela/data_type.py
+++ b/ethosu/vela/data_type.py
@@ -115,3 +115,4 @@
 DataType.resource = DataType(BaseType.Resource, 8)
 DataType.variant = DataType(BaseType.Variant, 8)
 DataType.complex64 = DataType(BaseType.Complex, 64)
+DataType.complex128 = DataType(BaseType.Complex, 128)
diff --git a/ethosu/vela/tflite/ActivationFunctionType.py b/ethosu/vela/tflite/ActivationFunctionType.py
index 6d8ec95..dc177de 100644
--- a/ethosu/vela/tflite/ActivationFunctionType.py
+++ b/ethosu/vela/tflite/ActivationFunctionType.py
@@ -9,3 +9,4 @@
     RELU6 = 3
     TANH = 4
     SIGN_BIT = 5
+
diff --git a/ethosu/vela/tflite/AddOptions.py b/ethosu/vela/tflite/AddOptions.py
index d6cbfcf..154e6d1 100644
--- a/ethosu/vela/tflite/AddOptions.py
+++ b/ethosu/vela/tflite/AddOptions.py
@@ -25,6 +25,14 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def AddOptionsStart(builder): builder.StartObject(1)
+    # AddOptions
+    def PotScaleInt16(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return True
+
+def AddOptionsStart(builder): builder.StartObject(2)
 def AddOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def AddOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1)
 def AddOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/BatchMatMulOptions.py b/ethosu/vela/tflite/BatchMatMulOptions.py
new file mode 100644
index 0000000..5be6683
--- /dev/null
+++ b/ethosu/vela/tflite/BatchMatMulOptions.py
@@ -0,0 +1,38 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class BatchMatMulOptions(object):
+    __slots__ = ['_tab']
+
+    @classmethod
+    def GetRootAsBatchMatMulOptions(cls, buf, offset):
+        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+        x = BatchMatMulOptions()
+        x.Init(buf, n + offset)
+        return x
+
+    # BatchMatMulOptions
+    def Init(self, buf, pos):
+        self._tab = flatbuffers.table.Table(buf, pos)
+
+    # BatchMatMulOptions
+    def AdjX(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+    # BatchMatMulOptions
+    def AdjY(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def BatchMatMulOptionsStart(builder): builder.StartObject(2)
+def BatchMatMulOptionsAddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0)
+def BatchMatMulOptionsAddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0)
+def BatchMatMulOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
index 8d8b7be..0a0a83b 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
@@ -53,10 +53,18 @@
             return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
         return True
 
-def BidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(5)
+    # BidirectionalSequenceLSTMOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def BidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(6)
 def BidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
 def BidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
 def BidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
 def BidirectionalSequenceLSTMOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(3, mergeOutputs, 0)
 def BidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(4, timeMajor, 1)
+def BidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(5, asymmetricQuantizeInputs, 0)
 def BidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
index 673af6b..e1f66ce 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
@@ -39,8 +39,16 @@
             return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
         return False
 
-def BidirectionalSequenceRNNOptionsStart(builder): builder.StartObject(3)
+    # BidirectionalSequenceRNNOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def BidirectionalSequenceRNNOptionsStart(builder): builder.StartObject(4)
 def BidirectionalSequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0)
 def BidirectionalSequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
 def BidirectionalSequenceRNNOptionsAddMergeOutputs(builder, mergeOutputs): builder.PrependBoolSlot(2, mergeOutputs, 0)
+def BidirectionalSequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0)
 def BidirectionalSequenceRNNOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/BuiltinOperator.py b/ethosu/vela/tflite/BuiltinOperator.py
index 2713653..fb23155 100644
--- a/ethosu/vela/tflite/BuiltinOperator.py
+++ b/ethosu/vela/tflite/BuiltinOperator.py
@@ -129,3 +129,5 @@
     SELECT_V2 = 123
     DENSIFY = 124
     SEGMENT_SUM = 125
+    BATCH_MATMUL = 126
+
diff --git a/ethosu/vela/tflite/BuiltinOptions.py b/ethosu/vela/tflite/BuiltinOptions.py
index babbcb1..6f0aab0 100644
--- a/ethosu/vela/tflite/BuiltinOptions.py
+++ b/ethosu/vela/tflite/BuiltinOptions.py
@@ -104,3 +104,5 @@
     SelectV2Options = 98
     DensifyOptions = 99
     SegmentSumOptions = 100
+    BatchMatMulOptions = 101
+
diff --git a/ethosu/vela/tflite/CombinerType.py b/ethosu/vela/tflite/CombinerType.py
index 1e3a61f..17d9151 100644
--- a/ethosu/vela/tflite/CombinerType.py
+++ b/ethosu/vela/tflite/CombinerType.py
@@ -6,3 +6,4 @@
     SUM = 0
     MEAN = 1
     SQRTN = 2
+
diff --git a/ethosu/vela/tflite/CustomOptionsFormat.py b/ethosu/vela/tflite/CustomOptionsFormat.py
index c2fc07c..bef384c 100644
--- a/ethosu/vela/tflite/CustomOptionsFormat.py
+++ b/ethosu/vela/tflite/CustomOptionsFormat.py
@@ -4,3 +4,4 @@
 
 class CustomOptionsFormat(object):
     FLEXBUFFERS = 0
+
diff --git a/ethosu/vela/tflite/DimensionType.py b/ethosu/vela/tflite/DimensionType.py
index 310d8ee..a27d016 100644
--- a/ethosu/vela/tflite/DimensionType.py
+++ b/ethosu/vela/tflite/DimensionType.py
@@ -5,3 +5,4 @@
 class DimensionType(object):
     DENSE = 0
     SPARSE_CSR = 1
+
diff --git a/ethosu/vela/tflite/FullyConnectedOptions.py b/ethosu/vela/tflite/FullyConnectedOptions.py
index a6b4e40..5475e3d 100644
--- a/ethosu/vela/tflite/FullyConnectedOptions.py
+++ b/ethosu/vela/tflite/FullyConnectedOptions.py
@@ -39,8 +39,16 @@
             return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
         return False
 
-def FullyConnectedOptionsStart(builder): builder.StartObject(3)
+    # FullyConnectedOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def FullyConnectedOptionsStart(builder): builder.StartObject(4)
 def FullyConnectedOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
 def FullyConnectedOptionsAddWeightsFormat(builder, weightsFormat): builder.PrependInt8Slot(1, weightsFormat, 0)
 def FullyConnectedOptionsAddKeepNumDims(builder, keepNumDims): builder.PrependBoolSlot(2, keepNumDims, 0)
+def FullyConnectedOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(3, asymmetricQuantizeInputs, 0)
 def FullyConnectedOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py b/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
index d9a5388..6d81eca 100644
--- a/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
+++ b/ethosu/vela/tflite/FullyConnectedOptionsWeightsFormat.py
@@ -5,3 +5,4 @@
 class FullyConnectedOptionsWeightsFormat(object):
     DEFAULT = 0
     SHUFFLED4x16INT8 = 1
+
diff --git a/ethosu/vela/tflite/LSHProjectionType.py b/ethosu/vela/tflite/LSHProjectionType.py
index a7d6a31..d6a136e 100644
--- a/ethosu/vela/tflite/LSHProjectionType.py
+++ b/ethosu/vela/tflite/LSHProjectionType.py
@@ -6,3 +6,4 @@
     UNKNOWN = 0
     SPARSE = 1
     DENSE = 2
+
diff --git a/ethosu/vela/tflite/LSTMKernelType.py b/ethosu/vela/tflite/LSTMKernelType.py
index fd65799..1ca4df0 100644
--- a/ethosu/vela/tflite/LSTMKernelType.py
+++ b/ethosu/vela/tflite/LSTMKernelType.py
@@ -5,3 +5,4 @@
 class LSTMKernelType(object):
     FULL = 0
     BASIC = 1
+
diff --git a/ethosu/vela/tflite/LSTMOptions.py b/ethosu/vela/tflite/LSTMOptions.py
index 93a8309..2f519bc 100644
--- a/ethosu/vela/tflite/LSTMOptions.py
+++ b/ethosu/vela/tflite/LSTMOptions.py
@@ -46,9 +46,17 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def LSTMOptionsStart(builder): builder.StartObject(4)
+    # LSTMOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def LSTMOptionsStart(builder): builder.StartObject(5)
 def LSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
 def LSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
 def LSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
 def LSTMOptionsAddKernelType(builder, kernelType): builder.PrependInt8Slot(3, kernelType, 0)
+def LSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0)
 def LSTMOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/MirrorPadMode.py b/ethosu/vela/tflite/MirrorPadMode.py
index 8fb6396..ce7579d 100644
--- a/ethosu/vela/tflite/MirrorPadMode.py
+++ b/ethosu/vela/tflite/MirrorPadMode.py
@@ -5,3 +5,4 @@
 class MirrorPadMode(object):
     REFLECT = 0
     SYMMETRIC = 1
+
diff --git a/ethosu/vela/tflite/Padding.py b/ethosu/vela/tflite/Padding.py
index 168bf74..6027f4b 100644
--- a/ethosu/vela/tflite/Padding.py
+++ b/ethosu/vela/tflite/Padding.py
@@ -5,3 +5,4 @@
 class Padding(object):
     SAME = 0
     VALID = 1
+
diff --git a/ethosu/vela/tflite/QuantizationDetails.py b/ethosu/vela/tflite/QuantizationDetails.py
index 8d53af9..7159efb 100644
--- a/ethosu/vela/tflite/QuantizationDetails.py
+++ b/ethosu/vela/tflite/QuantizationDetails.py
@@ -5,3 +5,4 @@
 class QuantizationDetails(object):
     NONE = 0
     CustomQuantization = 1
+
diff --git a/ethosu/vela/tflite/RNNOptions.py b/ethosu/vela/tflite/RNNOptions.py
index 3cfdb6a..397d716 100644
--- a/ethosu/vela/tflite/RNNOptions.py
+++ b/ethosu/vela/tflite/RNNOptions.py
@@ -25,6 +25,14 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def RNNOptionsStart(builder): builder.StartObject(1)
+    # RNNOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def RNNOptionsStart(builder): builder.StartObject(2)
 def RNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def RNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(1, asymmetricQuantizeInputs, 0)
 def RNNOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
index 4b166e9..e2642ce 100644
--- a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
+++ b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
@@ -25,6 +25,14 @@
             return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
         return False
 
-def ResizeNearestNeighborOptionsStart(builder): builder.StartObject(1)
+    # ResizeNearestNeighborOptions
+    def HalfPixelCenters(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def ResizeNearestNeighborOptionsStart(builder): builder.StartObject(2)
 def ResizeNearestNeighborOptionsAddAlignCorners(builder, alignCorners): builder.PrependBoolSlot(0, alignCorners, 0)
+def ResizeNearestNeighborOptionsAddHalfPixelCenters(builder, halfPixelCenters): builder.PrependBoolSlot(1, halfPixelCenters, 0)
 def ResizeNearestNeighborOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/SVDFOptions.py b/ethosu/vela/tflite/SVDFOptions.py
index 6f391db..e4b3461 100644
--- a/ethosu/vela/tflite/SVDFOptions.py
+++ b/ethosu/vela/tflite/SVDFOptions.py
@@ -32,7 +32,15 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def SVDFOptionsStart(builder): builder.StartObject(2)
+    # SVDFOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def SVDFOptionsStart(builder): builder.StartObject(3)
 def SVDFOptionsAddRank(builder, rank): builder.PrependInt32Slot(0, rank, 0)
 def SVDFOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def SVDFOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
 def SVDFOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/SequenceRNNOptions.py b/ethosu/vela/tflite/SequenceRNNOptions.py
index 74a4954..16eaf09 100644
--- a/ethosu/vela/tflite/SequenceRNNOptions.py
+++ b/ethosu/vela/tflite/SequenceRNNOptions.py
@@ -32,7 +32,15 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def SequenceRNNOptionsStart(builder): builder.StartObject(2)
+    # SequenceRNNOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def SequenceRNNOptionsStart(builder): builder.StartObject(3)
 def SequenceRNNOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(0, timeMajor, 0)
 def SequenceRNNOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(1, fusedActivationFunction, 0)
+def SequenceRNNOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
 def SequenceRNNOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/SparseIndexVector.py b/ethosu/vela/tflite/SparseIndexVector.py
index e2c9db7..fd35a03 100644
--- a/ethosu/vela/tflite/SparseIndexVector.py
+++ b/ethosu/vela/tflite/SparseIndexVector.py
@@ -7,3 +7,4 @@
     Int32Vector = 1
     Uint16Vector = 2
     Uint8Vector = 3
+
diff --git a/ethosu/vela/tflite/SubOptions.py b/ethosu/vela/tflite/SubOptions.py
index eccd7ab..c3ed40e 100644
--- a/ethosu/vela/tflite/SubOptions.py
+++ b/ethosu/vela/tflite/SubOptions.py
@@ -25,6 +25,14 @@
             return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
         return 0
 
-def SubOptionsStart(builder): builder.StartObject(1)
+    # SubOptions
+    def PotScaleInt16(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return True
+
+def SubOptionsStart(builder): builder.StartObject(2)
 def SubOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
+def SubOptionsAddPotScaleInt16(builder, potScaleInt16): builder.PrependBoolSlot(1, potScaleInt16, 1)
 def SubOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/TensorType.py b/ethosu/vela/tflite/TensorType.py
index 53c011b..e010881 100644
--- a/ethosu/vela/tflite/TensorType.py
+++ b/ethosu/vela/tflite/TensorType.py
@@ -13,3 +13,6 @@
     INT16 = 7
     COMPLEX64 = 8
     INT8 = 9
+    FLOAT64 = 10
+    COMPLEX128 = 11
+
diff --git a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
index 1b0c112..b734f3f 100644
--- a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
@@ -46,9 +46,17 @@
             return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
         return False
 
-def UnidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(4)
+    # UnidirectionalSequenceLSTMOptions
+    def AsymmetricQuantizeInputs(self):
+        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+        if o != 0:
+            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+        return False
+
+def UnidirectionalSequenceLSTMOptionsStart(builder): builder.StartObject(5)
 def UnidirectionalSequenceLSTMOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(0, fusedActivationFunction, 0)
 def UnidirectionalSequenceLSTMOptionsAddCellClip(builder, cellClip): builder.PrependFloat32Slot(1, cellClip, 0.0)
 def UnidirectionalSequenceLSTMOptionsAddProjClip(builder, projClip): builder.PrependFloat32Slot(2, projClip, 0.0)
 def UnidirectionalSequenceLSTMOptionsAddTimeMajor(builder, timeMajor): builder.PrependBoolSlot(3, timeMajor, 0)
+def UnidirectionalSequenceLSTMOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(4, asymmetricQuantizeInputs, 0)
 def UnidirectionalSequenceLSTMOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py
index adf3462..c25f415 100644
--- a/ethosu/vela/tflite_mapping.py
+++ b/ethosu/vela/tflite_mapping.py
@@ -27,6 +27,7 @@
 from .tflite import AddOptions
 from .tflite import ArgMaxOptions
 from .tflite import ArgMinOptions
+from .tflite import BatchMatMulOptions
 from .tflite import BatchToSpaceNDOptions
 from .tflite import BidirectionalSequenceLSTMOptions
 from .tflite import BidirectionalSequenceRNNOptions
@@ -141,9 +142,11 @@
     TensorType.INT64: DataType.int64,
     TensorType.FLOAT16: DataType.float16,
     TensorType.FLOAT32: DataType.float32,
+    TensorType.FLOAT64: DataType.float64,
     TensorType.STRING: DataType.string,
     TensorType.BOOL: DataType.bool,
     TensorType.COMPLEX64: DataType.complex64,
+    TensorType.COMPLEX128: DataType.complex128,
 }
 
 datatype_inv_map = inverse_map(datatype_map)
@@ -162,8 +165,10 @@
     TensorType.INT64: np.int64,
     TensorType.FLOAT16: np.float16,
     TensorType.FLOAT32: np.float32,
+    TensorType.FLOAT64: np.float64,
     TensorType.BOOL: np.bool,
     TensorType.COMPLEX64: np.complex64,
+    TensorType.COMPLEX128: np.complex128,
 }
 
 
@@ -268,6 +273,7 @@
     BuiltinOptions.SegmentSumOptions: SegmentSumOptions.SegmentSumOptions,
     BuiltinOptions.SelectV2Options: SelectV2Options.SelectV2Options,
     BuiltinOptions.WhileOptions: WhileOptions.WhileOptions,
+    BuiltinOptions.BatchMatMulOptions: BatchMatMulOptions.BatchMatMulOptions,
 }
 
 builtin_options_inv_map = inverse_map(builtin_options_map)
@@ -445,21 +451,27 @@
     "Conv2DOptions", (padding, "stride_w", "stride_h", fused_act, "dilation_w_factor", "dilation_h_factor",)
 )
 
-lstm_opts = OptionsSerializer("LSTMOptions", (fused_act, "cell_clip", "proj_clip", "kernel_type"))
+lstm_opts = OptionsSerializer(
+    "LSTMOptions", (fused_act, "cell_clip", "proj_clip", "kernel_type", "asymmetric_quantize_inputs")
+)
 
 unidir_seq_lstm_opts = OptionsSerializer(
-    "UnidirectionalSequenceLSTMOptions", (fused_act, "cell_clip", "proj_clip", "time_major")
+    "UnidirectionalSequenceLSTMOptions",
+    (fused_act, "cell_clip", "proj_clip", "time_major", "asymmetric_quantize_inputs",),
 )
 
 bidir_seq_lstm_opts = OptionsSerializer(
-    "BidirectionalSequenceLSTMOptions", (fused_act, "cell_clip", "proj_clip", "merge_outputs", "time_major")
+    "BidirectionalSequenceLSTMOptions",
+    (fused_act, "cell_clip", "proj_clip", "merge_outputs", "time_major", "asymmetric_quantize_inputs"),
 )
 
-rnn_opts = OptionsSerializer("RNNOptions", (fused_act,))
+rnn_opts = OptionsSerializer("RNNOptions", (fused_act, "asymmetric_quantize_inputs"))
 
-seq_rnn_opts = OptionsSerializer("SequenceRNNOptions", ("time_major", fused_act,))
+seq_rnn_opts = OptionsSerializer("SequenceRNNOptions", ("time_major", fused_act, "asymmetric_quantize_inputs",))
 
-bidir_seq_rnn_opts = OptionsSerializer("BidirectionalSequenceRNNOptions", ("time_major", fused_act, "merge_outputs",))
+bidir_seq_rnn_opts = OptionsSerializer(
+    "BidirectionalSequenceRNNOptions", ("time_major", fused_act, "merge_outputs", "asymmetric_quantize_inputs")
+)
 
 
 reducer_opts = OptionsSerializer("ReducerOptions", ("keep_dims",))
@@ -469,7 +481,7 @@
 custom_prefix = "Custom_"
 
 builtin_operator_map = {
-    BuiltinOperator.ADD: ("AddAct", OptionsSerializer("AddOptions", (fused_act,))),
+    BuiltinOperator.ADD: ("AddAct", OptionsSerializer("AddOptions", (fused_act, "pot_scale_int16"))),
     BuiltinOperator.AVERAGE_POOL_2D: ("AvgPoolAct", pool2d_opts),
     BuiltinOperator.CONCATENATION: ("ConcatTFLite", OptionsSerializer("ConcatenationOptions", ("axis", fused_act))),
     BuiltinOperator.CONV_2D: ("Conv2DBiasAct", conv2d_opts),
@@ -480,10 +492,10 @@
     BuiltinOperator.FLOOR: ("Floor", None),
     BuiltinOperator.FULLY_CONNECTED: (
         "FullyConnectedAct",
-        OptionsSerializer("FullyConnectedOptions", (fused_act, "weights_format")),
+        OptionsSerializer("FullyConnectedOptions", (fused_act, "weights_format", "asymmetric_quantize_inputs")),
     ),
     BuiltinOperator.HASHTABLE_LOOKUP: ("HashtableLookup", None),
-    BuiltinOperator.L2_NORMALIZATION : ("L2NormAct", OptionsSerializer("L2NormOptions", (fused_act,))),
+    BuiltinOperator.L2_NORMALIZATION: ("L2NormAct", OptionsSerializer("L2NormOptions", (fused_act,))),
     BuiltinOperator.L2_POOL_2D: ("L2Pool2D", pool2d_opts),
     BuiltinOperator.LOCAL_RESPONSE_NORMALIZATION: (
         "LRN",
@@ -505,25 +517,34 @@
     BuiltinOperator.RNN: ("RnnAct", rnn_opts),
     BuiltinOperator.SOFTMAX: ("Softmax", OptionsSerializer("SoftmaxOptions", ("beta",))),
     BuiltinOperator.SPACE_TO_DEPTH: ("SpaceToDepth", OptionsSerializer("SpaceToDepthOptions", ("block_size",))),
-    BuiltinOperator.SVDF: ("SvdfAct", OptionsSerializer("SVDFOptions", ("rank", fused_act))),
+    BuiltinOperator.SVDF: (
+        "SvdfAct",
+        OptionsSerializer("SVDFOptions", ("rank", fused_act, "asymmetric_quantize_inputs")),
+    ),
     BuiltinOperator.TANH: ("Tanh", None),
     BuiltinOperator.CONCAT_EMBEDDINGS: (
         "ConcatEmbeddings",
         OptionsSerializer(
             "ConcatEmbeddingsOptions",
-            ("num_channels", "num_columns_per_channel", "num_columns_per_channel_as_numpy",
-             "num_columns_per_channel_as_length", "embedding_dim_per_channel", "embedding_dim_per_channel_as_numpy",
-             "embedding_dim_per_channel_as_length",)
+            (
+                "num_channels",
+                "num_columns_per_channel",
+                "num_columns_per_channel_as_numpy",
+                "num_columns_per_channel_as_length",
+                "embedding_dim_per_channel",
+                "embedding_dim_per_channel_as_numpy",
+                "embedding_dim_per_channel_as_length",
+            ),
         ),
     ),
     BuiltinOperator.SKIP_GRAM: (
         "SkipGram",
-        OptionsSerializer("SkipGramOptions", ("ngram_size", "max_skip_size", "include_all_ngrams"))
+        OptionsSerializer("SkipGramOptions", ("ngram_size", "max_skip_size", "include_all_ngrams")),
     ),
     BuiltinOperator.CALL: ("Call", OptionsSerializer("CallOptions", ("subgraph",))),
     BuiltinOperator.EMBEDDING_LOOKUP_SPARSE: (
         "EmbeddingLookupSparse",
-        OptionsSerializer("EmbeddingLookupSparseOptions", ("combiner",))
+        OptionsSerializer("EmbeddingLookupSparseOptions", ("combiner",)),
     ),
     BuiltinOperator.PAD: ("Pad", OptionsSerializer("PadOptions")),
     BuiltinOperator.UNIDIRECTIONAL_SEQUENCE_RNN: ("UnidirectionalSequenceRnnAct", seq_rnn_opts),
@@ -532,7 +553,7 @@
     BuiltinOperator.SPACE_TO_BATCH_ND: ("SpaceToBatchND", OptionsSerializer("SpaceToBatchNDOptions")),
     BuiltinOperator.TRANSPOSE: ("Transpose", OptionsSerializer("TransposeOptions")),
     BuiltinOperator.MEAN: ("Mean", None),
-    BuiltinOperator.SUB: ("SubAct", OptionsSerializer("SubOptions", (fused_act,))),
+    BuiltinOperator.SUB: ("SubAct", OptionsSerializer("SubOptions", (fused_act, "pot_scale_int16",))),
     BuiltinOperator.DIV: ("DivAct", OptionsSerializer("DivOptions", (fused_act,))),
     BuiltinOperator.SQUEEZE: ("Squeeze", OptionsSerializer("SqueezeOptions", (("squeeze_dims", is_int_vec),))),
     BuiltinOperator.UNIDIRECTIONAL_SEQUENCE_LSTM: ("UnidirectionalSequenceLstmAct", unidir_seq_lstm_opts),
@@ -547,7 +568,7 @@
     BuiltinOperator.TOPK_V2: ("TopKV2", OptionsSerializer("TopKV2Options")),
     BuiltinOperator.SPLIT: ("Split", OptionsSerializer("SplitOptions", ("num_splits",))),
     BuiltinOperator.LOG_SOFTMAX: ("LogSoftmax", OptionsSerializer("LogSoftmaxOptions")),
-    BuiltinOperator.DELEGATE : ("Delegate", None),
+    BuiltinOperator.DELEGATE: ("Delegate", None),
     BuiltinOperator.BIDIRECTIONAL_SEQUENCE_LSTM: ("BidirectionalSequenceLstmAct", bidir_seq_lstm_opts),
     BuiltinOperator.CAST: (
         "Cast",
@@ -622,7 +643,7 @@
     BuiltinOperator.RANGE: ("Range", OptionsSerializer("RangeOptions")),
     BuiltinOperator.RESIZE_NEAREST_NEIGHBOR: (
         "ResizeNearestNeighbor",
-        OptionsSerializer("ResizeNearestNeighborOptions", ("align_corners",)),
+        OptionsSerializer("ResizeNearestNeighborOptions", ("align_corners", "half_pixel_centers")),
     ),
     BuiltinOperator.LEAKY_RELU: ("LeakyRelu", OptionsSerializer("LeakyReluOptions", ("alpha",))),
     BuiltinOperator.SQUARED_DIFFERENCE: ("SquaredDifference", OptionsSerializer("SquaredDifferenceOptions")),
@@ -658,6 +679,7 @@
     BuiltinOperator.SELECT_V2: ("SelectV2", OptionsSerializer("SelectV2Options")),
     BuiltinOperator.DENSIFY: ("Densify", OptionsSerializer("DensifyOptions")),
     BuiltinOperator.SEGMENT_SUM: ("SegmentSum", OptionsSerializer("SegmentSumOptions")),
+    BuiltinOperator.BATCH_MATMUL: ("BatchMatMul", OptionsSerializer("BatchMatMulOptions", ("adj_x", "adj_y"))),
     BuiltinOperator.CUSTOM: (custom_prefix, CustomOptionsSerializer()),
 }