@@ -51,8 +51,22 @@ def Location(self):
5151 return self ._tab .Get (flatbuffers .number_types .Int8Flags , o + self ._tab .Pos )
5252 return 0
5353
54+ # ExtraTensorInfo
55+ def DeviceType (self ):
56+ o = flatbuffers .number_types .UOffsetTFlags .py_type (self ._tab .Offset (10 ))
57+ if o != 0 :
58+ return self ._tab .Get (flatbuffers .number_types .Int8Flags , o + self ._tab .Pos )
59+ return 0
60+
61+ # ExtraTensorInfo
62+ def DeviceIndex (self ):
63+ o = flatbuffers .number_types .UOffsetTFlags .py_type (self ._tab .Offset (12 ))
64+ if o != 0 :
65+ return self ._tab .Get (flatbuffers .number_types .Int8Flags , o + self ._tab .Pos )
66+ return 0
67+
5468def ExtraTensorInfoStart (builder : flatbuffers .Builder ):
55- builder .StartObject (3 )
69+ builder .StartObject (5 )
5670
5771def Start (builder : flatbuffers .Builder ):
5872 ExtraTensorInfoStart (builder )
@@ -75,6 +89,18 @@ def ExtraTensorInfoAddLocation(builder: flatbuffers.Builder, location: int):
7589def AddLocation (builder : flatbuffers .Builder , location : int ):
7690 ExtraTensorInfoAddLocation (builder , location )
7791
92+ def ExtraTensorInfoAddDeviceType (builder : flatbuffers .Builder , deviceType : int ):
93+ builder .PrependInt8Slot (3 , deviceType , 0 )
94+
95+ def AddDeviceType (builder : flatbuffers .Builder , deviceType : int ):
96+ ExtraTensorInfoAddDeviceType (builder , deviceType )
97+
98+ def ExtraTensorInfoAddDeviceIndex (builder : flatbuffers .Builder , deviceIndex : int ):
99+ builder .PrependInt8Slot (4 , deviceIndex , 0 )
100+
101+ def AddDeviceIndex (builder : flatbuffers .Builder , deviceIndex : int ):
102+ ExtraTensorInfoAddDeviceIndex (builder , deviceIndex )
103+
78104def ExtraTensorInfoEnd (builder : flatbuffers .Builder ) -> int :
79105 return builder .EndObject ()
80106
@@ -89,6 +115,8 @@ def __init__(self):
89115 self .mutableDataSegmentsIdx = 0 # type: int
90116 self .fullyQualifiedName = None # type: str
91117 self .location = 0 # type: int
118+ self .deviceType = 0 # type: int
119+ self .deviceIndex = 0 # type: int
92120
93121 @classmethod
94122 def InitFromBuf (cls , buf , pos ):
@@ -111,7 +139,9 @@ def __eq__(self, other):
111139 return type (self ) == type (other ) and \
112140 self .mutableDataSegmentsIdx == other .mutableDataSegmentsIdx and \
113141 self .fullyQualifiedName == other .fullyQualifiedName and \
114- self .location == other .location
142+ self .location == other .location and \
143+ self .deviceType == other .deviceType and \
144+ self .deviceIndex == other .deviceIndex
115145
116146 # ExtraTensorInfoT
117147 def _UnPack (self , extraTensorInfo ):
@@ -120,6 +150,8 @@ def _UnPack(self, extraTensorInfo):
120150 self .mutableDataSegmentsIdx = extraTensorInfo .MutableDataSegmentsIdx ()
121151 self .fullyQualifiedName = extraTensorInfo .FullyQualifiedName ()
122152 self .location = extraTensorInfo .Location ()
153+ self .deviceType = extraTensorInfo .DeviceType ()
154+ self .deviceIndex = extraTensorInfo .DeviceIndex ()
123155
124156 # ExtraTensorInfoT
125157 def Pack (self , builder ):
@@ -130,5 +162,7 @@ def Pack(self, builder):
130162 if self .fullyQualifiedName is not None :
131163 ExtraTensorInfoAddFullyQualifiedName (builder , fullyQualifiedName )
132164 ExtraTensorInfoAddLocation (builder , self .location )
165+ ExtraTensorInfoAddDeviceType (builder , self .deviceType )
166+ ExtraTensorInfoAddDeviceIndex (builder , self .deviceIndex )
133167 extraTensorInfo = ExtraTensorInfoEnd (builder )
134168 return extraTensorInfo
0 commit comments