Module tflite.StablehloCustomCallOptions
Functions
def AddApiVersion(builder, apiVersion)
-
Expand source code
def AddApiVersion(builder, apiVersion): StablehloCustomCallOptionsAddApiVersion(builder, apiVersion)
def AddBackendConfig(builder, backendConfig)
-
Expand source code
def AddBackendConfig(builder, backendConfig): StablehloCustomCallOptionsAddBackendConfig(builder, backendConfig)
def AddCallTargetName(builder, callTargetName)
-
Expand source code
def AddCallTargetName(builder, callTargetName): StablehloCustomCallOptionsAddCallTargetName(builder, callTargetName)
def AddCalledComputations(builder, calledComputations)
-
Expand source code
def AddCalledComputations(builder, calledComputations): StablehloCustomCallOptionsAddCalledComputations(builder, calledComputations)
def AddCustomAttributes(builder, customAttributes)
-
Expand source code
def AddCustomAttributes(builder, customAttributes): StablehloCustomCallOptionsAddCustomAttributes(builder, customAttributes)
def AddHasSideEffect(builder, hasSideEffect)
-
Expand source code
def AddHasSideEffect(builder, hasSideEffect): StablehloCustomCallOptionsAddHasSideEffect(builder, hasSideEffect)
def End(builder)
-
Expand source code
def End(builder): return StablehloCustomCallOptionsEnd(builder)
def StablehloCustomCallOptionsAddApiVersion(builder, apiVersion)
-
Expand source code
def StablehloCustomCallOptionsAddApiVersion(builder, apiVersion): builder.PrependInt32Slot(3, apiVersion, 0)
def StablehloCustomCallOptionsAddBackendConfig(builder, backendConfig)
-
Expand source code
def StablehloCustomCallOptionsAddBackendConfig(builder, backendConfig): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(backendConfig), 0)
def StablehloCustomCallOptionsAddCallTargetName(builder, callTargetName)
-
Expand source code
def StablehloCustomCallOptionsAddCallTargetName(builder, callTargetName): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(callTargetName), 0)
def StablehloCustomCallOptionsAddCalledComputations(builder, calledComputations)
-
Expand source code
def StablehloCustomCallOptionsAddCalledComputations(builder, calledComputations): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(calledComputations), 0)
def StablehloCustomCallOptionsAddCustomAttributes(builder, customAttributes)
-
Expand source code
def StablehloCustomCallOptionsAddCustomAttributes(builder, customAttributes): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(customAttributes), 0)
def StablehloCustomCallOptionsAddHasSideEffect(builder, hasSideEffect)
-
Expand source code
def StablehloCustomCallOptionsAddHasSideEffect(builder, hasSideEffect): builder.PrependBoolSlot(1, hasSideEffect, 0)
def StablehloCustomCallOptionsEnd(builder)
-
Expand source code
def StablehloCustomCallOptionsEnd(builder): return builder.EndObject()
def StablehloCustomCallOptionsStart(builder)
-
Expand source code
def StablehloCustomCallOptionsStart(builder): builder.StartObject(6)
def StablehloCustomCallOptionsStartCalledComputationsVector(builder, numElems)
-
Expand source code
def StablehloCustomCallOptionsStartCalledComputationsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StablehloCustomCallOptionsStartCustomAttributesVector(builder, numElems)
-
Expand source code
def StablehloCustomCallOptionsStartCustomAttributesVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def Start(builder)
-
Expand source code
def Start(builder): StablehloCustomCallOptionsStart(builder)
def StartCalledComputationsVector(builder, numElems)
-
Expand source code
def StartCalledComputationsVector(builder, numElems): return StablehloCustomCallOptionsStartCalledComputationsVector(builder, numElems)
def StartCustomAttributesVector(builder, numElems)
-
Expand source code
def StartCustomAttributesVector(builder, numElems): return StablehloCustomCallOptionsStartCustomAttributesVector(builder, numElems)
Classes
class StablehloCustomCallOptions
-
Expand source code
class StablehloCustomCallOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = StablehloCustomCallOptions() x.Init(buf, n + offset) return x @classmethod def GetRootAsStablehloCustomCallOptions(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset) @classmethod def StablehloCustomCallOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed) # StablehloCustomCallOptions def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # StablehloCustomCallOptions def CallTargetName(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.String(o + self._tab.Pos) return None # StablehloCustomCallOptions def HasSideEffect(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 # StablehloCustomCallOptions def BackendConfig(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.String(o + self._tab.Pos) return None # StablehloCustomCallOptions def ApiVersion(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 # StablehloCustomCallOptions def CalledComputations(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) return 0 # StablehloCustomCallOptions def CalledComputationsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) return 0 # StablehloCustomCallOptions def CalledComputationsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloCustomCallOptions def CalledComputationsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) return o == 0 # StablehloCustomCallOptions def CustomAttributes(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) return 0 # StablehloCustomCallOptions def CustomAttributesAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) return 0 # StablehloCustomCallOptions def CustomAttributesLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloCustomCallOptions def CustomAttributesIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) return o == 0
Static methods
def GetRootAs(buf, offset=0)
def GetRootAsStablehloCustomCallOptions(buf, offset=0)
-
This method is deprecated. Please switch to GetRootAs.
def StablehloCustomCallOptionsBufferHasIdentifier(buf, offset, size_prefixed=False)
Methods
def ApiVersion(self)
-
Expand source code
def ApiVersion(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0
def BackendConfig(self)
-
Expand source code
def BackendConfig(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.String(o + self._tab.Pos) return None
def CallTargetName(self)
-
Expand source code
def CallTargetName(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.String(o + self._tab.Pos) return None
def CalledComputations(self, j)
-
Expand source code
def CalledComputations(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) return 0
def CalledComputationsAsNumpy(self)
-
Expand source code
def CalledComputationsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) return 0
def CalledComputationsIsNone(self)
-
Expand source code
def CalledComputationsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) return o == 0
def CalledComputationsLength(self)
-
Expand source code
def CalledComputationsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.VectorLen(o) return 0
def CustomAttributes(self, j)
-
Expand source code
def CustomAttributes(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) return 0
def CustomAttributesAsNumpy(self)
-
Expand source code
def CustomAttributesAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) return 0
def CustomAttributesIsNone(self)
-
Expand source code
def CustomAttributesIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) return o == 0
def CustomAttributesLength(self)
-
Expand source code
def CustomAttributesLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.VectorLen(o) return 0
def HasSideEffect(self)
-
Expand source code
def HasSideEffect(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 Init(self, buf, pos)
-
Expand source code
def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)