aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/CallOptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite/CallOptions.py')
-rw-r--r--ethosu/vela/tflite/CallOptions.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/CallOptions.py b/ethosu/vela/tflite/CallOptions.py
index 3216f8a1..7fa3b555 100644
--- a/ethosu/vela/tflite/CallOptions.py
+++ b/ethosu/vela/tflite/CallOptions.py
@@ -3,18 +3,24 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class CallOptions(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsCallOptions(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = CallOptions()
x.Init(buf, n + offset)
return x
@classmethod
+ def GetRootAsCallOptions(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
def CallOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
@@ -30,5 +36,11 @@ class CallOptions(object):
return 0
def CallOptionsStart(builder): builder.StartObject(1)
+def Start(builder):
+ return CallOptionsStart(builder)
def CallOptionsAddSubgraph(builder, subgraph): builder.PrependUint32Slot(0, subgraph, 0)
+def AddSubgraph(builder, subgraph):
+ return CallOptionsAddSubgraph(builder, subgraph)
def CallOptionsEnd(builder): return builder.EndObject()
+def End(builder):
+ return CallOptionsEnd(builder) \ No newline at end of file