Module tflite.StablehloScatterOptions
Functions
def AddIndexVectorDim(builder, indexVectorDim)-
Expand source code
def AddIndexVectorDim(builder, indexVectorDim): StablehloScatterOptionsAddIndexVectorDim(builder, indexVectorDim) def AddIndicesAreSorted(builder, indicesAreSorted)-
Expand source code
def AddIndicesAreSorted(builder, indicesAreSorted): StablehloScatterOptionsAddIndicesAreSorted(builder, indicesAreSorted) def AddInsertedWindowDims(builder, insertedWindowDims)-
Expand source code
def AddInsertedWindowDims(builder, insertedWindowDims): StablehloScatterOptionsAddInsertedWindowDims(builder, insertedWindowDims) def AddScatterDimsToOperandDims(builder, scatterDimsToOperandDims)-
Expand source code
def AddScatterDimsToOperandDims(builder, scatterDimsToOperandDims): StablehloScatterOptionsAddScatterDimsToOperandDims(builder, scatterDimsToOperandDims) def AddUniqueIndices(builder, uniqueIndices)-
Expand source code
def AddUniqueIndices(builder, uniqueIndices): StablehloScatterOptionsAddUniqueIndices(builder, uniqueIndices) def AddUpdateComputationSubgraphIndex(builder, updateComputationSubgraphIndex)-
Expand source code
def AddUpdateComputationSubgraphIndex(builder, updateComputationSubgraphIndex): StablehloScatterOptionsAddUpdateComputationSubgraphIndex(builder, updateComputationSubgraphIndex) def AddUpdateWindowDims(builder, updateWindowDims)-
Expand source code
def AddUpdateWindowDims(builder, updateWindowDims): StablehloScatterOptionsAddUpdateWindowDims(builder, updateWindowDims) def End(builder)-
Expand source code
def End(builder): return StablehloScatterOptionsEnd(builder) def StablehloScatterOptionsAddIndexVectorDim(builder, indexVectorDim)-
Expand source code
def StablehloScatterOptionsAddIndexVectorDim(builder, indexVectorDim): builder.PrependInt64Slot(4, indexVectorDim, 0) def StablehloScatterOptionsAddIndicesAreSorted(builder, indicesAreSorted)-
Expand source code
def StablehloScatterOptionsAddIndicesAreSorted(builder, indicesAreSorted): builder.PrependBoolSlot(0, indicesAreSorted, 0) def StablehloScatterOptionsAddInsertedWindowDims(builder, insertedWindowDims)-
Expand source code
def StablehloScatterOptionsAddInsertedWindowDims(builder, insertedWindowDims): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(insertedWindowDims), 0) def StablehloScatterOptionsAddScatterDimsToOperandDims(builder, scatterDimsToOperandDims)-
Expand source code
def StablehloScatterOptionsAddScatterDimsToOperandDims(builder, scatterDimsToOperandDims): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(scatterDimsToOperandDims), 0) def StablehloScatterOptionsAddUniqueIndices(builder, uniqueIndices)-
Expand source code
def StablehloScatterOptionsAddUniqueIndices(builder, uniqueIndices): builder.PrependBoolSlot(5, uniqueIndices, 0) def StablehloScatterOptionsAddUpdateComputationSubgraphIndex(builder, updateComputationSubgraphIndex)-
Expand source code
def StablehloScatterOptionsAddUpdateComputationSubgraphIndex(builder, updateComputationSubgraphIndex): builder.PrependInt32Slot(6, updateComputationSubgraphIndex, 0) def StablehloScatterOptionsAddUpdateWindowDims(builder, updateWindowDims)-
Expand source code
def StablehloScatterOptionsAddUpdateWindowDims(builder, updateWindowDims): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(updateWindowDims), 0) def StablehloScatterOptionsEnd(builder)-
Expand source code
def StablehloScatterOptionsEnd(builder): return builder.EndObject() def StablehloScatterOptionsStart(builder)-
Expand source code
def StablehloScatterOptionsStart(builder): builder.StartObject(7) def StablehloScatterOptionsStartInsertedWindowDimsVector(builder, numElems)-
Expand source code
def StablehloScatterOptionsStartInsertedWindowDimsVector(builder, numElems): return builder.StartVector(8, numElems, 8) def StablehloScatterOptionsStartScatterDimsToOperandDimsVector(builder, numElems)-
Expand source code
def StablehloScatterOptionsStartScatterDimsToOperandDimsVector(builder, numElems): return builder.StartVector(8, numElems, 8) def StablehloScatterOptionsStartUpdateWindowDimsVector(builder, numElems)-
Expand source code
def StablehloScatterOptionsStartUpdateWindowDimsVector(builder, numElems): return builder.StartVector(8, numElems, 8) def Start(builder)-
Expand source code
def Start(builder): StablehloScatterOptionsStart(builder) def StartInsertedWindowDimsVector(builder, numElems)-
Expand source code
def StartInsertedWindowDimsVector(builder, numElems): return StablehloScatterOptionsStartInsertedWindowDimsVector(builder, numElems) def StartScatterDimsToOperandDimsVector(builder, numElems)-
Expand source code
def StartScatterDimsToOperandDimsVector(builder, numElems): return StablehloScatterOptionsStartScatterDimsToOperandDimsVector(builder, numElems) def StartUpdateWindowDimsVector(builder, numElems)-
Expand source code
def StartUpdateWindowDimsVector(builder, numElems): return StablehloScatterOptionsStartUpdateWindowDimsVector(builder, numElems)
Classes
class StablehloScatterOptions-
Expand source code
class StablehloScatterOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = StablehloScatterOptions() x.Init(buf, n + offset) return x @classmethod def GetRootAsStablehloScatterOptions(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset) @classmethod def StablehloScatterOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False): return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed) # StablehloScatterOptions def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # StablehloScatterOptions def IndicesAreSorted(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 # StablehloScatterOptions def UpdateWindowDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloScatterOptions def UpdateWindowDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloScatterOptions def UpdateWindowDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloScatterOptions def UpdateWindowDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) return o == 0 # StablehloScatterOptions def InsertedWindowDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloScatterOptions def InsertedWindowDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloScatterOptions def InsertedWindowDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloScatterOptions def InsertedWindowDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) return o == 0 # StablehloScatterOptions def ScatterDimsToOperandDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 # StablehloScatterOptions def ScatterDimsToOperandDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 # StablehloScatterOptions def ScatterDimsToOperandDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.VectorLen(o) return 0 # StablehloScatterOptions def ScatterDimsToOperandDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) return o == 0 # StablehloScatterOptions def IndexVectorDim(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0 # StablehloScatterOptions def UniqueIndices(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 # StablehloScatterOptions def UpdateComputationSubgraphIndex(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0Static methods
def GetRootAs(buf, offset=0)def GetRootAsStablehloScatterOptions(buf, offset=0)-
This method is deprecated. Please switch to GetRootAs.
def StablehloScatterOptionsBufferHasIdentifier(buf, offset, size_prefixed=False)
Methods
def IndexVectorDim(self)-
Expand source code
def IndexVectorDim(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) return 0 def IndicesAreSorted(self)-
Expand source code
def IndicesAreSorted(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 def Init(self, buf, pos)-
Expand source code
def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) def InsertedWindowDims(self, j)-
Expand source code
def InsertedWindowDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 def InsertedWindowDimsAsNumpy(self)-
Expand source code
def InsertedWindowDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 def InsertedWindowDimsIsNone(self)-
Expand source code
def InsertedWindowDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) return o == 0 def InsertedWindowDimsLength(self)-
Expand source code
def InsertedWindowDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0 def ScatterDimsToOperandDims(self, j)-
Expand source code
def ScatterDimsToOperandDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 def ScatterDimsToOperandDimsAsNumpy(self)-
Expand source code
def ScatterDimsToOperandDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 def ScatterDimsToOperandDimsIsNone(self)-
Expand source code
def ScatterDimsToOperandDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) return o == 0 def ScatterDimsToOperandDimsLength(self)-
Expand source code
def ScatterDimsToOperandDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.VectorLen(o) return 0 def UniqueIndices(self)-
Expand source code
def UniqueIndices(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 UpdateComputationSubgraphIndex(self)-
Expand source code
def UpdateComputationSubgraphIndex(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) if o != 0: return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 def UpdateWindowDims(self, j)-
Expand source code
def UpdateWindowDims(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) return 0 def UpdateWindowDimsAsNumpy(self)-
Expand source code
def UpdateWindowDimsAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) return 0 def UpdateWindowDimsIsNone(self)-
Expand source code
def UpdateWindowDimsIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) return o == 0 def UpdateWindowDimsLength(self)-
Expand source code
def UpdateWindowDimsLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0