circle-schema.js 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675
  1. export const circle = {};
  2. circle.TensorType = {
  3. FLOAT32: 0, '0': 'FLOAT32',
  4. FLOAT16: 1, '1': 'FLOAT16',
  5. INT32: 2, '2': 'INT32',
  6. UINT8: 3, '3': 'UINT8',
  7. INT64: 4, '4': 'INT64',
  8. STRING: 5, '5': 'STRING',
  9. BOOL: 6, '6': 'BOOL',
  10. INT16: 7, '7': 'INT16',
  11. COMPLEX64: 8, '8': 'COMPLEX64',
  12. INT8: 9, '9': 'INT8',
  13. FLOAT64: 10, '10': 'FLOAT64',
  14. COMPLEX128: 11, '11': 'COMPLEX128',
  15. UINT64: 12, '12': 'UINT64',
  16. RESOURCE: 13, '13': 'RESOURCE',
  17. VARIANT: 14, '14': 'VARIANT',
  18. UINT32: 15, '15': 'UINT32',
  19. UINT16: 16, '16': 'UINT16',
  20. INT4: 17, '17': 'INT4',
  21. BFLOAT16: 18, '18': 'BFLOAT16',
  22. UINT4: -1, '-1': 'UINT4',
  23. GGML_Q4_0: -2, '-2': 'GGML_Q4_0',
  24. GGML_Q4_1: -3, '-3': 'GGML_Q4_1',
  25. GGML_Q8_0: -4, '-4': 'GGML_Q8_0',
  26. GGML_Q8_1: -5, '-5': 'GGML_Q8_1',
  27. MXFP4: -6, '-6': 'MXFP4',
  28. MXINT8: -7, '-7': 'MXINT8'
  29. };
  30. circle.CustomQuantization = class CustomQuantization {
  31. static decode(reader, position) {
  32. const $ = new circle.CustomQuantization();
  33. $.custom = reader.array(position, 4, Uint8Array);
  34. return $;
  35. }
  36. static decodeText(reader, json) {
  37. const $ = new circle.CustomQuantization();
  38. $.custom = reader.array(json.custom, Uint8Array);
  39. return $;
  40. }
  41. };
  42. circle.MXQuantization = class MXQuantization {
  43. static decode(reader, position) {
  44. const $ = new circle.MXQuantization();
  45. $.axis = reader.int32_(position, 4, 0);
  46. return $;
  47. }
  48. static decodeText(reader, json) {
  49. const $ = new circle.MXQuantization();
  50. $.axis = reader.value(json.axis, 0);
  51. return $;
  52. }
  53. };
  54. circle.QuantizationDetails = class {
  55. static decode(reader, position, type) {
  56. switch (type) {
  57. case 1: return circle.CustomQuantization.decode(reader, position);
  58. case 2: return circle.MXQuantization.decode(reader, position);
  59. case 3: return circle.BlockwiseQuantization.decode(reader, position);
  60. default: return undefined;
  61. }
  62. }
  63. static decodeText(reader, json, type) {
  64. switch (type) {
  65. case 'CustomQuantization': return circle.CustomQuantization.decodeText(reader, json);
  66. case 'MXQuantization': return circle.MXQuantization.decodeText(reader, json);
  67. case 'BlockwiseQuantization': return circle.BlockwiseQuantization.decodeText(reader, json);
  68. default: return undefined;
  69. }
  70. }
  71. };
  72. circle.BlockwiseQuantization = class BlockwiseQuantization {
  73. static decode(reader, position) {
  74. const $ = new circle.BlockwiseQuantization();
  75. $.scales = reader.int32_(position, 4, 0);
  76. $.zero_points = reader.int32_(position, 6, 0);
  77. $.block_size = reader.int32_(position, 8, 0);
  78. return $;
  79. }
  80. static decodeText(reader, json) {
  81. const $ = new circle.BlockwiseQuantization();
  82. $.scales = reader.value(json.scales, 0);
  83. $.zero_points = reader.value(json.zero_points, 0);
  84. $.block_size = reader.value(json.block_size, 0);
  85. return $;
  86. }
  87. };
  88. circle.QuantizationParameters = class QuantizationParameters {
  89. static decode(reader, position) {
  90. const $ = new circle.QuantizationParameters();
  91. $.min = reader.array(position, 4, Float32Array);
  92. $.max = reader.array(position, 6, Float32Array);
  93. $.scale = reader.array(position, 8, Float32Array);
  94. $.zero_point = reader.int64s_(position, 10);
  95. $.details = reader.union(position, 12, circle.QuantizationDetails);
  96. $.quantized_dimension = reader.int32_(position, 16, 0);
  97. return $;
  98. }
  99. static decodeText(reader, json) {
  100. const $ = new circle.QuantizationParameters();
  101. $.min = reader.array(json.min, Float32Array);
  102. $.max = reader.array(json.max, Float32Array);
  103. $.scale = reader.array(json.scale, Float32Array);
  104. $.zero_point = reader.array(json.zero_point);
  105. $.details = circle.QuantizationDetails.decodeText(reader, json.details, json.details_type);
  106. $.quantized_dimension = reader.value(json.quantized_dimension, 0);
  107. return $;
  108. }
  109. };
  110. circle.DimensionType = {
  111. DENSE: 0, '0': 'DENSE',
  112. SPARSE_CSR: 1, '1': 'SPARSE_CSR'
  113. };
  114. circle.Int32Vector = class Int32Vector {
  115. static decode(reader, position) {
  116. const $ = new circle.Int32Vector();
  117. $.values = reader.array(position, 4, Int32Array);
  118. return $;
  119. }
  120. static decodeText(reader, json) {
  121. const $ = new circle.Int32Vector();
  122. $.values = reader.array(json.values, Int32Array);
  123. return $;
  124. }
  125. };
  126. circle.Uint16Vector = class Uint16Vector {
  127. static decode(reader, position) {
  128. const $ = new circle.Uint16Vector();
  129. $.values = reader.array(position, 4, Uint16Array);
  130. return $;
  131. }
  132. static decodeText(reader, json) {
  133. const $ = new circle.Uint16Vector();
  134. $.values = reader.array(json.values, Uint16Array);
  135. return $;
  136. }
  137. };
  138. circle.Uint8Vector = class Uint8Vector {
  139. static decode(reader, position) {
  140. const $ = new circle.Uint8Vector();
  141. $.values = reader.array(position, 4, Uint8Array);
  142. return $;
  143. }
  144. static decodeText(reader, json) {
  145. const $ = new circle.Uint8Vector();
  146. $.values = reader.array(json.values, Uint8Array);
  147. return $;
  148. }
  149. };
  150. circle.SparseIndexVector = class {
  151. static decode(reader, position, type) {
  152. switch (type) {
  153. case 1: return circle.Int32Vector.decode(reader, position);
  154. case 2: return circle.Uint16Vector.decode(reader, position);
  155. case 3: return circle.Uint8Vector.decode(reader, position);
  156. default: return undefined;
  157. }
  158. }
  159. static decodeText(reader, json, type) {
  160. switch (type) {
  161. case 'Int32Vector': return circle.Int32Vector.decodeText(reader, json);
  162. case 'Uint16Vector': return circle.Uint16Vector.decodeText(reader, json);
  163. case 'Uint8Vector': return circle.Uint8Vector.decodeText(reader, json);
  164. default: return undefined;
  165. }
  166. }
  167. };
  168. circle.DimensionMetadata = class DimensionMetadata {
  169. static decode(reader, position) {
  170. const $ = new circle.DimensionMetadata();
  171. $.format = reader.int8_(position, 4, 0);
  172. $.dense_size = reader.int32_(position, 6, 0);
  173. $.array_segments = reader.union(position, 8, circle.SparseIndexVector);
  174. $.array_indices = reader.union(position, 12, circle.SparseIndexVector);
  175. return $;
  176. }
  177. static decodeText(reader, json) {
  178. const $ = new circle.DimensionMetadata();
  179. $.format = circle.DimensionType[json.format];
  180. $.dense_size = reader.value(json.dense_size, 0);
  181. $.array_segments = circle.SparseIndexVector.decodeText(reader, json.array_segments, json.array_segments_type);
  182. $.array_indices = circle.SparseIndexVector.decodeText(reader, json.array_indices, json.array_indices_type);
  183. return $;
  184. }
  185. };
  186. circle.SparsityParameters = class SparsityParameters {
  187. static decode(reader, position) {
  188. const $ = new circle.SparsityParameters();
  189. $.traversal_order = reader.array(position, 4, Int32Array);
  190. $.block_map = reader.array(position, 6, Int32Array);
  191. $.dim_metadata = reader.tables(position, 8, circle.DimensionMetadata);
  192. return $;
  193. }
  194. static decodeText(reader, json) {
  195. const $ = new circle.SparsityParameters();
  196. $.traversal_order = reader.array(json.traversal_order, Int32Array);
  197. $.block_map = reader.array(json.block_map, Int32Array);
  198. $.dim_metadata = reader.objects(json.dim_metadata, circle.DimensionMetadata);
  199. return $;
  200. }
  201. };
  202. circle.VariantSubType = class VariantSubType {
  203. static decode(reader, position) {
  204. const $ = new circle.VariantSubType();
  205. $.shape = reader.array(position, 4, Int32Array);
  206. $.type = reader.int8_(position, 6, 0);
  207. $.has_rank = reader.bool_(position, 8, false);
  208. return $;
  209. }
  210. static decodeText(reader, json) {
  211. const $ = new circle.VariantSubType();
  212. $.shape = reader.array(json.shape, Int32Array);
  213. $.type = circle.TensorType[json.type];
  214. $.has_rank = reader.value(json.has_rank, false);
  215. return $;
  216. }
  217. };
  218. circle.CompressionType = {
  219. NONE: 0, '0': 'NONE',
  220. HUFFMAN: 1, '1': 'HUFFMAN'
  221. };
  222. circle.Tensor = class Tensor {
  223. static decode(reader, position) {
  224. const $ = new circle.Tensor();
  225. $.shape = reader.array(position, 4, Int32Array);
  226. $.type = reader.int8_(position, 6, 0);
  227. $.buffer = reader.uint32_(position, 8, 0);
  228. $.name = reader.string_(position, 10, null);
  229. $.quantization = reader.table(position, 12, circle.QuantizationParameters);
  230. $.is_variable = reader.bool_(position, 14, false);
  231. $.sparsity = reader.table(position, 16, circle.SparsityParameters);
  232. $.shape_signature = reader.array(position, 18, Int32Array);
  233. $.has_rank = reader.bool_(position, 20, false);
  234. $.variant_tensors = reader.tables(position, 22, circle.VariantSubType);
  235. $.compression_type = reader.int8_(position, 24, 0);
  236. return $;
  237. }
  238. static decodeText(reader, json) {
  239. const $ = new circle.Tensor();
  240. $.shape = reader.array(json.shape, Int32Array);
  241. $.type = circle.TensorType[json.type];
  242. $.buffer = reader.value(json.buffer, 0);
  243. $.name = reader.value(json.name, null);
  244. $.quantization = reader.object(json.quantization, circle.QuantizationParameters);
  245. $.is_variable = reader.value(json.is_variable, false);
  246. $.sparsity = reader.object(json.sparsity, circle.SparsityParameters);
  247. $.shape_signature = reader.array(json.shape_signature, Int32Array);
  248. $.has_rank = reader.value(json.has_rank, false);
  249. $.variant_tensors = reader.objects(json.variant_tensors, circle.VariantSubType);
  250. $.compression_type = circle.CompressionType[json.compression_type];
  251. return $;
  252. }
  253. };
  254. circle.BuiltinOperator = {
  255. ATTENTION: -9, '-9': 'ATTENTION',
  256. RUN_MODEL: -8, '-8': 'RUN_MODEL',
  257. ROPE: -7, '-7': 'ROPE',
  258. RMS_NORM: -6, '-6': 'RMS_NORM',
  259. GRU: -5, '-5': 'GRU',
  260. BCQ_GATHER: -4, '-4': 'BCQ_GATHER',
  261. BCQ_FULLY_CONNECTED: -3, '-3': 'BCQ_FULLY_CONNECTED',
  262. INSTANCE_NORM: -2, '-2': 'INSTANCE_NORM',
  263. ADD: 0, '0': 'ADD',
  264. AVERAGE_POOL_2D: 1, '1': 'AVERAGE_POOL_2D',
  265. CONCATENATION: 2, '2': 'CONCATENATION',
  266. CONV_2D: 3, '3': 'CONV_2D',
  267. DEPTHWISE_CONV_2D: 4, '4': 'DEPTHWISE_CONV_2D',
  268. DEPTH_TO_SPACE: 5, '5': 'DEPTH_TO_SPACE',
  269. DEQUANTIZE: 6, '6': 'DEQUANTIZE',
  270. EMBEDDING_LOOKUP: 7, '7': 'EMBEDDING_LOOKUP',
  271. FLOOR: 8, '8': 'FLOOR',
  272. FULLY_CONNECTED: 9, '9': 'FULLY_CONNECTED',
  273. HASHTABLE_LOOKUP: 10, '10': 'HASHTABLE_LOOKUP',
  274. L2_NORMALIZATION: 11, '11': 'L2_NORMALIZATION',
  275. L2_POOL_2D: 12, '12': 'L2_POOL_2D',
  276. LOCAL_RESPONSE_NORMALIZATION: 13, '13': 'LOCAL_RESPONSE_NORMALIZATION',
  277. LOGISTIC: 14, '14': 'LOGISTIC',
  278. LSH_PROJECTION: 15, '15': 'LSH_PROJECTION',
  279. LSTM: 16, '16': 'LSTM',
  280. MAX_POOL_2D: 17, '17': 'MAX_POOL_2D',
  281. MUL: 18, '18': 'MUL',
  282. RELU: 19, '19': 'RELU',
  283. RELU_N1_TO_1: 20, '20': 'RELU_N1_TO_1',
  284. RELU6: 21, '21': 'RELU6',
  285. RESHAPE: 22, '22': 'RESHAPE',
  286. RESIZE_BILINEAR: 23, '23': 'RESIZE_BILINEAR',
  287. RNN: 24, '24': 'RNN',
  288. SOFTMAX: 25, '25': 'SOFTMAX',
  289. SPACE_TO_DEPTH: 26, '26': 'SPACE_TO_DEPTH',
  290. SVDF: 27, '27': 'SVDF',
  291. TANH: 28, '28': 'TANH',
  292. CONCAT_EMBEDDINGS: 29, '29': 'CONCAT_EMBEDDINGS',
  293. SKIP_GRAM: 30, '30': 'SKIP_GRAM',
  294. CALL: 31, '31': 'CALL',
  295. CUSTOM: 32, '32': 'CUSTOM',
  296. EMBEDDING_LOOKUP_SPARSE: 33, '33': 'EMBEDDING_LOOKUP_SPARSE',
  297. PAD: 34, '34': 'PAD',
  298. UNIDIRECTIONAL_SEQUENCE_RNN: 35, '35': 'UNIDIRECTIONAL_SEQUENCE_RNN',
  299. GATHER: 36, '36': 'GATHER',
  300. BATCH_TO_SPACE_ND: 37, '37': 'BATCH_TO_SPACE_ND',
  301. SPACE_TO_BATCH_ND: 38, '38': 'SPACE_TO_BATCH_ND',
  302. TRANSPOSE: 39, '39': 'TRANSPOSE',
  303. MEAN: 40, '40': 'MEAN',
  304. SUB: 41, '41': 'SUB',
  305. DIV: 42, '42': 'DIV',
  306. SQUEEZE: 43, '43': 'SQUEEZE',
  307. UNIDIRECTIONAL_SEQUENCE_LSTM: 44, '44': 'UNIDIRECTIONAL_SEQUENCE_LSTM',
  308. STRIDED_SLICE: 45, '45': 'STRIDED_SLICE',
  309. BIDIRECTIONAL_SEQUENCE_RNN: 46, '46': 'BIDIRECTIONAL_SEQUENCE_RNN',
  310. EXP: 47, '47': 'EXP',
  311. TOPK_V2: 48, '48': 'TOPK_V2',
  312. SPLIT: 49, '49': 'SPLIT',
  313. LOG_SOFTMAX: 50, '50': 'LOG_SOFTMAX',
  314. DELEGATE: 51, '51': 'DELEGATE',
  315. BIDIRECTIONAL_SEQUENCE_LSTM: 52, '52': 'BIDIRECTIONAL_SEQUENCE_LSTM',
  316. CAST: 53, '53': 'CAST',
  317. PRELU: 54, '54': 'PRELU',
  318. MAXIMUM: 55, '55': 'MAXIMUM',
  319. ARG_MAX: 56, '56': 'ARG_MAX',
  320. MINIMUM: 57, '57': 'MINIMUM',
  321. LESS: 58, '58': 'LESS',
  322. NEG: 59, '59': 'NEG',
  323. PADV2: 60, '60': 'PADV2',
  324. GREATER: 61, '61': 'GREATER',
  325. GREATER_EQUAL: 62, '62': 'GREATER_EQUAL',
  326. LESS_EQUAL: 63, '63': 'LESS_EQUAL',
  327. SELECT: 64, '64': 'SELECT',
  328. SLICE: 65, '65': 'SLICE',
  329. SIN: 66, '66': 'SIN',
  330. TRANSPOSE_CONV: 67, '67': 'TRANSPOSE_CONV',
  331. SPARSE_TO_DENSE: 68, '68': 'SPARSE_TO_DENSE',
  332. TILE: 69, '69': 'TILE',
  333. EXPAND_DIMS: 70, '70': 'EXPAND_DIMS',
  334. EQUAL: 71, '71': 'EQUAL',
  335. NOT_EQUAL: 72, '72': 'NOT_EQUAL',
  336. LOG: 73, '73': 'LOG',
  337. SUM: 74, '74': 'SUM',
  338. SQRT: 75, '75': 'SQRT',
  339. RSQRT: 76, '76': 'RSQRT',
  340. SHAPE: 77, '77': 'SHAPE',
  341. POW: 78, '78': 'POW',
  342. ARG_MIN: 79, '79': 'ARG_MIN',
  343. FAKE_QUANT: 80, '80': 'FAKE_QUANT',
  344. REDUCE_PROD: 81, '81': 'REDUCE_PROD',
  345. REDUCE_MAX: 82, '82': 'REDUCE_MAX',
  346. PACK: 83, '83': 'PACK',
  347. LOGICAL_OR: 84, '84': 'LOGICAL_OR',
  348. ONE_HOT: 85, '85': 'ONE_HOT',
  349. LOGICAL_AND: 86, '86': 'LOGICAL_AND',
  350. LOGICAL_NOT: 87, '87': 'LOGICAL_NOT',
  351. UNPACK: 88, '88': 'UNPACK',
  352. REDUCE_MIN: 89, '89': 'REDUCE_MIN',
  353. FLOOR_DIV: 90, '90': 'FLOOR_DIV',
  354. REDUCE_ANY: 91, '91': 'REDUCE_ANY',
  355. SQUARE: 92, '92': 'SQUARE',
  356. ZEROS_LIKE: 93, '93': 'ZEROS_LIKE',
  357. FILL: 94, '94': 'FILL',
  358. FLOOR_MOD: 95, '95': 'FLOOR_MOD',
  359. RANGE: 96, '96': 'RANGE',
  360. RESIZE_NEAREST_NEIGHBOR: 97, '97': 'RESIZE_NEAREST_NEIGHBOR',
  361. LEAKY_RELU: 98, '98': 'LEAKY_RELU',
  362. SQUARED_DIFFERENCE: 99, '99': 'SQUARED_DIFFERENCE',
  363. MIRROR_PAD: 100, '100': 'MIRROR_PAD',
  364. ABS: 101, '101': 'ABS',
  365. SPLIT_V: 102, '102': 'SPLIT_V',
  366. UNIQUE: 103, '103': 'UNIQUE',
  367. CEIL: 104, '104': 'CEIL',
  368. REVERSE_V2: 105, '105': 'REVERSE_V2',
  369. ADD_N: 106, '106': 'ADD_N',
  370. GATHER_ND: 107, '107': 'GATHER_ND',
  371. COS: 108, '108': 'COS',
  372. WHERE: 109, '109': 'WHERE',
  373. RANK: 110, '110': 'RANK',
  374. ELU: 111, '111': 'ELU',
  375. REVERSE_SEQUENCE: 112, '112': 'REVERSE_SEQUENCE',
  376. MATRIX_DIAG: 113, '113': 'MATRIX_DIAG',
  377. QUANTIZE: 114, '114': 'QUANTIZE',
  378. MATRIX_SET_DIAG: 115, '115': 'MATRIX_SET_DIAG',
  379. ROUND: 116, '116': 'ROUND',
  380. HARD_SWISH: 117, '117': 'HARD_SWISH',
  381. IF: 118, '118': 'IF',
  382. WHILE: 119, '119': 'WHILE',
  383. NON_MAX_SUPPRESSION_V4: 120, '120': 'NON_MAX_SUPPRESSION_V4',
  384. NON_MAX_SUPPRESSION_V5: 121, '121': 'NON_MAX_SUPPRESSION_V5',
  385. SCATTER_ND: 122, '122': 'SCATTER_ND',
  386. SELECT_V2: 123, '123': 'SELECT_V2',
  387. DENSIFY: 124, '124': 'DENSIFY',
  388. SEGMENT_SUM: 125, '125': 'SEGMENT_SUM',
  389. BATCH_MATMUL: 126, '126': 'BATCH_MATMUL',
  390. PLACEHOLDER_FOR_GREATER_OP_CODES: 127, '127': 'PLACEHOLDER_FOR_GREATER_OP_CODES',
  391. CUMSUM: 128, '128': 'CUMSUM',
  392. CALL_ONCE: 129, '129': 'CALL_ONCE',
  393. BROADCAST_TO: 130, '130': 'BROADCAST_TO',
  394. RFFT2D: 131, '131': 'RFFT2D',
  395. CONV_3D: 132, '132': 'CONV_3D',
  396. IMAG: 133, '133': 'IMAG',
  397. REAL: 134, '134': 'REAL',
  398. COMPLEX_ABS: 135, '135': 'COMPLEX_ABS',
  399. HASHTABLE: 136, '136': 'HASHTABLE',
  400. HASHTABLE_FIND: 137, '137': 'HASHTABLE_FIND',
  401. HASHTABLE_IMPORT: 138, '138': 'HASHTABLE_IMPORT',
  402. HASHTABLE_SIZE: 139, '139': 'HASHTABLE_SIZE',
  403. REDUCE_ALL: 140, '140': 'REDUCE_ALL',
  404. CONV_3D_TRANSPOSE: 141, '141': 'CONV_3D_TRANSPOSE',
  405. VAR_HANDLE: 142, '142': 'VAR_HANDLE',
  406. READ_VARIABLE: 143, '143': 'READ_VARIABLE',
  407. ASSIGN_VARIABLE: 144, '144': 'ASSIGN_VARIABLE',
  408. BROADCAST_ARGS: 145, '145': 'BROADCAST_ARGS',
  409. RANDOM_STANDARD_NORMAL: 146, '146': 'RANDOM_STANDARD_NORMAL',
  410. BUCKETIZE: 147, '147': 'BUCKETIZE',
  411. RANDOM_UNIFORM: 148, '148': 'RANDOM_UNIFORM',
  412. MULTINOMIAL: 149, '149': 'MULTINOMIAL',
  413. GELU: 150, '150': 'GELU',
  414. DYNAMIC_UPDATE_SLICE: 151, '151': 'DYNAMIC_UPDATE_SLICE',
  415. RELU_0_TO_1: 152, '152': 'RELU_0_TO_1',
  416. UNSORTED_SEGMENT_PROD: 153, '153': 'UNSORTED_SEGMENT_PROD',
  417. UNSORTED_SEGMENT_MAX: 154, '154': 'UNSORTED_SEGMENT_MAX',
  418. UNSORTED_SEGMENT_SUM: 155, '155': 'UNSORTED_SEGMENT_SUM',
  419. ATAN2: 156, '156': 'ATAN2',
  420. UNSORTED_SEGMENT_MIN: 157, '157': 'UNSORTED_SEGMENT_MIN',
  421. SIGN: 158, '158': 'SIGN',
  422. BITCAST: 159, '159': 'BITCAST',
  423. BITWISE_XOR: 160, '160': 'BITWISE_XOR',
  424. RIGHT_SHIFT: 161, '161': 'RIGHT_SHIFT',
  425. STABLEHLO_LOGISTIC: 162, '162': 'STABLEHLO_LOGISTIC',
  426. STABLEHLO_ADD: 163, '163': 'STABLEHLO_ADD',
  427. STABLEHLO_DIVIDE: 164, '164': 'STABLEHLO_DIVIDE',
  428. STABLEHLO_MULTIPLY: 165, '165': 'STABLEHLO_MULTIPLY',
  429. STABLEHLO_MAXIMUM: 166, '166': 'STABLEHLO_MAXIMUM',
  430. STABLEHLO_RESHAPE: 167, '167': 'STABLEHLO_RESHAPE',
  431. STABLEHLO_CLAMP: 168, '168': 'STABLEHLO_CLAMP',
  432. STABLEHLO_CONCATENATE: 169, '169': 'STABLEHLO_CONCATENATE',
  433. STABLEHLO_BROADCAST_IN_DIM: 170, '170': 'STABLEHLO_BROADCAST_IN_DIM',
  434. STABLEHLO_CONVOLUTION: 171, '171': 'STABLEHLO_CONVOLUTION',
  435. STABLEHLO_SLICE: 172, '172': 'STABLEHLO_SLICE',
  436. STABLEHLO_CUSTOM_CALL: 173, '173': 'STABLEHLO_CUSTOM_CALL',
  437. STABLEHLO_REDUCE: 174, '174': 'STABLEHLO_REDUCE',
  438. STABLEHLO_ABS: 175, '175': 'STABLEHLO_ABS',
  439. STABLEHLO_AND: 176, '176': 'STABLEHLO_AND',
  440. STABLEHLO_COSINE: 177, '177': 'STABLEHLO_COSINE',
  441. STABLEHLO_EXPONENTIAL: 178, '178': 'STABLEHLO_EXPONENTIAL',
  442. STABLEHLO_FLOOR: 179, '179': 'STABLEHLO_FLOOR',
  443. STABLEHLO_LOG: 180, '180': 'STABLEHLO_LOG',
  444. STABLEHLO_MINIMUM: 181, '181': 'STABLEHLO_MINIMUM',
  445. STABLEHLO_NEGATE: 182, '182': 'STABLEHLO_NEGATE',
  446. STABLEHLO_OR: 183, '183': 'STABLEHLO_OR',
  447. STABLEHLO_POWER: 184, '184': 'STABLEHLO_POWER',
  448. STABLEHLO_REMAINDER: 185, '185': 'STABLEHLO_REMAINDER',
  449. STABLEHLO_RSQRT: 186, '186': 'STABLEHLO_RSQRT',
  450. STABLEHLO_SELECT: 187, '187': 'STABLEHLO_SELECT',
  451. STABLEHLO_SUBTRACT: 188, '188': 'STABLEHLO_SUBTRACT',
  452. STABLEHLO_TANH: 189, '189': 'STABLEHLO_TANH',
  453. STABLEHLO_SCATTER: 190, '190': 'STABLEHLO_SCATTER',
  454. STABLEHLO_COMPARE: 191, '191': 'STABLEHLO_COMPARE',
  455. STABLEHLO_CONVERT: 192, '192': 'STABLEHLO_CONVERT',
  456. STABLEHLO_DYNAMIC_SLICE: 193, '193': 'STABLEHLO_DYNAMIC_SLICE',
  457. STABLEHLO_DYNAMIC_UPDATE_SLICE: 194, '194': 'STABLEHLO_DYNAMIC_UPDATE_SLICE',
  458. STABLEHLO_PAD: 195, '195': 'STABLEHLO_PAD',
  459. STABLEHLO_IOTA: 196, '196': 'STABLEHLO_IOTA',
  460. STABLEHLO_DOT_GENERAL: 197, '197': 'STABLEHLO_DOT_GENERAL',
  461. STABLEHLO_REDUCE_WINDOW: 198, '198': 'STABLEHLO_REDUCE_WINDOW',
  462. STABLEHLO_SORT: 199, '199': 'STABLEHLO_SORT',
  463. STABLEHLO_WHILE: 200, '200': 'STABLEHLO_WHILE',
  464. STABLEHLO_GATHER: 201, '201': 'STABLEHLO_GATHER',
  465. STABLEHLO_TRANSPOSE: 202, '202': 'STABLEHLO_TRANSPOSE',
  466. DILATE: 203, '203': 'DILATE',
  467. STABLEHLO_RNG_BIT_GENERATOR: 204, '204': 'STABLEHLO_RNG_BIT_GENERATOR',
  468. REDUCE_WINDOW: 205, '205': 'REDUCE_WINDOW',
  469. STABLEHLO_COMPOSITE: 206, '206': 'STABLEHLO_COMPOSITE',
  470. STABLEHLO_SHIFT_LEFT: 207, '207': 'STABLEHLO_SHIFT_LEFT',
  471. STABLEHLO_CBRT: 208, '208': 'STABLEHLO_CBRT',
  472. STABLEHLO_CASE: 209, '209': 'STABLEHLO_CASE'
  473. };
  474. circle.BuiltinOptions = class {
  475. static decode(reader, position, type) {
  476. switch (type) {
  477. case 1: return circle.Conv2DOptions.decode(reader, position);
  478. case 2: return circle.DepthwiseConv2DOptions.decode(reader, position);
  479. case 3: return circle.ConcatEmbeddingsOptions.decode(reader, position);
  480. case 4: return circle.LSHProjectionOptions.decode(reader, position);
  481. case 5: return circle.Pool2DOptions.decode(reader, position);
  482. case 6: return circle.SVDFOptions.decode(reader, position);
  483. case 7: return circle.RNNOptions.decode(reader, position);
  484. case 8: return circle.FullyConnectedOptions.decode(reader, position);
  485. case 9: return circle.SoftmaxOptions.decode(reader, position);
  486. case 10: return circle.ConcatenationOptions.decode(reader, position);
  487. case 11: return circle.AddOptions.decode(reader, position);
  488. case 12: return circle.L2NormOptions.decode(reader, position);
  489. case 13: return circle.LocalResponseNormalizationOptions.decode(reader, position);
  490. case 14: return circle.LSTMOptions.decode(reader, position);
  491. case 15: return circle.ResizeBilinearOptions.decode(reader, position);
  492. case 16: return circle.CallOptions.decode(reader, position);
  493. case 17: return circle.ReshapeOptions.decode(reader, position);
  494. case 18: return circle.SkipGramOptions.decode(reader, position);
  495. case 19: return circle.SpaceToDepthOptions.decode(reader, position);
  496. case 20: return circle.EmbeddingLookupSparseOptions.decode(reader, position);
  497. case 21: return circle.MulOptions.decode(reader, position);
  498. case 22: return circle.PadOptions.decode(reader, position);
  499. case 23: return circle.GatherOptions.decode(reader, position);
  500. case 24: return circle.BatchToSpaceNDOptions.decode(reader, position);
  501. case 25: return circle.SpaceToBatchNDOptions.decode(reader, position);
  502. case 26: return circle.TransposeOptions.decode(reader, position);
  503. case 27: return circle.ReducerOptions.decode(reader, position);
  504. case 28: return circle.SubOptions.decode(reader, position);
  505. case 29: return circle.DivOptions.decode(reader, position);
  506. case 30: return circle.SqueezeOptions.decode(reader, position);
  507. case 31: return circle.SequenceRNNOptions.decode(reader, position);
  508. case 32: return circle.StridedSliceOptions.decode(reader, position);
  509. case 33: return circle.ExpOptions.decode(reader, position);
  510. case 34: return circle.TopKV2Options.decode(reader, position);
  511. case 35: return circle.SplitOptions.decode(reader, position);
  512. case 36: return circle.LogSoftmaxOptions.decode(reader, position);
  513. case 37: return circle.CastOptions.decode(reader, position);
  514. case 38: return circle.DequantizeOptions.decode(reader, position);
  515. case 39: return circle.MaximumMinimumOptions.decode(reader, position);
  516. case 40: return circle.ArgMaxOptions.decode(reader, position);
  517. case 41: return circle.LessOptions.decode(reader, position);
  518. case 42: return circle.NegOptions.decode(reader, position);
  519. case 43: return circle.PadV2Options.decode(reader, position);
  520. case 44: return circle.GreaterOptions.decode(reader, position);
  521. case 45: return circle.GreaterEqualOptions.decode(reader, position);
  522. case 46: return circle.LessEqualOptions.decode(reader, position);
  523. case 47: return circle.SelectOptions.decode(reader, position);
  524. case 48: return circle.SliceOptions.decode(reader, position);
  525. case 49: return circle.TransposeConvOptions.decode(reader, position);
  526. case 50: return circle.SparseToDenseOptions.decode(reader, position);
  527. case 51: return circle.TileOptions.decode(reader, position);
  528. case 52: return circle.ExpandDimsOptions.decode(reader, position);
  529. case 53: return circle.EqualOptions.decode(reader, position);
  530. case 54: return circle.NotEqualOptions.decode(reader, position);
  531. case 55: return circle.ShapeOptions.decode(reader, position);
  532. case 56: return circle.PowOptions.decode(reader, position);
  533. case 57: return circle.ArgMinOptions.decode(reader, position);
  534. case 58: return circle.FakeQuantOptions.decode(reader, position);
  535. case 59: return circle.PackOptions.decode(reader, position);
  536. case 60: return circle.LogicalOrOptions.decode(reader, position);
  537. case 61: return circle.OneHotOptions.decode(reader, position);
  538. case 62: return circle.LogicalAndOptions.decode(reader, position);
  539. case 63: return circle.LogicalNotOptions.decode(reader, position);
  540. case 64: return circle.UnpackOptions.decode(reader, position);
  541. case 65: return circle.FloorDivOptions.decode(reader, position);
  542. case 66: return circle.SquareOptions.decode(reader, position);
  543. case 67: return circle.ZerosLikeOptions.decode(reader, position);
  544. case 68: return circle.FillOptions.decode(reader, position);
  545. case 69: return circle.BidirectionalSequenceLSTMOptions.decode(reader, position);
  546. case 70: return circle.BidirectionalSequenceRNNOptions.decode(reader, position);
  547. case 71: return circle.UnidirectionalSequenceLSTMOptions.decode(reader, position);
  548. case 72: return circle.FloorModOptions.decode(reader, position);
  549. case 73: return circle.RangeOptions.decode(reader, position);
  550. case 74: return circle.ResizeNearestNeighborOptions.decode(reader, position);
  551. case 75: return circle.LeakyReluOptions.decode(reader, position);
  552. case 76: return circle.SquaredDifferenceOptions.decode(reader, position);
  553. case 77: return circle.MirrorPadOptions.decode(reader, position);
  554. case 78: return circle.AbsOptions.decode(reader, position);
  555. case 79: return circle.SplitVOptions.decode(reader, position);
  556. case 80: return circle.UniqueOptions.decode(reader, position);
  557. case 81: return circle.ReverseV2Options.decode(reader, position);
  558. case 82: return circle.AddNOptions.decode(reader, position);
  559. case 83: return circle.GatherNdOptions.decode(reader, position);
  560. case 84: return circle.CosOptions.decode(reader, position);
  561. case 85: return circle.WhereOptions.decode(reader, position);
  562. case 86: return circle.RankOptions.decode(reader, position);
  563. case 87: return circle.ReverseSequenceOptions.decode(reader, position);
  564. case 88: return circle.MatrixDiagOptions.decode(reader, position);
  565. case 89: return circle.QuantizeOptions.decode(reader, position);
  566. case 90: return circle.MatrixSetDiagOptions.decode(reader, position);
  567. case 91: return circle.HardSwishOptions.decode(reader, position);
  568. case 92: return circle.IfOptions.decode(reader, position);
  569. case 93: return circle.WhileOptions.decode(reader, position);
  570. case 94: return circle.DepthToSpaceOptions.decode(reader, position);
  571. case 95: return circle.NonMaxSuppressionV4Options.decode(reader, position);
  572. case 96: return circle.NonMaxSuppressionV5Options.decode(reader, position);
  573. case 97: return circle.ScatterNdOptions.decode(reader, position);
  574. case 98: return circle.SelectV2Options.decode(reader, position);
  575. case 99: return circle.DensifyOptions.decode(reader, position);
  576. case 100: return circle.SegmentSumOptions.decode(reader, position);
  577. case 101: return circle.BatchMatMulOptions.decode(reader, position);
  578. case 102: return circle.CumsumOptions.decode(reader, position);
  579. case 103: return circle.CallOnceOptions.decode(reader, position);
  580. case 104: return circle.BroadcastToOptions.decode(reader, position);
  581. case 105: return circle.Rfft2dOptions.decode(reader, position);
  582. case 106: return circle.Conv3DOptions.decode(reader, position);
  583. case 107: return circle.HashtableOptions.decode(reader, position);
  584. case 108: return circle.HashtableFindOptions.decode(reader, position);
  585. case 109: return circle.HashtableImportOptions.decode(reader, position);
  586. case 110: return circle.HashtableSizeOptions.decode(reader, position);
  587. case 111: return circle.VarHandleOptions.decode(reader, position);
  588. case 112: return circle.ReadVariableOptions.decode(reader, position);
  589. case 113: return circle.AssignVariableOptions.decode(reader, position);
  590. case 114: return circle.RandomOptions.decode(reader, position);
  591. case 115: return circle.BucketizeOptions.decode(reader, position);
  592. case 116: return circle.GeluOptions.decode(reader, position);
  593. case 117: return circle.DynamicUpdateSliceOptions.decode(reader, position);
  594. case 118: return circle.UnsortedSegmentProdOptions.decode(reader, position);
  595. case 119: return circle.UnsortedSegmentMaxOptions.decode(reader, position);
  596. case 120: return circle.UnsortedSegmentMinOptions.decode(reader, position);
  597. case 121: return circle.UnsortedSegmentSumOptions.decode(reader, position);
  598. case 122: return circle.ATan2Options.decode(reader, position);
  599. case 123: return circle.SignOptions.decode(reader, position);
  600. case 124: return circle.BitcastOptions.decode(reader, position);
  601. case 125: return circle.BitwiseXorOptions.decode(reader, position);
  602. case 126: return circle.RightShiftOptions.decode(reader, position);
  603. case 247: return circle.AttentionOptions.decode(reader, position);
  604. case 248: return circle.RunModelOptions.decode(reader, position);
  605. case 249: return circle.RoPEOptions.decode(reader, position);
  606. case 250: return circle.RmsNormOptions.decode(reader, position);
  607. case 251: return circle.GRUOptions.decode(reader, position);
  608. case 252: return circle.BCQGatherOptions.decode(reader, position);
  609. case 253: return circle.BCQFullyConnectedOptions.decode(reader, position);
  610. case 254: return circle.InstanceNormOptions.decode(reader, position);
  611. default: return undefined;
  612. }
  613. }
  614. static decodeText(reader, json, type) {
  615. switch (type) {
  616. case 'Conv2DOptions': return circle.Conv2DOptions.decodeText(reader, json);
  617. case 'DepthwiseConv2DOptions': return circle.DepthwiseConv2DOptions.decodeText(reader, json);
  618. case 'ConcatEmbeddingsOptions': return circle.ConcatEmbeddingsOptions.decodeText(reader, json);
  619. case 'LSHProjectionOptions': return circle.LSHProjectionOptions.decodeText(reader, json);
  620. case 'Pool2DOptions': return circle.Pool2DOptions.decodeText(reader, json);
  621. case 'SVDFOptions': return circle.SVDFOptions.decodeText(reader, json);
  622. case 'RNNOptions': return circle.RNNOptions.decodeText(reader, json);
  623. case 'FullyConnectedOptions': return circle.FullyConnectedOptions.decodeText(reader, json);
  624. case 'SoftmaxOptions': return circle.SoftmaxOptions.decodeText(reader, json);
  625. case 'ConcatenationOptions': return circle.ConcatenationOptions.decodeText(reader, json);
  626. case 'AddOptions': return circle.AddOptions.decodeText(reader, json);
  627. case 'L2NormOptions': return circle.L2NormOptions.decodeText(reader, json);
  628. case 'LocalResponseNormalizationOptions': return circle.LocalResponseNormalizationOptions.decodeText(reader, json);
  629. case 'LSTMOptions': return circle.LSTMOptions.decodeText(reader, json);
  630. case 'ResizeBilinearOptions': return circle.ResizeBilinearOptions.decodeText(reader, json);
  631. case 'CallOptions': return circle.CallOptions.decodeText(reader, json);
  632. case 'ReshapeOptions': return circle.ReshapeOptions.decodeText(reader, json);
  633. case 'SkipGramOptions': return circle.SkipGramOptions.decodeText(reader, json);
  634. case 'SpaceToDepthOptions': return circle.SpaceToDepthOptions.decodeText(reader, json);
  635. case 'EmbeddingLookupSparseOptions': return circle.EmbeddingLookupSparseOptions.decodeText(reader, json);
  636. case 'MulOptions': return circle.MulOptions.decodeText(reader, json);
  637. case 'PadOptions': return circle.PadOptions.decodeText(reader, json);
  638. case 'GatherOptions': return circle.GatherOptions.decodeText(reader, json);
  639. case 'BatchToSpaceNDOptions': return circle.BatchToSpaceNDOptions.decodeText(reader, json);
  640. case 'SpaceToBatchNDOptions': return circle.SpaceToBatchNDOptions.decodeText(reader, json);
  641. case 'TransposeOptions': return circle.TransposeOptions.decodeText(reader, json);
  642. case 'ReducerOptions': return circle.ReducerOptions.decodeText(reader, json);
  643. case 'SubOptions': return circle.SubOptions.decodeText(reader, json);
  644. case 'DivOptions': return circle.DivOptions.decodeText(reader, json);
  645. case 'SqueezeOptions': return circle.SqueezeOptions.decodeText(reader, json);
  646. case 'SequenceRNNOptions': return circle.SequenceRNNOptions.decodeText(reader, json);
  647. case 'StridedSliceOptions': return circle.StridedSliceOptions.decodeText(reader, json);
  648. case 'ExpOptions': return circle.ExpOptions.decodeText(reader, json);
  649. case 'TopKV2Options': return circle.TopKV2Options.decodeText(reader, json);
  650. case 'SplitOptions': return circle.SplitOptions.decodeText(reader, json);
  651. case 'LogSoftmaxOptions': return circle.LogSoftmaxOptions.decodeText(reader, json);
  652. case 'CastOptions': return circle.CastOptions.decodeText(reader, json);
  653. case 'DequantizeOptions': return circle.DequantizeOptions.decodeText(reader, json);
  654. case 'MaximumMinimumOptions': return circle.MaximumMinimumOptions.decodeText(reader, json);
  655. case 'ArgMaxOptions': return circle.ArgMaxOptions.decodeText(reader, json);
  656. case 'LessOptions': return circle.LessOptions.decodeText(reader, json);
  657. case 'NegOptions': return circle.NegOptions.decodeText(reader, json);
  658. case 'PadV2Options': return circle.PadV2Options.decodeText(reader, json);
  659. case 'GreaterOptions': return circle.GreaterOptions.decodeText(reader, json);
  660. case 'GreaterEqualOptions': return circle.GreaterEqualOptions.decodeText(reader, json);
  661. case 'LessEqualOptions': return circle.LessEqualOptions.decodeText(reader, json);
  662. case 'SelectOptions': return circle.SelectOptions.decodeText(reader, json);
  663. case 'SliceOptions': return circle.SliceOptions.decodeText(reader, json);
  664. case 'TransposeConvOptions': return circle.TransposeConvOptions.decodeText(reader, json);
  665. case 'SparseToDenseOptions': return circle.SparseToDenseOptions.decodeText(reader, json);
  666. case 'TileOptions': return circle.TileOptions.decodeText(reader, json);
  667. case 'ExpandDimsOptions': return circle.ExpandDimsOptions.decodeText(reader, json);
  668. case 'EqualOptions': return circle.EqualOptions.decodeText(reader, json);
  669. case 'NotEqualOptions': return circle.NotEqualOptions.decodeText(reader, json);
  670. case 'ShapeOptions': return circle.ShapeOptions.decodeText(reader, json);
  671. case 'PowOptions': return circle.PowOptions.decodeText(reader, json);
  672. case 'ArgMinOptions': return circle.ArgMinOptions.decodeText(reader, json);
  673. case 'FakeQuantOptions': return circle.FakeQuantOptions.decodeText(reader, json);
  674. case 'PackOptions': return circle.PackOptions.decodeText(reader, json);
  675. case 'LogicalOrOptions': return circle.LogicalOrOptions.decodeText(reader, json);
  676. case 'OneHotOptions': return circle.OneHotOptions.decodeText(reader, json);
  677. case 'LogicalAndOptions': return circle.LogicalAndOptions.decodeText(reader, json);
  678. case 'LogicalNotOptions': return circle.LogicalNotOptions.decodeText(reader, json);
  679. case 'UnpackOptions': return circle.UnpackOptions.decodeText(reader, json);
  680. case 'FloorDivOptions': return circle.FloorDivOptions.decodeText(reader, json);
  681. case 'SquareOptions': return circle.SquareOptions.decodeText(reader, json);
  682. case 'ZerosLikeOptions': return circle.ZerosLikeOptions.decodeText(reader, json);
  683. case 'FillOptions': return circle.FillOptions.decodeText(reader, json);
  684. case 'BidirectionalSequenceLSTMOptions': return circle.BidirectionalSequenceLSTMOptions.decodeText(reader, json);
  685. case 'BidirectionalSequenceRNNOptions': return circle.BidirectionalSequenceRNNOptions.decodeText(reader, json);
  686. case 'UnidirectionalSequenceLSTMOptions': return circle.UnidirectionalSequenceLSTMOptions.decodeText(reader, json);
  687. case 'FloorModOptions': return circle.FloorModOptions.decodeText(reader, json);
  688. case 'RangeOptions': return circle.RangeOptions.decodeText(reader, json);
  689. case 'ResizeNearestNeighborOptions': return circle.ResizeNearestNeighborOptions.decodeText(reader, json);
  690. case 'LeakyReluOptions': return circle.LeakyReluOptions.decodeText(reader, json);
  691. case 'SquaredDifferenceOptions': return circle.SquaredDifferenceOptions.decodeText(reader, json);
  692. case 'MirrorPadOptions': return circle.MirrorPadOptions.decodeText(reader, json);
  693. case 'AbsOptions': return circle.AbsOptions.decodeText(reader, json);
  694. case 'SplitVOptions': return circle.SplitVOptions.decodeText(reader, json);
  695. case 'UniqueOptions': return circle.UniqueOptions.decodeText(reader, json);
  696. case 'ReverseV2Options': return circle.ReverseV2Options.decodeText(reader, json);
  697. case 'AddNOptions': return circle.AddNOptions.decodeText(reader, json);
  698. case 'GatherNdOptions': return circle.GatherNdOptions.decodeText(reader, json);
  699. case 'CosOptions': return circle.CosOptions.decodeText(reader, json);
  700. case 'WhereOptions': return circle.WhereOptions.decodeText(reader, json);
  701. case 'RankOptions': return circle.RankOptions.decodeText(reader, json);
  702. case 'ReverseSequenceOptions': return circle.ReverseSequenceOptions.decodeText(reader, json);
  703. case 'MatrixDiagOptions': return circle.MatrixDiagOptions.decodeText(reader, json);
  704. case 'QuantizeOptions': return circle.QuantizeOptions.decodeText(reader, json);
  705. case 'MatrixSetDiagOptions': return circle.MatrixSetDiagOptions.decodeText(reader, json);
  706. case 'HardSwishOptions': return circle.HardSwishOptions.decodeText(reader, json);
  707. case 'IfOptions': return circle.IfOptions.decodeText(reader, json);
  708. case 'WhileOptions': return circle.WhileOptions.decodeText(reader, json);
  709. case 'DepthToSpaceOptions': return circle.DepthToSpaceOptions.decodeText(reader, json);
  710. case 'NonMaxSuppressionV4Options': return circle.NonMaxSuppressionV4Options.decodeText(reader, json);
  711. case 'NonMaxSuppressionV5Options': return circle.NonMaxSuppressionV5Options.decodeText(reader, json);
  712. case 'ScatterNdOptions': return circle.ScatterNdOptions.decodeText(reader, json);
  713. case 'SelectV2Options': return circle.SelectV2Options.decodeText(reader, json);
  714. case 'DensifyOptions': return circle.DensifyOptions.decodeText(reader, json);
  715. case 'SegmentSumOptions': return circle.SegmentSumOptions.decodeText(reader, json);
  716. case 'BatchMatMulOptions': return circle.BatchMatMulOptions.decodeText(reader, json);
  717. case 'CumsumOptions': return circle.CumsumOptions.decodeText(reader, json);
  718. case 'CallOnceOptions': return circle.CallOnceOptions.decodeText(reader, json);
  719. case 'BroadcastToOptions': return circle.BroadcastToOptions.decodeText(reader, json);
  720. case 'Rfft2dOptions': return circle.Rfft2dOptions.decodeText(reader, json);
  721. case 'Conv3DOptions': return circle.Conv3DOptions.decodeText(reader, json);
  722. case 'HashtableOptions': return circle.HashtableOptions.decodeText(reader, json);
  723. case 'HashtableFindOptions': return circle.HashtableFindOptions.decodeText(reader, json);
  724. case 'HashtableImportOptions': return circle.HashtableImportOptions.decodeText(reader, json);
  725. case 'HashtableSizeOptions': return circle.HashtableSizeOptions.decodeText(reader, json);
  726. case 'VarHandleOptions': return circle.VarHandleOptions.decodeText(reader, json);
  727. case 'ReadVariableOptions': return circle.ReadVariableOptions.decodeText(reader, json);
  728. case 'AssignVariableOptions': return circle.AssignVariableOptions.decodeText(reader, json);
  729. case 'RandomOptions': return circle.RandomOptions.decodeText(reader, json);
  730. case 'BucketizeOptions': return circle.BucketizeOptions.decodeText(reader, json);
  731. case 'GeluOptions': return circle.GeluOptions.decodeText(reader, json);
  732. case 'DynamicUpdateSliceOptions': return circle.DynamicUpdateSliceOptions.decodeText(reader, json);
  733. case 'UnsortedSegmentProdOptions': return circle.UnsortedSegmentProdOptions.decodeText(reader, json);
  734. case 'UnsortedSegmentMaxOptions': return circle.UnsortedSegmentMaxOptions.decodeText(reader, json);
  735. case 'UnsortedSegmentMinOptions': return circle.UnsortedSegmentMinOptions.decodeText(reader, json);
  736. case 'UnsortedSegmentSumOptions': return circle.UnsortedSegmentSumOptions.decodeText(reader, json);
  737. case 'ATan2Options': return circle.ATan2Options.decodeText(reader, json);
  738. case 'SignOptions': return circle.SignOptions.decodeText(reader, json);
  739. case 'BitcastOptions': return circle.BitcastOptions.decodeText(reader, json);
  740. case 'BitwiseXorOptions': return circle.BitwiseXorOptions.decodeText(reader, json);
  741. case 'RightShiftOptions': return circle.RightShiftOptions.decodeText(reader, json);
  742. case 'AttentionOptions': return circle.AttentionOptions.decodeText(reader, json);
  743. case 'RunModelOptions': return circle.RunModelOptions.decodeText(reader, json);
  744. case 'RoPEOptions': return circle.RoPEOptions.decodeText(reader, json);
  745. case 'RmsNormOptions': return circle.RmsNormOptions.decodeText(reader, json);
  746. case 'GRUOptions': return circle.GRUOptions.decodeText(reader, json);
  747. case 'BCQGatherOptions': return circle.BCQGatherOptions.decodeText(reader, json);
  748. case 'BCQFullyConnectedOptions': return circle.BCQFullyConnectedOptions.decodeText(reader, json);
  749. case 'InstanceNormOptions': return circle.InstanceNormOptions.decodeText(reader, json);
  750. default: return undefined;
  751. }
  752. }
  753. };
  754. circle.BuiltinOptions2 = class {
  755. static decode(reader, position, type) {
  756. switch (type) {
  757. case 1: return circle.StablehloConcatenateOptions.decode(reader, position);
  758. case 2: return circle.StablehloBroadcastInDimOptions.decode(reader, position);
  759. case 3: return circle.StablehloSliceOptions.decode(reader, position);
  760. case 4: return circle.StablehloConvolutionOptions.decode(reader, position);
  761. case 5: return circle.StablehloCustomCallOptions.decode(reader, position);
  762. case 6: return circle.StablehloReduceOptions.decode(reader, position);
  763. case 7: return circle.StablehloScatterOptions.decode(reader, position);
  764. case 8: return circle.StablehloCompareOptions.decode(reader, position);
  765. case 9: return circle.StablehloDynamicSliceOptions.decode(reader, position);
  766. case 10: return circle.StablehloPadOptions.decode(reader, position);
  767. case 11: return circle.StablehloIotaOptions.decode(reader, position);
  768. case 12: return circle.StablehloDotGeneralOptions.decode(reader, position);
  769. case 13: return circle.StablehloReduceWindowOptions.decode(reader, position);
  770. case 14: return circle.StablehloSortOptions.decode(reader, position);
  771. case 15: return circle.StablehloWhileOptions.decode(reader, position);
  772. case 16: return circle.StablehloGatherOptions.decode(reader, position);
  773. case 17: return circle.StablehloTransposeOptions.decode(reader, position);
  774. case 18: return circle.DilateOptions.decode(reader, position);
  775. case 19: return circle.StablehloRngBitGeneratorOptions.decode(reader, position);
  776. case 20: return circle.ReduceWindowOptions.decode(reader, position);
  777. case 21: return circle.StableHLOCompositeOptions.decode(reader, position);
  778. case 22: return circle.StablehloShiftLeftOptions.decode(reader, position);
  779. case 23: return circle.StablehloCaseOptions.decode(reader, position);
  780. default: return undefined;
  781. }
  782. }
  783. static decodeText(reader, json, type) {
  784. switch (type) {
  785. case 'StablehloConcatenateOptions': return circle.StablehloConcatenateOptions.decodeText(reader, json);
  786. case 'StablehloBroadcastInDimOptions': return circle.StablehloBroadcastInDimOptions.decodeText(reader, json);
  787. case 'StablehloSliceOptions': return circle.StablehloSliceOptions.decodeText(reader, json);
  788. case 'StablehloConvolutionOptions': return circle.StablehloConvolutionOptions.decodeText(reader, json);
  789. case 'StablehloCustomCallOptions': return circle.StablehloCustomCallOptions.decodeText(reader, json);
  790. case 'StablehloReduceOptions': return circle.StablehloReduceOptions.decodeText(reader, json);
  791. case 'StablehloScatterOptions': return circle.StablehloScatterOptions.decodeText(reader, json);
  792. case 'StablehloCompareOptions': return circle.StablehloCompareOptions.decodeText(reader, json);
  793. case 'StablehloDynamicSliceOptions': return circle.StablehloDynamicSliceOptions.decodeText(reader, json);
  794. case 'StablehloPadOptions': return circle.StablehloPadOptions.decodeText(reader, json);
  795. case 'StablehloIotaOptions': return circle.StablehloIotaOptions.decodeText(reader, json);
  796. case 'StablehloDotGeneralOptions': return circle.StablehloDotGeneralOptions.decodeText(reader, json);
  797. case 'StablehloReduceWindowOptions': return circle.StablehloReduceWindowOptions.decodeText(reader, json);
  798. case 'StablehloSortOptions': return circle.StablehloSortOptions.decodeText(reader, json);
  799. case 'StablehloWhileOptions': return circle.StablehloWhileOptions.decodeText(reader, json);
  800. case 'StablehloGatherOptions': return circle.StablehloGatherOptions.decodeText(reader, json);
  801. case 'StablehloTransposeOptions': return circle.StablehloTransposeOptions.decodeText(reader, json);
  802. case 'DilateOptions': return circle.DilateOptions.decodeText(reader, json);
  803. case 'StablehloRngBitGeneratorOptions': return circle.StablehloRngBitGeneratorOptions.decodeText(reader, json);
  804. case 'ReduceWindowOptions': return circle.ReduceWindowOptions.decodeText(reader, json);
  805. case 'StableHLOCompositeOptions': return circle.StableHLOCompositeOptions.decodeText(reader, json);
  806. case 'StablehloShiftLeftOptions': return circle.StablehloShiftLeftOptions.decodeText(reader, json);
  807. case 'StablehloCaseOptions': return circle.StablehloCaseOptions.decodeText(reader, json);
  808. default: return undefined;
  809. }
  810. }
  811. };
  812. circle.StablehloGatherOptions = class StablehloGatherOptions {
  813. static decode(reader, position) {
  814. const $ = new circle.StablehloGatherOptions();
  815. $.offset_dims = reader.int64s_(position, 4);
  816. $.collapsed_slice_dims = reader.int64s_(position, 6);
  817. $.start_index_map = reader.int64s_(position, 8);
  818. $.index_vector_dim = reader.int64_(position, 10, 0n);
  819. $.slice_sizes = reader.int64s_(position, 12);
  820. $.indices_are_sorted = reader.bool_(position, 14, false);
  821. return $;
  822. }
  823. static decodeText(reader, json) {
  824. const $ = new circle.StablehloGatherOptions();
  825. $.offset_dims = reader.array(json.offset_dims);
  826. $.collapsed_slice_dims = reader.array(json.collapsed_slice_dims);
  827. $.start_index_map = reader.array(json.start_index_map);
  828. $.index_vector_dim = reader.int64(json.index_vector_dim, 0n);
  829. $.slice_sizes = reader.array(json.slice_sizes);
  830. $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
  831. return $;
  832. }
  833. };
  834. circle.StablehloTransposeOptions = class StablehloTransposeOptions {
  835. static decode(reader, position) {
  836. const $ = new circle.StablehloTransposeOptions();
  837. $.permutation = reader.int64s_(position, 4);
  838. return $;
  839. }
  840. static decodeText(reader, json) {
  841. const $ = new circle.StablehloTransposeOptions();
  842. $.permutation = reader.array(json.permutation);
  843. return $;
  844. }
  845. };
  846. circle.StablehloPrecisionConfig = {
  847. DEFAULT: 0, '0': 'DEFAULT',
  848. HIGH: 1, '1': 'HIGH',
  849. HIGHEST: 2, '2': 'HIGHEST'
  850. };
  851. circle.StablehloDotGeneralOptions = class StablehloDotGeneralOptions {
  852. static decode(reader, position) {
  853. const $ = new circle.StablehloDotGeneralOptions();
  854. $.lhs_batching_dimensions = reader.int64s_(position, 4);
  855. $.rhs_batching_dimensions = reader.int64s_(position, 6);
  856. $.lhs_contracting_dimensions = reader.int64s_(position, 8);
  857. $.rhs_contracting_dimensions = reader.int64s_(position, 10);
  858. $.precision_config = reader.array(position, 12, Uint32Array);
  859. return $;
  860. }
  861. static decodeText(reader, json) {
  862. const $ = new circle.StablehloDotGeneralOptions();
  863. $.lhs_batching_dimensions = reader.array(json.lhs_batching_dimensions);
  864. $.rhs_batching_dimensions = reader.array(json.rhs_batching_dimensions);
  865. $.lhs_contracting_dimensions = reader.array(json.lhs_contracting_dimensions);
  866. $.rhs_contracting_dimensions = reader.array(json.rhs_contracting_dimensions);
  867. $.precision_config = reader.objects(json.precision_config, circle.StablehloPrecisionConfig);
  868. return $;
  869. }
  870. };
  871. circle.StablehloReduceWindowOptions = class StablehloReduceWindowOptions {
  872. static decode(reader, position) {
  873. const $ = new circle.StablehloReduceWindowOptions();
  874. $.window_dimensions = reader.int64s_(position, 4);
  875. $.window_strides = reader.int64s_(position, 6);
  876. $.base_dilations = reader.int64s_(position, 8);
  877. $.window_dilations = reader.int64s_(position, 10);
  878. $.padding = reader.int64s_(position, 12);
  879. $.body_subgraph_index = reader.int32_(position, 14, 0);
  880. return $;
  881. }
  882. static decodeText(reader, json) {
  883. const $ = new circle.StablehloReduceWindowOptions();
  884. $.window_dimensions = reader.array(json.window_dimensions);
  885. $.window_strides = reader.array(json.window_strides);
  886. $.base_dilations = reader.array(json.base_dilations);
  887. $.window_dilations = reader.array(json.window_dilations);
  888. $.padding = reader.array(json.padding);
  889. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  890. return $;
  891. }
  892. };
  893. circle.StablehloWhileOptions = class StablehloWhileOptions {
  894. static decode(reader, position) {
  895. const $ = new circle.StablehloWhileOptions();
  896. $.cond_subgraph_index = reader.int32_(position, 4, 0);
  897. $.body_subgraph_index = reader.int32_(position, 6, 0);
  898. return $;
  899. }
  900. static decodeText(reader, json) {
  901. const $ = new circle.StablehloWhileOptions();
  902. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  903. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  904. return $;
  905. }
  906. };
  907. circle.StablehloSortOptions = class StablehloSortOptions {
  908. static decode(reader, position) {
  909. const $ = new circle.StablehloSortOptions();
  910. $.dimension = reader.int64_(position, 4, 0n);
  911. $.is_stable = reader.bool_(position, 6, false);
  912. $.comparator_subgraph_index = reader.int32_(position, 8, 0);
  913. return $;
  914. }
  915. static decodeText(reader, json) {
  916. const $ = new circle.StablehloSortOptions();
  917. $.dimension = reader.int64(json.dimension, 0n);
  918. $.is_stable = reader.value(json.is_stable, false);
  919. $.comparator_subgraph_index = reader.value(json.comparator_subgraph_index, 0);
  920. return $;
  921. }
  922. };
  923. circle.StablehloConcatenateOptions = class StablehloConcatenateOptions {
  924. static decode(reader, position) {
  925. const $ = new circle.StablehloConcatenateOptions();
  926. $.dimension = reader.int64_(position, 4, 0n);
  927. return $;
  928. }
  929. static decodeText(reader, json) {
  930. const $ = new circle.StablehloConcatenateOptions();
  931. $.dimension = reader.int64(json.dimension, 0n);
  932. return $;
  933. }
  934. };
  935. circle.StablehloBroadcastInDimOptions = class StablehloBroadcastInDimOptions {
  936. static decode(reader, position) {
  937. const $ = new circle.StablehloBroadcastInDimOptions();
  938. $.broadcast_dimensions = reader.int64s_(position, 4);
  939. return $;
  940. }
  941. static decodeText(reader, json) {
  942. const $ = new circle.StablehloBroadcastInDimOptions();
  943. $.broadcast_dimensions = reader.array(json.broadcast_dimensions);
  944. return $;
  945. }
  946. };
  947. circle.StablehloComparisonDirection = {
  948. STABLEHLO_COMPARISON_DIRECTION_EQ: 0, '0': 'STABLEHLO_COMPARISON_DIRECTION_EQ',
  949. STABLEHLO_COMPARISON_DIRECTION_NE: 1, '1': 'STABLEHLO_COMPARISON_DIRECTION_NE',
  950. STABLEHLO_COMPARISON_DIRECTION_GE: 2, '2': 'STABLEHLO_COMPARISON_DIRECTION_GE',
  951. STABLEHLO_COMPARISON_DIRECTION_GT: 3, '3': 'STABLEHLO_COMPARISON_DIRECTION_GT',
  952. STABLEHLO_COMPARISON_DIRECTION_LE: 4, '4': 'STABLEHLO_COMPARISON_DIRECTION_LE',
  953. STABLEHLO_COMPARISON_DIRECTION_LT: 5, '5': 'STABLEHLO_COMPARISON_DIRECTION_LT'
  954. };
  955. circle.StablehloComparisonType = {
  956. STABLEHLO_COMPARISON_TYPE_NOTYPE: 0, '0': 'STABLEHLO_COMPARISON_TYPE_NOTYPE',
  957. STABLEHLO_COMPARISON_TYPE_FLOAT: 1, '1': 'STABLEHLO_COMPARISON_TYPE_FLOAT',
  958. STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER: 2, '2': 'STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER',
  959. STABLEHLO_COMPARISON_TYPE_SIGNED: 3, '3': 'STABLEHLO_COMPARISON_TYPE_SIGNED',
  960. STABLEHLO_COMPARISON_TYPE_UNSIGNED: 4, '4': 'STABLEHLO_COMPARISON_TYPE_UNSIGNED'
  961. };
  962. circle.StablehloCompareOptions = class StablehloCompareOptions {
  963. static decode(reader, position) {
  964. const $ = new circle.StablehloCompareOptions();
  965. $.comparison_direction = reader.uint32_(position, 4, 0);
  966. $.compare_type = reader.uint32_(position, 6, 0);
  967. return $;
  968. }
  969. static decodeText(reader, json) {
  970. const $ = new circle.StablehloCompareOptions();
  971. $.comparison_direction = circle.StablehloComparisonDirection[json.comparison_direction];
  972. $.compare_type = circle.StablehloComparisonType[json.compare_type];
  973. return $;
  974. }
  975. };
  976. circle.StablehloDynamicSliceOptions = class StablehloDynamicSliceOptions {
  977. static decode(reader, position) {
  978. const $ = new circle.StablehloDynamicSliceOptions();
  979. $.slice_sizes = reader.int64s_(position, 4);
  980. return $;
  981. }
  982. static decodeText(reader, json) {
  983. const $ = new circle.StablehloDynamicSliceOptions();
  984. $.slice_sizes = reader.array(json.slice_sizes);
  985. return $;
  986. }
  987. };
  988. circle.StablehloPadOptions = class StablehloPadOptions {
  989. static decode(reader, position) {
  990. const $ = new circle.StablehloPadOptions();
  991. $.edge_padding_low = reader.int64s_(position, 4);
  992. $.edge_padding_high = reader.int64s_(position, 6);
  993. $.interior_padding = reader.int64s_(position, 8);
  994. return $;
  995. }
  996. static decodeText(reader, json) {
  997. const $ = new circle.StablehloPadOptions();
  998. $.edge_padding_low = reader.array(json.edge_padding_low);
  999. $.edge_padding_high = reader.array(json.edge_padding_high);
  1000. $.interior_padding = reader.array(json.interior_padding);
  1001. return $;
  1002. }
  1003. };
  1004. circle.StablehloIotaOptions = class StablehloIotaOptions {
  1005. static decode(reader, position) {
  1006. const $ = new circle.StablehloIotaOptions();
  1007. $.iota_dimension = reader.int64_(position, 4, 0n);
  1008. return $;
  1009. }
  1010. static decodeText(reader, json) {
  1011. const $ = new circle.StablehloIotaOptions();
  1012. $.iota_dimension = reader.int64(json.iota_dimension, 0n);
  1013. return $;
  1014. }
  1015. };
  1016. circle.StablehloCustomCallOptions = class StablehloCustomCallOptions {
  1017. static decode(reader, position) {
  1018. const $ = new circle.StablehloCustomCallOptions();
  1019. $.call_target_name = reader.string_(position, 4, null);
  1020. $.has_side_effect = reader.bool_(position, 6, false);
  1021. $.backend_config = reader.string_(position, 8, null);
  1022. $.api_version = reader.int32_(position, 10, 0);
  1023. $.called_computations = reader.array(position, 12, Int32Array);
  1024. $.custom_attributes = reader.array(position, 14, Uint8Array);
  1025. return $;
  1026. }
  1027. static decodeText(reader, json) {
  1028. const $ = new circle.StablehloCustomCallOptions();
  1029. $.call_target_name = reader.value(json.call_target_name, null);
  1030. $.has_side_effect = reader.value(json.has_side_effect, false);
  1031. $.backend_config = reader.value(json.backend_config, null);
  1032. $.api_version = reader.value(json.api_version, 0);
  1033. $.called_computations = reader.array(json.called_computations, Int32Array);
  1034. $.custom_attributes = reader.array(json.custom_attributes, Uint8Array);
  1035. return $;
  1036. }
  1037. };
  1038. circle.StablehloReduceOptions = class StablehloReduceOptions {
  1039. static decode(reader, position) {
  1040. const $ = new circle.StablehloReduceOptions();
  1041. $.dimensions = reader.int64s_(position, 4);
  1042. $.body_subgraph_index = reader.int32_(position, 6, 0);
  1043. return $;
  1044. }
  1045. static decodeText(reader, json) {
  1046. const $ = new circle.StablehloReduceOptions();
  1047. $.dimensions = reader.array(json.dimensions);
  1048. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  1049. return $;
  1050. }
  1051. };
  1052. circle.StablehloSliceOptions = class StablehloSliceOptions {
  1053. static decode(reader, position) {
  1054. const $ = new circle.StablehloSliceOptions();
  1055. $.start_indices = reader.int64s_(position, 4);
  1056. $.limit_indices = reader.int64s_(position, 6);
  1057. $.strides = reader.int64s_(position, 8);
  1058. return $;
  1059. }
  1060. static decodeText(reader, json) {
  1061. const $ = new circle.StablehloSliceOptions();
  1062. $.start_indices = reader.array(json.start_indices);
  1063. $.limit_indices = reader.array(json.limit_indices);
  1064. $.strides = reader.array(json.strides);
  1065. return $;
  1066. }
  1067. };
  1068. circle.StablehloConvolutionOptions = class StablehloConvolutionOptions {
  1069. static decode(reader, position) {
  1070. const $ = new circle.StablehloConvolutionOptions();
  1071. $.window_strides = reader.int64s_(position, 4);
  1072. $.padding = reader.int64s_(position, 6);
  1073. $.lhs_dilation = reader.int64s_(position, 8);
  1074. $.rhs_dilation = reader.int64s_(position, 10);
  1075. $.window_reversal = reader.bools_(position, 12);
  1076. $.input_batch_dimension = reader.int64_(position, 14, 0n);
  1077. $.input_feature_dimension = reader.int64_(position, 16, 0n);
  1078. $.input_spatial_dimensions = reader.int64s_(position, 18);
  1079. $.kernel_input_feature_dimension = reader.int64_(position, 20, 0n);
  1080. $.kernel_output_feature_dimension = reader.int64_(position, 22, 0n);
  1081. $.kernel_spatial_dimensions = reader.int64s_(position, 24);
  1082. $.output_batch_dimension = reader.int64_(position, 26, 0n);
  1083. $.output_feature_dimension = reader.int64_(position, 28, 0n);
  1084. $.output_spatial_dimensions = reader.int64s_(position, 30);
  1085. $.feature_group_count = reader.int64_(position, 32, 0n);
  1086. $.batch_group_count = reader.int64_(position, 34, 0n);
  1087. $.precision_config = reader.array(position, 36, Uint32Array);
  1088. return $;
  1089. }
  1090. static decodeText(reader, json) {
  1091. const $ = new circle.StablehloConvolutionOptions();
  1092. $.window_strides = reader.array(json.window_strides);
  1093. $.padding = reader.array(json.padding);
  1094. $.lhs_dilation = reader.array(json.lhs_dilation);
  1095. $.rhs_dilation = reader.array(json.rhs_dilation);
  1096. $.window_reversal = reader.array(json.window_reversal);
  1097. $.input_batch_dimension = reader.int64(json.input_batch_dimension, 0n);
  1098. $.input_feature_dimension = reader.int64(json.input_feature_dimension, 0n);
  1099. $.input_spatial_dimensions = reader.array(json.input_spatial_dimensions);
  1100. $.kernel_input_feature_dimension = reader.int64(json.kernel_input_feature_dimension, 0n);
  1101. $.kernel_output_feature_dimension = reader.int64(json.kernel_output_feature_dimension, 0n);
  1102. $.kernel_spatial_dimensions = reader.array(json.kernel_spatial_dimensions);
  1103. $.output_batch_dimension = reader.int64(json.output_batch_dimension, 0n);
  1104. $.output_feature_dimension = reader.int64(json.output_feature_dimension, 0n);
  1105. $.output_spatial_dimensions = reader.array(json.output_spatial_dimensions);
  1106. $.feature_group_count = reader.int64(json.feature_group_count, 0n);
  1107. $.batch_group_count = reader.int64(json.batch_group_count, 0n);
  1108. $.precision_config = reader.objects(json.precision_config, circle.StablehloPrecisionConfig);
  1109. return $;
  1110. }
  1111. };
  1112. circle.StablehloScatterOptions = class StablehloScatterOptions {
  1113. static decode(reader, position) {
  1114. const $ = new circle.StablehloScatterOptions();
  1115. $.indices_are_sorted = reader.bool_(position, 4, false);
  1116. $.update_window_dims = reader.int64s_(position, 6);
  1117. $.inserted_window_dims = reader.int64s_(position, 8);
  1118. $.scatter_dims_to_operand_dims = reader.int64s_(position, 10);
  1119. $.index_vector_dim = reader.int64_(position, 12, 0n);
  1120. $.unique_indices = reader.bool_(position, 14, false);
  1121. $.update_computation_subgraph_index = reader.int32_(position, 16, 0);
  1122. return $;
  1123. }
  1124. static decodeText(reader, json) {
  1125. const $ = new circle.StablehloScatterOptions();
  1126. $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
  1127. $.update_window_dims = reader.array(json.update_window_dims);
  1128. $.inserted_window_dims = reader.array(json.inserted_window_dims);
  1129. $.scatter_dims_to_operand_dims = reader.array(json.scatter_dims_to_operand_dims);
  1130. $.index_vector_dim = reader.int64(json.index_vector_dim, 0n);
  1131. $.unique_indices = reader.value(json.unique_indices, false);
  1132. $.update_computation_subgraph_index = reader.value(json.update_computation_subgraph_index, 0);
  1133. return $;
  1134. }
  1135. };
  1136. circle.StablehloCaseOptions = class StablehloCaseOptions {
  1137. static decode(reader, position) {
  1138. const $ = new circle.StablehloCaseOptions();
  1139. $.branch_subgraph_indices = reader.array(position, 4, Int32Array);
  1140. return $;
  1141. }
  1142. static decodeText(reader, json) {
  1143. const $ = new circle.StablehloCaseOptions();
  1144. $.branch_subgraph_indices = reader.array(json.branch_subgraph_indices, Int32Array);
  1145. return $;
  1146. }
  1147. };
  1148. circle.RngAlgorithm = {
  1149. DEFAULT: 0, '0': 'DEFAULT',
  1150. PHILOX: 1, '1': 'PHILOX',
  1151. THREEFRY: 2, '2': 'THREEFRY'
  1152. };
  1153. circle.StablehloRngBitGeneratorOptions = class StablehloRngBitGeneratorOptions {
  1154. static decode(reader, position) {
  1155. const $ = new circle.StablehloRngBitGeneratorOptions();
  1156. $.algorithm = reader.int8_(position, 4, 0);
  1157. return $;
  1158. }
  1159. static decodeText(reader, json) {
  1160. const $ = new circle.StablehloRngBitGeneratorOptions();
  1161. $.algorithm = circle.RngAlgorithm[json.algorithm];
  1162. return $;
  1163. }
  1164. };
  1165. circle.Padding = {
  1166. SAME: 0, '0': 'SAME',
  1167. VALID: 1, '1': 'VALID'
  1168. };
  1169. circle.ActivationFunctionType = {
  1170. NONE: 0, '0': 'NONE',
  1171. RELU: 1, '1': 'RELU',
  1172. RELU_N1_TO_1: 2, '2': 'RELU_N1_TO_1',
  1173. RELU6: 3, '3': 'RELU6',
  1174. TANH: 4, '4': 'TANH',
  1175. SIGN_BIT: 5, '5': 'SIGN_BIT'
  1176. };
  1177. circle.Conv2DOptions = class Conv2DOptions {
  1178. static decode(reader, position) {
  1179. const $ = new circle.Conv2DOptions();
  1180. $.padding = reader.int8_(position, 4, 0);
  1181. $.stride_w = reader.int32_(position, 6, 0);
  1182. $.stride_h = reader.int32_(position, 8, 0);
  1183. $.fused_activation_function = reader.int8_(position, 10, 0);
  1184. $.dilation_w_factor = reader.int32_(position, 12, 1);
  1185. $.dilation_h_factor = reader.int32_(position, 14, 1);
  1186. $.quantized_bias_type = reader.int8_(position, 16, 0);
  1187. return $;
  1188. }
  1189. static decodeText(reader, json) {
  1190. const $ = new circle.Conv2DOptions();
  1191. $.padding = circle.Padding[json.padding];
  1192. $.stride_w = reader.value(json.stride_w, 0);
  1193. $.stride_h = reader.value(json.stride_h, 0);
  1194. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1195. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1196. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1197. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  1198. return $;
  1199. }
  1200. };
  1201. circle.Conv3DOptions = class Conv3DOptions {
  1202. static decode(reader, position) {
  1203. const $ = new circle.Conv3DOptions();
  1204. $.padding = reader.int8_(position, 4, 0);
  1205. $.stride_d = reader.int32_(position, 6, 0);
  1206. $.stride_w = reader.int32_(position, 8, 0);
  1207. $.stride_h = reader.int32_(position, 10, 0);
  1208. $.fused_activation_function = reader.int8_(position, 12, 0);
  1209. $.dilation_d_factor = reader.int32_(position, 14, 1);
  1210. $.dilation_w_factor = reader.int32_(position, 16, 1);
  1211. $.dilation_h_factor = reader.int32_(position, 18, 1);
  1212. return $;
  1213. }
  1214. static decodeText(reader, json) {
  1215. const $ = new circle.Conv3DOptions();
  1216. $.padding = circle.Padding[json.padding];
  1217. $.stride_d = reader.value(json.stride_d, 0);
  1218. $.stride_w = reader.value(json.stride_w, 0);
  1219. $.stride_h = reader.value(json.stride_h, 0);
  1220. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1221. $.dilation_d_factor = reader.value(json.dilation_d_factor, 1);
  1222. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1223. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1224. return $;
  1225. }
  1226. };
  1227. circle.Pool2DOptions = class Pool2DOptions {
  1228. static decode(reader, position) {
  1229. const $ = new circle.Pool2DOptions();
  1230. $.padding = reader.int8_(position, 4, 0);
  1231. $.stride_w = reader.int32_(position, 6, 0);
  1232. $.stride_h = reader.int32_(position, 8, 0);
  1233. $.filter_width = reader.int32_(position, 10, 0);
  1234. $.filter_height = reader.int32_(position, 12, 0);
  1235. $.fused_activation_function = reader.int8_(position, 14, 0);
  1236. return $;
  1237. }
  1238. static decodeText(reader, json) {
  1239. const $ = new circle.Pool2DOptions();
  1240. $.padding = circle.Padding[json.padding];
  1241. $.stride_w = reader.value(json.stride_w, 0);
  1242. $.stride_h = reader.value(json.stride_h, 0);
  1243. $.filter_width = reader.value(json.filter_width, 0);
  1244. $.filter_height = reader.value(json.filter_height, 0);
  1245. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1246. return $;
  1247. }
  1248. };
  1249. circle.DepthwiseConv2DOptions = class DepthwiseConv2DOptions {
  1250. static decode(reader, position) {
  1251. const $ = new circle.DepthwiseConv2DOptions();
  1252. $.padding = reader.int8_(position, 4, 0);
  1253. $.stride_w = reader.int32_(position, 6, 0);
  1254. $.stride_h = reader.int32_(position, 8, 0);
  1255. $.depth_multiplier = reader.int32_(position, 10, 0);
  1256. $.fused_activation_function = reader.int8_(position, 12, 0);
  1257. $.dilation_w_factor = reader.int32_(position, 14, 1);
  1258. $.dilation_h_factor = reader.int32_(position, 16, 1);
  1259. return $;
  1260. }
  1261. static decodeText(reader, json) {
  1262. const $ = new circle.DepthwiseConv2DOptions();
  1263. $.padding = circle.Padding[json.padding];
  1264. $.stride_w = reader.value(json.stride_w, 0);
  1265. $.stride_h = reader.value(json.stride_h, 0);
  1266. $.depth_multiplier = reader.value(json.depth_multiplier, 0);
  1267. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1268. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1269. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1270. return $;
  1271. }
  1272. };
  1273. circle.ConcatEmbeddingsOptions = class ConcatEmbeddingsOptions {
  1274. static decode(reader, position) {
  1275. const $ = new circle.ConcatEmbeddingsOptions();
  1276. $.num_channels = reader.int32_(position, 4, 0);
  1277. $.num_columns_per_channel = reader.array(position, 6, Int32Array);
  1278. $.embedding_dim_per_channel = reader.array(position, 8, Int32Array);
  1279. return $;
  1280. }
  1281. static decodeText(reader, json) {
  1282. const $ = new circle.ConcatEmbeddingsOptions();
  1283. $.num_channels = reader.value(json.num_channels, 0);
  1284. $.num_columns_per_channel = reader.array(json.num_columns_per_channel, Int32Array);
  1285. $.embedding_dim_per_channel = reader.array(json.embedding_dim_per_channel, Int32Array);
  1286. return $;
  1287. }
  1288. };
  1289. circle.LSHProjectionType = {
  1290. UNKNOWN: 0, '0': 'UNKNOWN',
  1291. SPARSE: 1, '1': 'SPARSE',
  1292. DENSE: 2, '2': 'DENSE'
  1293. };
  1294. circle.LSHProjectionOptions = class LSHProjectionOptions {
  1295. static decode(reader, position) {
  1296. const $ = new circle.LSHProjectionOptions();
  1297. $.type = reader.int8_(position, 4, 0);
  1298. return $;
  1299. }
  1300. static decodeText(reader, json) {
  1301. const $ = new circle.LSHProjectionOptions();
  1302. $.type = circle.LSHProjectionType[json.type];
  1303. return $;
  1304. }
  1305. };
  1306. circle.SVDFOptions = class SVDFOptions {
  1307. static decode(reader, position) {
  1308. const $ = new circle.SVDFOptions();
  1309. $.rank = reader.int32_(position, 4, 0);
  1310. $.fused_activation_function = reader.int8_(position, 6, 0);
  1311. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  1312. return $;
  1313. }
  1314. static decodeText(reader, json) {
  1315. const $ = new circle.SVDFOptions();
  1316. $.rank = reader.value(json.rank, 0);
  1317. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1318. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1319. return $;
  1320. }
  1321. };
  1322. circle.RNNOptions = class RNNOptions {
  1323. static decode(reader, position) {
  1324. const $ = new circle.RNNOptions();
  1325. $.fused_activation_function = reader.int8_(position, 4, 0);
  1326. $.asymmetric_quantize_inputs = reader.bool_(position, 6, false);
  1327. return $;
  1328. }
  1329. static decodeText(reader, json) {
  1330. const $ = new circle.RNNOptions();
  1331. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1332. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1333. return $;
  1334. }
  1335. };
  1336. circle.SequenceRNNOptions = class SequenceRNNOptions {
  1337. static decode(reader, position) {
  1338. const $ = new circle.SequenceRNNOptions();
  1339. $.time_major = reader.bool_(position, 4, false);
  1340. $.fused_activation_function = reader.int8_(position, 6, 0);
  1341. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  1342. return $;
  1343. }
  1344. static decodeText(reader, json) {
  1345. const $ = new circle.SequenceRNNOptions();
  1346. $.time_major = reader.value(json.time_major, false);
  1347. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1348. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1349. return $;
  1350. }
  1351. };
  1352. circle.BidirectionalSequenceRNNOptions = class BidirectionalSequenceRNNOptions {
  1353. static decode(reader, position) {
  1354. const $ = new circle.BidirectionalSequenceRNNOptions();
  1355. $.time_major = reader.bool_(position, 4, false);
  1356. $.fused_activation_function = reader.int8_(position, 6, 0);
  1357. $.merge_outputs = reader.bool_(position, 8, false);
  1358. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  1359. return $;
  1360. }
  1361. static decodeText(reader, json) {
  1362. const $ = new circle.BidirectionalSequenceRNNOptions();
  1363. $.time_major = reader.value(json.time_major, false);
  1364. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1365. $.merge_outputs = reader.value(json.merge_outputs, false);
  1366. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1367. return $;
  1368. }
  1369. };
  1370. circle.FullyConnectedOptionsWeightsFormat = {
  1371. DEFAULT: 0, '0': 'DEFAULT',
  1372. SHUFFLED4x16INT8: 1, '1': 'SHUFFLED4x16INT8',
  1373. SHUFFLED16x1FLOAT32: 127, '127': 'SHUFFLED16x1FLOAT32'
  1374. };
  1375. circle.FullyConnectedOptions = class FullyConnectedOptions {
  1376. static decode(reader, position) {
  1377. const $ = new circle.FullyConnectedOptions();
  1378. $.fused_activation_function = reader.int8_(position, 4, 0);
  1379. $.weights_format = reader.int8_(position, 6, 0);
  1380. $.keep_num_dims = reader.bool_(position, 8, false);
  1381. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  1382. $.quantized_bias_type = reader.int8_(position, 12, 0);
  1383. return $;
  1384. }
  1385. static decodeText(reader, json) {
  1386. const $ = new circle.FullyConnectedOptions();
  1387. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1388. $.weights_format = circle.FullyConnectedOptionsWeightsFormat[json.weights_format];
  1389. $.keep_num_dims = reader.value(json.keep_num_dims, false);
  1390. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1391. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  1392. return $;
  1393. }
  1394. };
  1395. circle.SoftmaxOptions = class SoftmaxOptions {
  1396. static decode(reader, position) {
  1397. const $ = new circle.SoftmaxOptions();
  1398. $.beta = reader.float32_(position, 4, 0);
  1399. return $;
  1400. }
  1401. static decodeText(reader, json) {
  1402. const $ = new circle.SoftmaxOptions();
  1403. $.beta = reader.value(json.beta, 0);
  1404. return $;
  1405. }
  1406. };
  1407. circle.ConcatenationOptions = class ConcatenationOptions {
  1408. static decode(reader, position) {
  1409. const $ = new circle.ConcatenationOptions();
  1410. $.axis = reader.int32_(position, 4, 0);
  1411. $.fused_activation_function = reader.int8_(position, 6, 0);
  1412. return $;
  1413. }
  1414. static decodeText(reader, json) {
  1415. const $ = new circle.ConcatenationOptions();
  1416. $.axis = reader.value(json.axis, 0);
  1417. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1418. return $;
  1419. }
  1420. };
  1421. circle.AddOptions = class AddOptions {
  1422. static decode(reader, position) {
  1423. const $ = new circle.AddOptions();
  1424. $.fused_activation_function = reader.int8_(position, 4, 0);
  1425. $.pot_scale_int16 = reader.bool_(position, 6, true);
  1426. return $;
  1427. }
  1428. static decodeText(reader, json) {
  1429. const $ = new circle.AddOptions();
  1430. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1431. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  1432. return $;
  1433. }
  1434. };
  1435. circle.MulOptions = class MulOptions {
  1436. static decode(reader, position) {
  1437. const $ = new circle.MulOptions();
  1438. $.fused_activation_function = reader.int8_(position, 4, 0);
  1439. return $;
  1440. }
  1441. static decodeText(reader, json) {
  1442. const $ = new circle.MulOptions();
  1443. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1444. return $;
  1445. }
  1446. };
  1447. circle.L2NormOptions = class L2NormOptions {
  1448. static decode(reader, position) {
  1449. const $ = new circle.L2NormOptions();
  1450. $.fused_activation_function = reader.int8_(position, 4, 0);
  1451. return $;
  1452. }
  1453. static decodeText(reader, json) {
  1454. const $ = new circle.L2NormOptions();
  1455. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1456. return $;
  1457. }
  1458. };
  1459. circle.LocalResponseNormalizationOptions = class LocalResponseNormalizationOptions {
  1460. static decode(reader, position) {
  1461. const $ = new circle.LocalResponseNormalizationOptions();
  1462. $.radius = reader.int32_(position, 4, 0);
  1463. $.bias = reader.float32_(position, 6, 0);
  1464. $.alpha = reader.float32_(position, 8, 0);
  1465. $.beta = reader.float32_(position, 10, 0);
  1466. return $;
  1467. }
  1468. static decodeText(reader, json) {
  1469. const $ = new circle.LocalResponseNormalizationOptions();
  1470. $.radius = reader.value(json.radius, 0);
  1471. $.bias = reader.value(json.bias, 0);
  1472. $.alpha = reader.value(json.alpha, 0);
  1473. $.beta = reader.value(json.beta, 0);
  1474. return $;
  1475. }
  1476. };
  1477. circle.LSTMKernelType = {
  1478. FULL: 0, '0': 'FULL',
  1479. BASIC: 1, '1': 'BASIC'
  1480. };
  1481. circle.LSTMOptions = class LSTMOptions {
  1482. static decode(reader, position) {
  1483. const $ = new circle.LSTMOptions();
  1484. $.fused_activation_function = reader.int8_(position, 4, 0);
  1485. $.cell_clip = reader.float32_(position, 6, 0);
  1486. $.proj_clip = reader.float32_(position, 8, 0);
  1487. $.kernel_type = reader.int8_(position, 10, 0);
  1488. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  1489. return $;
  1490. }
  1491. static decodeText(reader, json) {
  1492. const $ = new circle.LSTMOptions();
  1493. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1494. $.cell_clip = reader.value(json.cell_clip, 0);
  1495. $.proj_clip = reader.value(json.proj_clip, 0);
  1496. $.kernel_type = circle.LSTMKernelType[json.kernel_type];
  1497. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1498. return $;
  1499. }
  1500. };
  1501. circle.UnidirectionalSequenceLSTMOptions = class UnidirectionalSequenceLSTMOptions {
  1502. static decode(reader, position) {
  1503. const $ = new circle.UnidirectionalSequenceLSTMOptions();
  1504. $.fused_activation_function = reader.int8_(position, 4, 0);
  1505. $.cell_clip = reader.float32_(position, 6, 0);
  1506. $.proj_clip = reader.float32_(position, 8, 0);
  1507. $.time_major = reader.bool_(position, 10, false);
  1508. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  1509. $.diagonal_recurrent_tensors = reader.bool_(position, 14, false);
  1510. return $;
  1511. }
  1512. static decodeText(reader, json) {
  1513. const $ = new circle.UnidirectionalSequenceLSTMOptions();
  1514. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1515. $.cell_clip = reader.value(json.cell_clip, 0);
  1516. $.proj_clip = reader.value(json.proj_clip, 0);
  1517. $.time_major = reader.value(json.time_major, false);
  1518. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1519. $.diagonal_recurrent_tensors = reader.value(json.diagonal_recurrent_tensors, false);
  1520. return $;
  1521. }
  1522. };
  1523. circle.BidirectionalSequenceLSTMOptions = class BidirectionalSequenceLSTMOptions {
  1524. static decode(reader, position) {
  1525. const $ = new circle.BidirectionalSequenceLSTMOptions();
  1526. $.fused_activation_function = reader.int8_(position, 4, 0);
  1527. $.cell_clip = reader.float32_(position, 6, 0);
  1528. $.proj_clip = reader.float32_(position, 8, 0);
  1529. $.merge_outputs = reader.bool_(position, 10, false);
  1530. $.time_major = reader.bool_(position, 12, true);
  1531. $.asymmetric_quantize_inputs = reader.bool_(position, 14, false);
  1532. return $;
  1533. }
  1534. static decodeText(reader, json) {
  1535. const $ = new circle.BidirectionalSequenceLSTMOptions();
  1536. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1537. $.cell_clip = reader.value(json.cell_clip, 0);
  1538. $.proj_clip = reader.value(json.proj_clip, 0);
  1539. $.merge_outputs = reader.value(json.merge_outputs, false);
  1540. $.time_major = reader.value(json.time_major, true);
  1541. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1542. return $;
  1543. }
  1544. };
  1545. circle.ResizeBilinearOptions = class ResizeBilinearOptions {
  1546. static decode(reader, position) {
  1547. const $ = new circle.ResizeBilinearOptions();
  1548. $.new_height = reader.int32_(position, 4, 0);
  1549. $.new_width = reader.int32_(position, 6, 0);
  1550. $.align_corners = reader.bool_(position, 8, false);
  1551. $.half_pixel_centers = reader.bool_(position, 10, false);
  1552. return $;
  1553. }
  1554. static decodeText(reader, json) {
  1555. const $ = new circle.ResizeBilinearOptions();
  1556. $.new_height = reader.value(json.new_height, 0);
  1557. $.new_width = reader.value(json.new_width, 0);
  1558. $.align_corners = reader.value(json.align_corners, false);
  1559. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  1560. return $;
  1561. }
  1562. };
  1563. circle.ResizeNearestNeighborOptions = class ResizeNearestNeighborOptions {
  1564. static decode(reader, position) {
  1565. const $ = new circle.ResizeNearestNeighborOptions();
  1566. $.align_corners = reader.bool_(position, 4, false);
  1567. $.half_pixel_centers = reader.bool_(position, 6, false);
  1568. return $;
  1569. }
  1570. static decodeText(reader, json) {
  1571. const $ = new circle.ResizeNearestNeighborOptions();
  1572. $.align_corners = reader.value(json.align_corners, false);
  1573. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  1574. return $;
  1575. }
  1576. };
  1577. circle.CallOptions = class CallOptions {
  1578. static decode(reader, position) {
  1579. const $ = new circle.CallOptions();
  1580. $.subgraph = reader.uint32_(position, 4, 0);
  1581. return $;
  1582. }
  1583. static decodeText(reader, json) {
  1584. const $ = new circle.CallOptions();
  1585. $.subgraph = reader.value(json.subgraph, 0);
  1586. return $;
  1587. }
  1588. };
  1589. circle.PadOptions = class PadOptions {
  1590. static decode(/* reader, position */) {
  1591. const $ = new circle.PadOptions();
  1592. return $;
  1593. }
  1594. static decodeText(/* reader, json */) {
  1595. const $ = new circle.PadOptions();
  1596. return $;
  1597. }
  1598. };
  1599. circle.PadV2Options = class PadV2Options {
  1600. static decode(/* reader, position */) {
  1601. const $ = new circle.PadV2Options();
  1602. return $;
  1603. }
  1604. static decodeText(/* reader, json */) {
  1605. const $ = new circle.PadV2Options();
  1606. return $;
  1607. }
  1608. };
  1609. circle.ReshapeOptions = class ReshapeOptions {
  1610. static decode(reader, position) {
  1611. const $ = new circle.ReshapeOptions();
  1612. $.new_shape = reader.array(position, 4, Int32Array);
  1613. return $;
  1614. }
  1615. static decodeText(reader, json) {
  1616. const $ = new circle.ReshapeOptions();
  1617. $.new_shape = reader.array(json.new_shape, Int32Array);
  1618. return $;
  1619. }
  1620. };
  1621. circle.SpaceToBatchNDOptions = class SpaceToBatchNDOptions {
  1622. static decode(/* reader, position */) {
  1623. const $ = new circle.SpaceToBatchNDOptions();
  1624. return $;
  1625. }
  1626. static decodeText(/* reader, json */) {
  1627. const $ = new circle.SpaceToBatchNDOptions();
  1628. return $;
  1629. }
  1630. };
  1631. circle.BatchToSpaceNDOptions = class BatchToSpaceNDOptions {
  1632. static decode(/* reader, position */) {
  1633. const $ = new circle.BatchToSpaceNDOptions();
  1634. return $;
  1635. }
  1636. static decodeText(/* reader, json */) {
  1637. const $ = new circle.BatchToSpaceNDOptions();
  1638. return $;
  1639. }
  1640. };
  1641. circle.SkipGramOptions = class SkipGramOptions {
  1642. static decode(reader, position) {
  1643. const $ = new circle.SkipGramOptions();
  1644. $.ngram_size = reader.int32_(position, 4, 0);
  1645. $.max_skip_size = reader.int32_(position, 6, 0);
  1646. $.include_all_ngrams = reader.bool_(position, 8, false);
  1647. return $;
  1648. }
  1649. static decodeText(reader, json) {
  1650. const $ = new circle.SkipGramOptions();
  1651. $.ngram_size = reader.value(json.ngram_size, 0);
  1652. $.max_skip_size = reader.value(json.max_skip_size, 0);
  1653. $.include_all_ngrams = reader.value(json.include_all_ngrams, false);
  1654. return $;
  1655. }
  1656. };
  1657. circle.SpaceToDepthOptions = class SpaceToDepthOptions {
  1658. static decode(reader, position) {
  1659. const $ = new circle.SpaceToDepthOptions();
  1660. $.block_size = reader.int32_(position, 4, 0);
  1661. return $;
  1662. }
  1663. static decodeText(reader, json) {
  1664. const $ = new circle.SpaceToDepthOptions();
  1665. $.block_size = reader.value(json.block_size, 0);
  1666. return $;
  1667. }
  1668. };
  1669. circle.DepthToSpaceOptions = class DepthToSpaceOptions {
  1670. static decode(reader, position) {
  1671. const $ = new circle.DepthToSpaceOptions();
  1672. $.block_size = reader.int32_(position, 4, 0);
  1673. return $;
  1674. }
  1675. static decodeText(reader, json) {
  1676. const $ = new circle.DepthToSpaceOptions();
  1677. $.block_size = reader.value(json.block_size, 0);
  1678. return $;
  1679. }
  1680. };
  1681. circle.SubOptions = class SubOptions {
  1682. static decode(reader, position) {
  1683. const $ = new circle.SubOptions();
  1684. $.fused_activation_function = reader.int8_(position, 4, 0);
  1685. $.pot_scale_int16 = reader.bool_(position, 6, true);
  1686. return $;
  1687. }
  1688. static decodeText(reader, json) {
  1689. const $ = new circle.SubOptions();
  1690. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1691. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  1692. return $;
  1693. }
  1694. };
  1695. circle.DivOptions = class DivOptions {
  1696. static decode(reader, position) {
  1697. const $ = new circle.DivOptions();
  1698. $.fused_activation_function = reader.int8_(position, 4, 0);
  1699. return $;
  1700. }
  1701. static decodeText(reader, json) {
  1702. const $ = new circle.DivOptions();
  1703. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1704. return $;
  1705. }
  1706. };
  1707. circle.TopKV2Options = class TopKV2Options {
  1708. static decode(/* reader, position */) {
  1709. const $ = new circle.TopKV2Options();
  1710. return $;
  1711. }
  1712. static decodeText(/* reader, json */) {
  1713. const $ = new circle.TopKV2Options();
  1714. return $;
  1715. }
  1716. };
  1717. circle.CombinerType = {
  1718. SUM: 0, '0': 'SUM',
  1719. MEAN: 1, '1': 'MEAN',
  1720. SQRTN: 2, '2': 'SQRTN'
  1721. };
  1722. circle.EmbeddingLookupSparseOptions = class EmbeddingLookupSparseOptions {
  1723. static decode(reader, position) {
  1724. const $ = new circle.EmbeddingLookupSparseOptions();
  1725. $.combiner = reader.int8_(position, 4, 0);
  1726. return $;
  1727. }
  1728. static decodeText(reader, json) {
  1729. const $ = new circle.EmbeddingLookupSparseOptions();
  1730. $.combiner = circle.CombinerType[json.combiner];
  1731. return $;
  1732. }
  1733. };
  1734. circle.GatherOptions = class GatherOptions {
  1735. static decode(reader, position) {
  1736. const $ = new circle.GatherOptions();
  1737. $.axis = reader.int32_(position, 4, 0);
  1738. $.batch_dims = reader.int32_(position, 6, 0);
  1739. return $;
  1740. }
  1741. static decodeText(reader, json) {
  1742. const $ = new circle.GatherOptions();
  1743. $.axis = reader.value(json.axis, 0);
  1744. $.batch_dims = reader.value(json.batch_dims, 0);
  1745. return $;
  1746. }
  1747. };
  1748. circle.TransposeOptions = class TransposeOptions {
  1749. static decode(/* reader, position */) {
  1750. const $ = new circle.TransposeOptions();
  1751. return $;
  1752. }
  1753. static decodeText(/* reader, json */) {
  1754. const $ = new circle.TransposeOptions();
  1755. return $;
  1756. }
  1757. };
  1758. circle.ExpOptions = class ExpOptions {
  1759. static decode(/* reader, position */) {
  1760. const $ = new circle.ExpOptions();
  1761. return $;
  1762. }
  1763. static decodeText(/* reader, json */) {
  1764. const $ = new circle.ExpOptions();
  1765. return $;
  1766. }
  1767. };
  1768. circle.CosOptions = class CosOptions {
  1769. static decode(/* reader, position */) {
  1770. const $ = new circle.CosOptions();
  1771. return $;
  1772. }
  1773. static decodeText(/* reader, json */) {
  1774. const $ = new circle.CosOptions();
  1775. return $;
  1776. }
  1777. };
  1778. circle.ReducerOptions = class ReducerOptions {
  1779. static decode(reader, position) {
  1780. const $ = new circle.ReducerOptions();
  1781. $.keep_dims = reader.bool_(position, 4, false);
  1782. return $;
  1783. }
  1784. static decodeText(reader, json) {
  1785. const $ = new circle.ReducerOptions();
  1786. $.keep_dims = reader.value(json.keep_dims, false);
  1787. return $;
  1788. }
  1789. };
  1790. circle.SqueezeOptions = class SqueezeOptions {
  1791. static decode(reader, position) {
  1792. const $ = new circle.SqueezeOptions();
  1793. $.squeeze_dims = reader.array(position, 4, Int32Array);
  1794. return $;
  1795. }
  1796. static decodeText(reader, json) {
  1797. const $ = new circle.SqueezeOptions();
  1798. $.squeeze_dims = reader.array(json.squeeze_dims, Int32Array);
  1799. return $;
  1800. }
  1801. };
  1802. circle.SplitOptions = class SplitOptions {
  1803. static decode(reader, position) {
  1804. const $ = new circle.SplitOptions();
  1805. $.num_splits = reader.int32_(position, 4, 0);
  1806. return $;
  1807. }
  1808. static decodeText(reader, json) {
  1809. const $ = new circle.SplitOptions();
  1810. $.num_splits = reader.value(json.num_splits, 0);
  1811. return $;
  1812. }
  1813. };
  1814. circle.SplitVOptions = class SplitVOptions {
  1815. static decode(reader, position) {
  1816. const $ = new circle.SplitVOptions();
  1817. $.num_splits = reader.int32_(position, 4, 0);
  1818. return $;
  1819. }
  1820. static decodeText(reader, json) {
  1821. const $ = new circle.SplitVOptions();
  1822. $.num_splits = reader.value(json.num_splits, 0);
  1823. return $;
  1824. }
  1825. };
  1826. circle.StridedSliceOptions = class StridedSliceOptions {
  1827. static decode(reader, position) {
  1828. const $ = new circle.StridedSliceOptions();
  1829. $.begin_mask = reader.int32_(position, 4, 0);
  1830. $.end_mask = reader.int32_(position, 6, 0);
  1831. $.ellipsis_mask = reader.int32_(position, 8, 0);
  1832. $.new_axis_mask = reader.int32_(position, 10, 0);
  1833. $.shrink_axis_mask = reader.int32_(position, 12, 0);
  1834. $.offset = reader.bool_(position, 14, false);
  1835. return $;
  1836. }
  1837. static decodeText(reader, json) {
  1838. const $ = new circle.StridedSliceOptions();
  1839. $.begin_mask = reader.value(json.begin_mask, 0);
  1840. $.end_mask = reader.value(json.end_mask, 0);
  1841. $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
  1842. $.new_axis_mask = reader.value(json.new_axis_mask, 0);
  1843. $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
  1844. $.offset = reader.value(json.offset, false);
  1845. return $;
  1846. }
  1847. };
  1848. circle.LogSoftmaxOptions = class LogSoftmaxOptions {
  1849. static decode(/* reader, position */) {
  1850. const $ = new circle.LogSoftmaxOptions();
  1851. return $;
  1852. }
  1853. static decodeText(/* reader, json */) {
  1854. const $ = new circle.LogSoftmaxOptions();
  1855. return $;
  1856. }
  1857. };
  1858. circle.CastOptions = class CastOptions {
  1859. static decode(reader, position) {
  1860. const $ = new circle.CastOptions();
  1861. $.in_data_type = reader.int8_(position, 4, 0);
  1862. $.out_data_type = reader.int8_(position, 6, 0);
  1863. return $;
  1864. }
  1865. static decodeText(reader, json) {
  1866. const $ = new circle.CastOptions();
  1867. $.in_data_type = circle.TensorType[json.in_data_type];
  1868. $.out_data_type = circle.TensorType[json.out_data_type];
  1869. return $;
  1870. }
  1871. };
  1872. circle.DequantizeOptions = class DequantizeOptions {
  1873. static decode(/* reader, position */) {
  1874. const $ = new circle.DequantizeOptions();
  1875. return $;
  1876. }
  1877. static decodeText(/* reader, json */) {
  1878. const $ = new circle.DequantizeOptions();
  1879. return $;
  1880. }
  1881. };
  1882. circle.MaximumMinimumOptions = class MaximumMinimumOptions {
  1883. static decode(/* reader, position */) {
  1884. const $ = new circle.MaximumMinimumOptions();
  1885. return $;
  1886. }
  1887. static decodeText(/* reader, json */) {
  1888. const $ = new circle.MaximumMinimumOptions();
  1889. return $;
  1890. }
  1891. };
  1892. circle.TileOptions = class TileOptions {
  1893. static decode(/* reader, position */) {
  1894. const $ = new circle.TileOptions();
  1895. return $;
  1896. }
  1897. static decodeText(/* reader, json */) {
  1898. const $ = new circle.TileOptions();
  1899. return $;
  1900. }
  1901. };
  1902. circle.ArgMaxOptions = class ArgMaxOptions {
  1903. static decode(reader, position) {
  1904. const $ = new circle.ArgMaxOptions();
  1905. $.output_type = reader.int8_(position, 4, 0);
  1906. return $;
  1907. }
  1908. static decodeText(reader, json) {
  1909. const $ = new circle.ArgMaxOptions();
  1910. $.output_type = circle.TensorType[json.output_type];
  1911. return $;
  1912. }
  1913. };
  1914. circle.ArgMinOptions = class ArgMinOptions {
  1915. static decode(reader, position) {
  1916. const $ = new circle.ArgMinOptions();
  1917. $.output_type = reader.int8_(position, 4, 0);
  1918. return $;
  1919. }
  1920. static decodeText(reader, json) {
  1921. const $ = new circle.ArgMinOptions();
  1922. $.output_type = circle.TensorType[json.output_type];
  1923. return $;
  1924. }
  1925. };
  1926. circle.GreaterOptions = class GreaterOptions {
  1927. static decode(/* reader, position */) {
  1928. const $ = new circle.GreaterOptions();
  1929. return $;
  1930. }
  1931. static decodeText(/* reader, json */) {
  1932. const $ = new circle.GreaterOptions();
  1933. return $;
  1934. }
  1935. };
  1936. circle.GreaterEqualOptions = class GreaterEqualOptions {
  1937. static decode(/* reader, position */) {
  1938. const $ = new circle.GreaterEqualOptions();
  1939. return $;
  1940. }
  1941. static decodeText(/* reader, json */) {
  1942. const $ = new circle.GreaterEqualOptions();
  1943. return $;
  1944. }
  1945. };
  1946. circle.LessOptions = class LessOptions {
  1947. static decode(/* reader, position */) {
  1948. const $ = new circle.LessOptions();
  1949. return $;
  1950. }
  1951. static decodeText(/* reader, json */) {
  1952. const $ = new circle.LessOptions();
  1953. return $;
  1954. }
  1955. };
  1956. circle.LessEqualOptions = class LessEqualOptions {
  1957. static decode(/* reader, position */) {
  1958. const $ = new circle.LessEqualOptions();
  1959. return $;
  1960. }
  1961. static decodeText(/* reader, json */) {
  1962. const $ = new circle.LessEqualOptions();
  1963. return $;
  1964. }
  1965. };
  1966. circle.NegOptions = class NegOptions {
  1967. static decode(/* reader, position */) {
  1968. const $ = new circle.NegOptions();
  1969. return $;
  1970. }
  1971. static decodeText(/* reader, json */) {
  1972. const $ = new circle.NegOptions();
  1973. return $;
  1974. }
  1975. };
  1976. circle.SelectOptions = class SelectOptions {
  1977. static decode(/* reader, position */) {
  1978. const $ = new circle.SelectOptions();
  1979. return $;
  1980. }
  1981. static decodeText(/* reader, json */) {
  1982. const $ = new circle.SelectOptions();
  1983. return $;
  1984. }
  1985. };
  1986. circle.SliceOptions = class SliceOptions {
  1987. static decode(/* reader, position */) {
  1988. const $ = new circle.SliceOptions();
  1989. return $;
  1990. }
  1991. static decodeText(/* reader, json */) {
  1992. const $ = new circle.SliceOptions();
  1993. return $;
  1994. }
  1995. };
  1996. circle.TransposeConvOptions = class TransposeConvOptions {
  1997. static decode(reader, position) {
  1998. const $ = new circle.TransposeConvOptions();
  1999. $.padding = reader.int8_(position, 4, 0);
  2000. $.stride_w = reader.int32_(position, 6, 0);
  2001. $.stride_h = reader.int32_(position, 8, 0);
  2002. $.fused_activation_function = reader.int8_(position, 10, 0);
  2003. $.quantized_bias_type = reader.int8_(position, 12, 0);
  2004. return $;
  2005. }
  2006. static decodeText(reader, json) {
  2007. const $ = new circle.TransposeConvOptions();
  2008. $.padding = circle.Padding[json.padding];
  2009. $.stride_w = reader.value(json.stride_w, 0);
  2010. $.stride_h = reader.value(json.stride_h, 0);
  2011. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2012. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  2013. return $;
  2014. }
  2015. };
  2016. circle.ExpandDimsOptions = class ExpandDimsOptions {
  2017. static decode(/* reader, position */) {
  2018. const $ = new circle.ExpandDimsOptions();
  2019. return $;
  2020. }
  2021. static decodeText(/* reader, json */) {
  2022. const $ = new circle.ExpandDimsOptions();
  2023. return $;
  2024. }
  2025. };
  2026. circle.SparseToDenseOptions = class SparseToDenseOptions {
  2027. static decode(reader, position) {
  2028. const $ = new circle.SparseToDenseOptions();
  2029. $.validate_indices = reader.bool_(position, 4, false);
  2030. return $;
  2031. }
  2032. static decodeText(reader, json) {
  2033. const $ = new circle.SparseToDenseOptions();
  2034. $.validate_indices = reader.value(json.validate_indices, false);
  2035. return $;
  2036. }
  2037. };
  2038. circle.EqualOptions = class EqualOptions {
  2039. static decode(/* reader, position */) {
  2040. const $ = new circle.EqualOptions();
  2041. return $;
  2042. }
  2043. static decodeText(/* reader, json */) {
  2044. const $ = new circle.EqualOptions();
  2045. return $;
  2046. }
  2047. };
  2048. circle.NotEqualOptions = class NotEqualOptions {
  2049. static decode(/* reader, position */) {
  2050. const $ = new circle.NotEqualOptions();
  2051. return $;
  2052. }
  2053. static decodeText(/* reader, json */) {
  2054. const $ = new circle.NotEqualOptions();
  2055. return $;
  2056. }
  2057. };
  2058. circle.ShapeOptions = class ShapeOptions {
  2059. static decode(reader, position) {
  2060. const $ = new circle.ShapeOptions();
  2061. $.out_type = reader.int8_(position, 4, 0);
  2062. return $;
  2063. }
  2064. static decodeText(reader, json) {
  2065. const $ = new circle.ShapeOptions();
  2066. $.out_type = circle.TensorType[json.out_type];
  2067. return $;
  2068. }
  2069. };
  2070. circle.RankOptions = class RankOptions {
  2071. static decode(/* reader, position */) {
  2072. const $ = new circle.RankOptions();
  2073. return $;
  2074. }
  2075. static decodeText(/* reader, json */) {
  2076. const $ = new circle.RankOptions();
  2077. return $;
  2078. }
  2079. };
  2080. circle.PowOptions = class PowOptions {
  2081. static decode(/* reader, position */) {
  2082. const $ = new circle.PowOptions();
  2083. return $;
  2084. }
  2085. static decodeText(/* reader, json */) {
  2086. const $ = new circle.PowOptions();
  2087. return $;
  2088. }
  2089. };
  2090. circle.FakeQuantOptions = class FakeQuantOptions {
  2091. static decode(reader, position) {
  2092. const $ = new circle.FakeQuantOptions();
  2093. $.min = reader.float32_(position, 4, 0);
  2094. $.max = reader.float32_(position, 6, 0);
  2095. $.num_bits = reader.int32_(position, 8, 0);
  2096. $.narrow_range = reader.bool_(position, 10, false);
  2097. return $;
  2098. }
  2099. static decodeText(reader, json) {
  2100. const $ = new circle.FakeQuantOptions();
  2101. $.min = reader.value(json.min, 0);
  2102. $.max = reader.value(json.max, 0);
  2103. $.num_bits = reader.value(json.num_bits, 0);
  2104. $.narrow_range = reader.value(json.narrow_range, false);
  2105. return $;
  2106. }
  2107. };
  2108. circle.PackOptions = class PackOptions {
  2109. static decode(reader, position) {
  2110. const $ = new circle.PackOptions();
  2111. $.values_count = reader.int32_(position, 4, 0);
  2112. $.axis = reader.int32_(position, 6, 0);
  2113. return $;
  2114. }
  2115. static decodeText(reader, json) {
  2116. const $ = new circle.PackOptions();
  2117. $.values_count = reader.value(json.values_count, 0);
  2118. $.axis = reader.value(json.axis, 0);
  2119. return $;
  2120. }
  2121. };
  2122. circle.LogicalOrOptions = class LogicalOrOptions {
  2123. static decode(/* reader, position */) {
  2124. const $ = new circle.LogicalOrOptions();
  2125. return $;
  2126. }
  2127. static decodeText(/* reader, json */) {
  2128. const $ = new circle.LogicalOrOptions();
  2129. return $;
  2130. }
  2131. };
  2132. circle.OneHotOptions = class OneHotOptions {
  2133. static decode(reader, position) {
  2134. const $ = new circle.OneHotOptions();
  2135. $.axis = reader.int32_(position, 4, 0);
  2136. return $;
  2137. }
  2138. static decodeText(reader, json) {
  2139. const $ = new circle.OneHotOptions();
  2140. $.axis = reader.value(json.axis, 0);
  2141. return $;
  2142. }
  2143. };
  2144. circle.AbsOptions = class AbsOptions {
  2145. static decode(/* reader, position */) {
  2146. const $ = new circle.AbsOptions();
  2147. return $;
  2148. }
  2149. static decodeText(/* reader, json */) {
  2150. const $ = new circle.AbsOptions();
  2151. return $;
  2152. }
  2153. };
  2154. circle.HardSwishOptions = class HardSwishOptions {
  2155. static decode(/* reader, position */) {
  2156. const $ = new circle.HardSwishOptions();
  2157. return $;
  2158. }
  2159. static decodeText(/* reader, json */) {
  2160. const $ = new circle.HardSwishOptions();
  2161. return $;
  2162. }
  2163. };
  2164. circle.LogicalAndOptions = class LogicalAndOptions {
  2165. static decode(/* reader, position */) {
  2166. const $ = new circle.LogicalAndOptions();
  2167. return $;
  2168. }
  2169. static decodeText(/* reader, json */) {
  2170. const $ = new circle.LogicalAndOptions();
  2171. return $;
  2172. }
  2173. };
  2174. circle.LogicalNotOptions = class LogicalNotOptions {
  2175. static decode(/* reader, position */) {
  2176. const $ = new circle.LogicalNotOptions();
  2177. return $;
  2178. }
  2179. static decodeText(/* reader, json */) {
  2180. const $ = new circle.LogicalNotOptions();
  2181. return $;
  2182. }
  2183. };
  2184. circle.UnpackOptions = class UnpackOptions {
  2185. static decode(reader, position) {
  2186. const $ = new circle.UnpackOptions();
  2187. $.num = reader.int32_(position, 4, 0);
  2188. $.axis = reader.int32_(position, 6, 0);
  2189. return $;
  2190. }
  2191. static decodeText(reader, json) {
  2192. const $ = new circle.UnpackOptions();
  2193. $.num = reader.value(json.num, 0);
  2194. $.axis = reader.value(json.axis, 0);
  2195. return $;
  2196. }
  2197. };
  2198. circle.FloorDivOptions = class FloorDivOptions {
  2199. static decode(/* reader, position */) {
  2200. const $ = new circle.FloorDivOptions();
  2201. return $;
  2202. }
  2203. static decodeText(/* reader, json */) {
  2204. const $ = new circle.FloorDivOptions();
  2205. return $;
  2206. }
  2207. };
  2208. circle.SquareOptions = class SquareOptions {
  2209. static decode(/* reader, position */) {
  2210. const $ = new circle.SquareOptions();
  2211. return $;
  2212. }
  2213. static decodeText(/* reader, json */) {
  2214. const $ = new circle.SquareOptions();
  2215. return $;
  2216. }
  2217. };
  2218. circle.ZerosLikeOptions = class ZerosLikeOptions {
  2219. static decode(/* reader, position */) {
  2220. const $ = new circle.ZerosLikeOptions();
  2221. return $;
  2222. }
  2223. static decodeText(/* reader, json */) {
  2224. const $ = new circle.ZerosLikeOptions();
  2225. return $;
  2226. }
  2227. };
  2228. circle.FillOptions = class FillOptions {
  2229. static decode(/* reader, position */) {
  2230. const $ = new circle.FillOptions();
  2231. return $;
  2232. }
  2233. static decodeText(/* reader, json */) {
  2234. const $ = new circle.FillOptions();
  2235. return $;
  2236. }
  2237. };
  2238. circle.FloorModOptions = class FloorModOptions {
  2239. static decode(/* reader, position */) {
  2240. const $ = new circle.FloorModOptions();
  2241. return $;
  2242. }
  2243. static decodeText(/* reader, json */) {
  2244. const $ = new circle.FloorModOptions();
  2245. return $;
  2246. }
  2247. };
  2248. circle.RangeOptions = class RangeOptions {
  2249. static decode(/* reader, position */) {
  2250. const $ = new circle.RangeOptions();
  2251. return $;
  2252. }
  2253. static decodeText(/* reader, json */) {
  2254. const $ = new circle.RangeOptions();
  2255. return $;
  2256. }
  2257. };
  2258. circle.LeakyReluOptions = class LeakyReluOptions {
  2259. static decode(reader, position) {
  2260. const $ = new circle.LeakyReluOptions();
  2261. $.alpha = reader.float32_(position, 4, 0);
  2262. return $;
  2263. }
  2264. static decodeText(reader, json) {
  2265. const $ = new circle.LeakyReluOptions();
  2266. $.alpha = reader.value(json.alpha, 0);
  2267. return $;
  2268. }
  2269. };
  2270. circle.SquaredDifferenceOptions = class SquaredDifferenceOptions {
  2271. static decode(/* reader, position */) {
  2272. const $ = new circle.SquaredDifferenceOptions();
  2273. return $;
  2274. }
  2275. static decodeText(/* reader, json */) {
  2276. const $ = new circle.SquaredDifferenceOptions();
  2277. return $;
  2278. }
  2279. };
  2280. circle.MirrorPadMode = {
  2281. REFLECT: 0, '0': 'REFLECT',
  2282. SYMMETRIC: 1, '1': 'SYMMETRIC'
  2283. };
  2284. circle.MirrorPadOptions = class MirrorPadOptions {
  2285. static decode(reader, position) {
  2286. const $ = new circle.MirrorPadOptions();
  2287. $.mode = reader.int8_(position, 4, 0);
  2288. return $;
  2289. }
  2290. static decodeText(reader, json) {
  2291. const $ = new circle.MirrorPadOptions();
  2292. $.mode = circle.MirrorPadMode[json.mode];
  2293. return $;
  2294. }
  2295. };
  2296. circle.UniqueOptions = class UniqueOptions {
  2297. static decode(reader, position) {
  2298. const $ = new circle.UniqueOptions();
  2299. $.idx_out_type = reader.int8_(position, 4, 2);
  2300. return $;
  2301. }
  2302. static decodeText(reader, json) {
  2303. const $ = new circle.UniqueOptions();
  2304. $.idx_out_type = circle.TensorType[json.idx_out_type];
  2305. return $;
  2306. }
  2307. };
  2308. circle.ReverseV2Options = class ReverseV2Options {
  2309. static decode(/* reader, position */) {
  2310. const $ = new circle.ReverseV2Options();
  2311. return $;
  2312. }
  2313. static decodeText(/* reader, json */) {
  2314. const $ = new circle.ReverseV2Options();
  2315. return $;
  2316. }
  2317. };
  2318. circle.AddNOptions = class AddNOptions {
  2319. static decode(/* reader, position */) {
  2320. const $ = new circle.AddNOptions();
  2321. return $;
  2322. }
  2323. static decodeText(/* reader, json */) {
  2324. const $ = new circle.AddNOptions();
  2325. return $;
  2326. }
  2327. };
  2328. circle.GatherNdOptions = class GatherNdOptions {
  2329. static decode(/* reader, position */) {
  2330. const $ = new circle.GatherNdOptions();
  2331. return $;
  2332. }
  2333. static decodeText(/* reader, json */) {
  2334. const $ = new circle.GatherNdOptions();
  2335. return $;
  2336. }
  2337. };
  2338. circle.WhereOptions = class WhereOptions {
  2339. static decode(/* reader, position */) {
  2340. const $ = new circle.WhereOptions();
  2341. return $;
  2342. }
  2343. static decodeText(/* reader, json */) {
  2344. const $ = new circle.WhereOptions();
  2345. return $;
  2346. }
  2347. };
  2348. circle.ReverseSequenceOptions = class ReverseSequenceOptions {
  2349. static decode(reader, position) {
  2350. const $ = new circle.ReverseSequenceOptions();
  2351. $.seq_dim = reader.int32_(position, 4, 0);
  2352. $.batch_dim = reader.int32_(position, 6, 0);
  2353. return $;
  2354. }
  2355. static decodeText(reader, json) {
  2356. const $ = new circle.ReverseSequenceOptions();
  2357. $.seq_dim = reader.value(json.seq_dim, 0);
  2358. $.batch_dim = reader.value(json.batch_dim, 0);
  2359. return $;
  2360. }
  2361. };
  2362. circle.MatrixDiagOptions = class MatrixDiagOptions {
  2363. static decode(/* reader, position */) {
  2364. const $ = new circle.MatrixDiagOptions();
  2365. return $;
  2366. }
  2367. static decodeText(/* reader, json */) {
  2368. const $ = new circle.MatrixDiagOptions();
  2369. return $;
  2370. }
  2371. };
  2372. circle.QuantizeOptions = class QuantizeOptions {
  2373. static decode(/* reader, position */) {
  2374. const $ = new circle.QuantizeOptions();
  2375. return $;
  2376. }
  2377. static decodeText(/* reader, json */) {
  2378. const $ = new circle.QuantizeOptions();
  2379. return $;
  2380. }
  2381. };
  2382. circle.MatrixSetDiagOptions = class MatrixSetDiagOptions {
  2383. static decode(/* reader, position */) {
  2384. const $ = new circle.MatrixSetDiagOptions();
  2385. return $;
  2386. }
  2387. static decodeText(/* reader, json */) {
  2388. const $ = new circle.MatrixSetDiagOptions();
  2389. return $;
  2390. }
  2391. };
  2392. circle.IfOptions = class IfOptions {
  2393. static decode(reader, position) {
  2394. const $ = new circle.IfOptions();
  2395. $.then_subgraph_index = reader.int32_(position, 4, 0);
  2396. $.else_subgraph_index = reader.int32_(position, 6, 0);
  2397. return $;
  2398. }
  2399. static decodeText(reader, json) {
  2400. const $ = new circle.IfOptions();
  2401. $.then_subgraph_index = reader.value(json.then_subgraph_index, 0);
  2402. $.else_subgraph_index = reader.value(json.else_subgraph_index, 0);
  2403. return $;
  2404. }
  2405. };
  2406. circle.CallOnceOptions = class CallOnceOptions {
  2407. static decode(reader, position) {
  2408. const $ = new circle.CallOnceOptions();
  2409. $.init_subgraph_index = reader.int32_(position, 4, 0);
  2410. return $;
  2411. }
  2412. static decodeText(reader, json) {
  2413. const $ = new circle.CallOnceOptions();
  2414. $.init_subgraph_index = reader.value(json.init_subgraph_index, 0);
  2415. return $;
  2416. }
  2417. };
  2418. circle.WhileOptions = class WhileOptions {
  2419. static decode(reader, position) {
  2420. const $ = new circle.WhileOptions();
  2421. $.cond_subgraph_index = reader.int32_(position, 4, 0);
  2422. $.body_subgraph_index = reader.int32_(position, 6, 0);
  2423. return $;
  2424. }
  2425. static decodeText(reader, json) {
  2426. const $ = new circle.WhileOptions();
  2427. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  2428. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  2429. return $;
  2430. }
  2431. };
  2432. circle.NonMaxSuppressionV4Options = class NonMaxSuppressionV4Options {
  2433. static decode(/* reader, position */) {
  2434. const $ = new circle.NonMaxSuppressionV4Options();
  2435. return $;
  2436. }
  2437. static decodeText(/* reader, json */) {
  2438. const $ = new circle.NonMaxSuppressionV4Options();
  2439. return $;
  2440. }
  2441. };
  2442. circle.NonMaxSuppressionV5Options = class NonMaxSuppressionV5Options {
  2443. static decode(/* reader, position */) {
  2444. const $ = new circle.NonMaxSuppressionV5Options();
  2445. return $;
  2446. }
  2447. static decodeText(/* reader, json */) {
  2448. const $ = new circle.NonMaxSuppressionV5Options();
  2449. return $;
  2450. }
  2451. };
  2452. circle.ScatterNdOptions = class ScatterNdOptions {
  2453. static decode(/* reader, position */) {
  2454. const $ = new circle.ScatterNdOptions();
  2455. return $;
  2456. }
  2457. static decodeText(/* reader, json */) {
  2458. const $ = new circle.ScatterNdOptions();
  2459. return $;
  2460. }
  2461. };
  2462. circle.SelectV2Options = class SelectV2Options {
  2463. static decode(/* reader, position */) {
  2464. const $ = new circle.SelectV2Options();
  2465. return $;
  2466. }
  2467. static decodeText(/* reader, json */) {
  2468. const $ = new circle.SelectV2Options();
  2469. return $;
  2470. }
  2471. };
  2472. circle.DensifyOptions = class DensifyOptions {
  2473. static decode(/* reader, position */) {
  2474. const $ = new circle.DensifyOptions();
  2475. return $;
  2476. }
  2477. static decodeText(/* reader, json */) {
  2478. const $ = new circle.DensifyOptions();
  2479. return $;
  2480. }
  2481. };
  2482. circle.SegmentSumOptions = class SegmentSumOptions {
  2483. static decode(/* reader, position */) {
  2484. const $ = new circle.SegmentSumOptions();
  2485. return $;
  2486. }
  2487. static decodeText(/* reader, json */) {
  2488. const $ = new circle.SegmentSumOptions();
  2489. return $;
  2490. }
  2491. };
  2492. circle.BatchMatMulOptions = class BatchMatMulOptions {
  2493. static decode(reader, position) {
  2494. const $ = new circle.BatchMatMulOptions();
  2495. $.adjoint_lhs = reader.bool_(position, 4, false);
  2496. $.adjoint_rhs = reader.bool_(position, 6, false);
  2497. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  2498. return $;
  2499. }
  2500. static decodeText(reader, json) {
  2501. const $ = new circle.BatchMatMulOptions();
  2502. $.adjoint_lhs = reader.value(json.adjoint_lhs, false);
  2503. $.adjoint_rhs = reader.value(json.adjoint_rhs, false);
  2504. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  2505. return $;
  2506. }
  2507. };
  2508. circle.CumsumOptions = class CumsumOptions {
  2509. static decode(reader, position) {
  2510. const $ = new circle.CumsumOptions();
  2511. $.exclusive = reader.bool_(position, 4, false);
  2512. $.reverse = reader.bool_(position, 6, false);
  2513. return $;
  2514. }
  2515. static decodeText(reader, json) {
  2516. const $ = new circle.CumsumOptions();
  2517. $.exclusive = reader.value(json.exclusive, false);
  2518. $.reverse = reader.value(json.reverse, false);
  2519. return $;
  2520. }
  2521. };
  2522. circle.BroadcastToOptions = class BroadcastToOptions {
  2523. static decode(/* reader, position */) {
  2524. const $ = new circle.BroadcastToOptions();
  2525. return $;
  2526. }
  2527. static decodeText(/* reader, json */) {
  2528. const $ = new circle.BroadcastToOptions();
  2529. return $;
  2530. }
  2531. };
  2532. circle.Rfft2dOptions = class Rfft2dOptions {
  2533. static decode(/* reader, position */) {
  2534. const $ = new circle.Rfft2dOptions();
  2535. return $;
  2536. }
  2537. static decodeText(/* reader, json */) {
  2538. const $ = new circle.Rfft2dOptions();
  2539. return $;
  2540. }
  2541. };
  2542. circle.HashtableOptions = class HashtableOptions {
  2543. static decode(reader, position) {
  2544. const $ = new circle.HashtableOptions();
  2545. $.table_id = reader.int32_(position, 4, 0);
  2546. $.key_dtype = reader.int8_(position, 6, 0);
  2547. $.value_dtype = reader.int8_(position, 8, 0);
  2548. return $;
  2549. }
  2550. static decodeText(reader, json) {
  2551. const $ = new circle.HashtableOptions();
  2552. $.table_id = reader.value(json.table_id, 0);
  2553. $.key_dtype = circle.TensorType[json.key_dtype];
  2554. $.value_dtype = circle.TensorType[json.value_dtype];
  2555. return $;
  2556. }
  2557. };
  2558. circle.HashtableFindOptions = class HashtableFindOptions {
  2559. static decode(/* reader, position */) {
  2560. const $ = new circle.HashtableFindOptions();
  2561. return $;
  2562. }
  2563. static decodeText(/* reader, json */) {
  2564. const $ = new circle.HashtableFindOptions();
  2565. return $;
  2566. }
  2567. };
  2568. circle.HashtableImportOptions = class HashtableImportOptions {
  2569. static decode(/* reader, position */) {
  2570. const $ = new circle.HashtableImportOptions();
  2571. return $;
  2572. }
  2573. static decodeText(/* reader, json */) {
  2574. const $ = new circle.HashtableImportOptions();
  2575. return $;
  2576. }
  2577. };
  2578. circle.HashtableSizeOptions = class HashtableSizeOptions {
  2579. static decode(/* reader, position */) {
  2580. const $ = new circle.HashtableSizeOptions();
  2581. return $;
  2582. }
  2583. static decodeText(/* reader, json */) {
  2584. const $ = new circle.HashtableSizeOptions();
  2585. return $;
  2586. }
  2587. };
  2588. circle.VarHandleOptions = class VarHandleOptions {
  2589. static decode(reader, position) {
  2590. const $ = new circle.VarHandleOptions();
  2591. $.container = reader.string_(position, 4, null);
  2592. $.shared_name = reader.string_(position, 6, null);
  2593. return $;
  2594. }
  2595. static decodeText(reader, json) {
  2596. const $ = new circle.VarHandleOptions();
  2597. $.container = reader.value(json.container, null);
  2598. $.shared_name = reader.value(json.shared_name, null);
  2599. return $;
  2600. }
  2601. };
  2602. circle.ReadVariableOptions = class ReadVariableOptions {
  2603. static decode(/* reader, position */) {
  2604. const $ = new circle.ReadVariableOptions();
  2605. return $;
  2606. }
  2607. static decodeText(/* reader, json */) {
  2608. const $ = new circle.ReadVariableOptions();
  2609. return $;
  2610. }
  2611. };
  2612. circle.AssignVariableOptions = class AssignVariableOptions {
  2613. static decode(/* reader, position */) {
  2614. const $ = new circle.AssignVariableOptions();
  2615. return $;
  2616. }
  2617. static decodeText(/* reader, json */) {
  2618. const $ = new circle.AssignVariableOptions();
  2619. return $;
  2620. }
  2621. };
  2622. circle.RandomOptions = class RandomOptions {
  2623. static decode(reader, position) {
  2624. const $ = new circle.RandomOptions();
  2625. $.seed = reader.int64_(position, 4, 0n);
  2626. $.seed2 = reader.int64_(position, 6, 0n);
  2627. return $;
  2628. }
  2629. static decodeText(reader, json) {
  2630. const $ = new circle.RandomOptions();
  2631. $.seed = reader.int64(json.seed, 0n);
  2632. $.seed2 = reader.int64(json.seed2, 0n);
  2633. return $;
  2634. }
  2635. };
  2636. circle.BucketizeOptions = class BucketizeOptions {
  2637. static decode(reader, position) {
  2638. const $ = new circle.BucketizeOptions();
  2639. $.boundaries = reader.array(position, 4, Float32Array);
  2640. return $;
  2641. }
  2642. static decodeText(reader, json) {
  2643. const $ = new circle.BucketizeOptions();
  2644. $.boundaries = reader.array(json.boundaries, Float32Array);
  2645. return $;
  2646. }
  2647. };
  2648. circle.GeluOptions = class GeluOptions {
  2649. static decode(reader, position) {
  2650. const $ = new circle.GeluOptions();
  2651. $.approximate = reader.bool_(position, 4, false);
  2652. return $;
  2653. }
  2654. static decodeText(reader, json) {
  2655. const $ = new circle.GeluOptions();
  2656. $.approximate = reader.value(json.approximate, false);
  2657. return $;
  2658. }
  2659. };
  2660. circle.DynamicUpdateSliceOptions = class DynamicUpdateSliceOptions {
  2661. static decode(/* reader, position */) {
  2662. const $ = new circle.DynamicUpdateSliceOptions();
  2663. return $;
  2664. }
  2665. static decodeText(/* reader, json */) {
  2666. const $ = new circle.DynamicUpdateSliceOptions();
  2667. return $;
  2668. }
  2669. };
  2670. circle.UnsortedSegmentProdOptions = class UnsortedSegmentProdOptions {
  2671. static decode(/* reader, position */) {
  2672. const $ = new circle.UnsortedSegmentProdOptions();
  2673. return $;
  2674. }
  2675. static decodeText(/* reader, json */) {
  2676. const $ = new circle.UnsortedSegmentProdOptions();
  2677. return $;
  2678. }
  2679. };
  2680. circle.UnsortedSegmentMaxOptions = class UnsortedSegmentMaxOptions {
  2681. static decode(/* reader, position */) {
  2682. const $ = new circle.UnsortedSegmentMaxOptions();
  2683. return $;
  2684. }
  2685. static decodeText(/* reader, json */) {
  2686. const $ = new circle.UnsortedSegmentMaxOptions();
  2687. return $;
  2688. }
  2689. };
  2690. circle.UnsortedSegmentSumOptions = class UnsortedSegmentSumOptions {
  2691. static decode(/* reader, position */) {
  2692. const $ = new circle.UnsortedSegmentSumOptions();
  2693. return $;
  2694. }
  2695. static decodeText(/* reader, json */) {
  2696. const $ = new circle.UnsortedSegmentSumOptions();
  2697. return $;
  2698. }
  2699. };
  2700. circle.ATan2Options = class ATan2Options {
  2701. static decode(/* reader, position */) {
  2702. const $ = new circle.ATan2Options();
  2703. return $;
  2704. }
  2705. static decodeText(/* reader, json */) {
  2706. const $ = new circle.ATan2Options();
  2707. return $;
  2708. }
  2709. };
  2710. circle.UnsortedSegmentMinOptions = class UnsortedSegmentMinOptions {
  2711. static decode(/* reader, position */) {
  2712. const $ = new circle.UnsortedSegmentMinOptions();
  2713. return $;
  2714. }
  2715. static decodeText(/* reader, json */) {
  2716. const $ = new circle.UnsortedSegmentMinOptions();
  2717. return $;
  2718. }
  2719. };
  2720. circle.SignOptions = class SignOptions {
  2721. static decode(/* reader, position */) {
  2722. const $ = new circle.SignOptions();
  2723. return $;
  2724. }
  2725. static decodeText(/* reader, json */) {
  2726. const $ = new circle.SignOptions();
  2727. return $;
  2728. }
  2729. };
  2730. circle.BitcastOptions = class BitcastOptions {
  2731. static decode(/* reader, position */) {
  2732. const $ = new circle.BitcastOptions();
  2733. return $;
  2734. }
  2735. static decodeText(/* reader, json */) {
  2736. const $ = new circle.BitcastOptions();
  2737. return $;
  2738. }
  2739. };
  2740. circle.BitwiseXorOptions = class BitwiseXorOptions {
  2741. static decode(/* reader, position */) {
  2742. const $ = new circle.BitwiseXorOptions();
  2743. return $;
  2744. }
  2745. static decodeText(/* reader, json */) {
  2746. const $ = new circle.BitwiseXorOptions();
  2747. return $;
  2748. }
  2749. };
  2750. circle.RightShiftOptions = class RightShiftOptions {
  2751. static decode(/* reader, position */) {
  2752. const $ = new circle.RightShiftOptions();
  2753. return $;
  2754. }
  2755. static decodeText(/* reader, json */) {
  2756. const $ = new circle.RightShiftOptions();
  2757. return $;
  2758. }
  2759. };
  2760. circle.DilateOptions = class DilateOptions {
  2761. static decode(/* reader, position */) {
  2762. const $ = new circle.DilateOptions();
  2763. return $;
  2764. }
  2765. static decodeText(/* reader, json */) {
  2766. const $ = new circle.DilateOptions();
  2767. return $;
  2768. }
  2769. };
  2770. circle.ReduceWindowFunction = {
  2771. UNSUPPORTED: 0, '0': 'UNSUPPORTED',
  2772. ADD: 1, '1': 'ADD',
  2773. MUL: 2, '2': 'MUL',
  2774. MINIMUM: 3, '3': 'MINIMUM',
  2775. MAXIMUM: 4, '4': 'MAXIMUM',
  2776. ALL: 5, '5': 'ALL',
  2777. ANY: 6, '6': 'ANY'
  2778. };
  2779. circle.ReduceWindowOptions = class ReduceWindowOptions {
  2780. static decode(reader, position) {
  2781. const $ = new circle.ReduceWindowOptions();
  2782. $.reduce_function = reader.int32_(position, 4, 0);
  2783. return $;
  2784. }
  2785. static decodeText(reader, json) {
  2786. const $ = new circle.ReduceWindowOptions();
  2787. $.reduce_function = circle.ReduceWindowFunction[json.reduce_function];
  2788. return $;
  2789. }
  2790. };
  2791. circle.GRUOptions = class GRUOptions {
  2792. static decode(reader, position) {
  2793. const $ = new circle.GRUOptions();
  2794. $.fused_activation_function = reader.int8_(position, 4, 0);
  2795. $.return_sequences = reader.bool_(position, 6, false);
  2796. $.time_major = reader.bool_(position, 8, false);
  2797. return $;
  2798. }
  2799. static decodeText(reader, json) {
  2800. const $ = new circle.GRUOptions();
  2801. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2802. $.return_sequences = reader.value(json.return_sequences, false);
  2803. $.time_major = reader.value(json.time_major, false);
  2804. return $;
  2805. }
  2806. };
  2807. circle.BCQGatherOptions = class BCQGatherOptions {
  2808. static decode(reader, position) {
  2809. const $ = new circle.BCQGatherOptions();
  2810. $.input_hidden_size = reader.int32_(position, 4, 0);
  2811. $.axis = reader.int32_(position, 6, 0);
  2812. return $;
  2813. }
  2814. static decodeText(reader, json) {
  2815. const $ = new circle.BCQGatherOptions();
  2816. $.input_hidden_size = reader.value(json.input_hidden_size, 0);
  2817. $.axis = reader.value(json.axis, 0);
  2818. return $;
  2819. }
  2820. };
  2821. circle.BCQFullyConnectedOptions = class BCQFullyConnectedOptions {
  2822. static decode(reader, position) {
  2823. const $ = new circle.BCQFullyConnectedOptions();
  2824. $.weights_hidden_size = reader.int32_(position, 4, 0);
  2825. $.fused_activation_function = reader.int8_(position, 6, 0);
  2826. return $;
  2827. }
  2828. static decodeText(reader, json) {
  2829. const $ = new circle.BCQFullyConnectedOptions();
  2830. $.weights_hidden_size = reader.value(json.weights_hidden_size, 0);
  2831. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2832. return $;
  2833. }
  2834. };
  2835. circle.InstanceNormOptions = class InstanceNormOptions {
  2836. static decode(reader, position) {
  2837. const $ = new circle.InstanceNormOptions();
  2838. $.epsilon = reader.float32_(position, 4, 0);
  2839. $.fused_activation_function = reader.int8_(position, 6, 0);
  2840. return $;
  2841. }
  2842. static decodeText(reader, json) {
  2843. const $ = new circle.InstanceNormOptions();
  2844. $.epsilon = reader.value(json.epsilon, 0);
  2845. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2846. return $;
  2847. }
  2848. };
  2849. circle.RmsNormOptions = class RmsNormOptions {
  2850. static decode(reader, position) {
  2851. const $ = new circle.RmsNormOptions();
  2852. $.epsilon = reader.float32_(position, 4, 0);
  2853. return $;
  2854. }
  2855. static decodeText(reader, json) {
  2856. const $ = new circle.RmsNormOptions();
  2857. $.epsilon = reader.value(json.epsilon, 0);
  2858. return $;
  2859. }
  2860. };
  2861. circle.RoPEMode = {
  2862. GPT_NEOX: 0, '0': 'GPT_NEOX',
  2863. GPT_J: 1, '1': 'GPT_J'
  2864. };
  2865. circle.RoPEOptions = class RoPEOptions {
  2866. static decode(reader, position) {
  2867. const $ = new circle.RoPEOptions();
  2868. $.mode = reader.int32_(position, 4, 0);
  2869. return $;
  2870. }
  2871. static decodeText(reader, json) {
  2872. const $ = new circle.RoPEOptions();
  2873. $.mode = circle.RoPEMode[json.mode];
  2874. return $;
  2875. }
  2876. };
  2877. circle.RunModelOptions = class RunModelOptions {
  2878. static decode(reader, position) {
  2879. const $ = new circle.RunModelOptions();
  2880. $.location = reader.string_(position, 4, null);
  2881. $.signature = reader.string_(position, 6, null);
  2882. return $;
  2883. }
  2884. static decodeText(reader, json) {
  2885. const $ = new circle.RunModelOptions();
  2886. $.location = reader.value(json.location, null);
  2887. $.signature = reader.value(json.signature, null);
  2888. return $;
  2889. }
  2890. };
  2891. circle.AttentionOptions = class AttentionOptions {
  2892. static decode(/* reader, position */) {
  2893. const $ = new circle.AttentionOptions();
  2894. return $;
  2895. }
  2896. static decodeText(/* reader, json */) {
  2897. const $ = new circle.AttentionOptions();
  2898. return $;
  2899. }
  2900. };
  2901. circle.OperatorCode = class OperatorCode {
  2902. static decode(reader, position) {
  2903. const $ = new circle.OperatorCode();
  2904. $.deprecated_builtin_code = reader.int8_(position, 4, 0);
  2905. $.custom_code = reader.string_(position, 6, null);
  2906. $.version = reader.int32_(position, 8, 1);
  2907. $.builtin_code = reader.int32_(position, 10, 0);
  2908. return $;
  2909. }
  2910. static decodeText(reader, json) {
  2911. const $ = new circle.OperatorCode();
  2912. $.deprecated_builtin_code = reader.value(json.deprecated_builtin_code, 0);
  2913. $.custom_code = reader.value(json.custom_code, null);
  2914. $.version = reader.value(json.version, 1);
  2915. $.builtin_code = circle.BuiltinOperator[json.builtin_code];
  2916. return $;
  2917. }
  2918. };
  2919. circle.CustomOptionsFormat = {
  2920. FLEXBUFFERS: 0, '0': 'FLEXBUFFERS'
  2921. };
  2922. circle.DataFormat = {
  2923. CHANNELS_LAST: 0, '0': 'CHANNELS_LAST',
  2924. CHANNELS_FIRST: 1, '1': 'CHANNELS_FIRST'
  2925. };
  2926. circle.StableHLOCompositeOptions = class StableHLOCompositeOptions {
  2927. static decode(reader, position) {
  2928. const $ = new circle.StableHLOCompositeOptions();
  2929. $.name = reader.string_(position, 4, null);
  2930. $.decomposition_subgraph_index = reader.int32_(position, 6, 0);
  2931. $.composite_attributes = reader.array(position, 8, Uint8Array);
  2932. $.composite_attributes_format = reader.int8_(position, 10, 0);
  2933. $.version = reader.int32_(position, 12, 0);
  2934. return $;
  2935. }
  2936. static decodeText(reader, json) {
  2937. const $ = new circle.StableHLOCompositeOptions();
  2938. $.name = reader.value(json.name, null);
  2939. $.decomposition_subgraph_index = reader.value(json.decomposition_subgraph_index, 0);
  2940. $.composite_attributes = reader.array(json.composite_attributes, Uint8Array);
  2941. $.composite_attributes_format = circle.CustomOptionsFormat[json.composite_attributes_format];
  2942. $.version = reader.value(json.version, 0);
  2943. return $;
  2944. }
  2945. };
  2946. circle.StablehloShiftLeftOptions = class StablehloShiftLeftOptions {
  2947. static decode(/* reader, position */) {
  2948. const $ = new circle.StablehloShiftLeftOptions();
  2949. return $;
  2950. }
  2951. static decodeText(/* reader, json */) {
  2952. const $ = new circle.StablehloShiftLeftOptions();
  2953. return $;
  2954. }
  2955. };
  2956. circle.Operator = class Operator {
  2957. static decode(reader, position) {
  2958. const $ = new circle.Operator();
  2959. $.opcode_index = reader.uint32_(position, 4, 0);
  2960. $.inputs = reader.array(position, 6, Int32Array);
  2961. $.outputs = reader.array(position, 8, Int32Array);
  2962. $.builtin_options = reader.union(position, 10, circle.BuiltinOptions);
  2963. $.custom_options = reader.array(position, 14, Uint8Array);
  2964. $.custom_options_format = reader.int8_(position, 16, 0);
  2965. $.mutating_variable_inputs = reader.bools_(position, 18);
  2966. $.intermediates = reader.array(position, 20, Int32Array);
  2967. $.large_custom_options_offset = reader.uint64_(position, 22, 0n);
  2968. $.large_custom_options_size = reader.uint64_(position, 24, 0n);
  2969. $.builtin_options_2 = reader.union(position, 26, circle.BuiltinOptions2);
  2970. $.debug_metadata_index = reader.int32_(position, 30, -1);
  2971. return $;
  2972. }
  2973. static decodeText(reader, json) {
  2974. const $ = new circle.Operator();
  2975. $.opcode_index = reader.value(json.opcode_index, 0);
  2976. $.inputs = reader.array(json.inputs, Int32Array);
  2977. $.outputs = reader.array(json.outputs, Int32Array);
  2978. $.builtin_options = circle.BuiltinOptions.decodeText(reader, json.builtin_options, json.builtin_options_type);
  2979. $.custom_options = reader.array(json.custom_options, Uint8Array);
  2980. $.custom_options_format = circle.CustomOptionsFormat[json.custom_options_format];
  2981. $.mutating_variable_inputs = reader.array(json.mutating_variable_inputs);
  2982. $.intermediates = reader.array(json.intermediates, Int32Array);
  2983. $.large_custom_options_offset = reader.uint64(json.large_custom_options_offset, 0n);
  2984. $.large_custom_options_size = reader.uint64(json.large_custom_options_size, 0n);
  2985. $.builtin_options_2 = circle.BuiltinOptions2.decodeText(reader, json.builtin_options_2, json.builtin_options_2_type);
  2986. $.debug_metadata_index = reader.value(json.debug_metadata_index, -1);
  2987. return $;
  2988. }
  2989. };
  2990. circle.SubGraph = class SubGraph {
  2991. static decode(reader, position) {
  2992. const $ = new circle.SubGraph();
  2993. $.tensors = reader.tables(position, 4, circle.Tensor);
  2994. $.inputs = reader.array(position, 6, Int32Array);
  2995. $.outputs = reader.array(position, 8, Int32Array);
  2996. $.operators = reader.tables(position, 10, circle.Operator);
  2997. $.name = reader.string_(position, 12, null);
  2998. $.deprecated_data_format = reader.int8_(position, 14, 0);
  2999. $.debug_metadata_index = reader.int32_(position, 16, -1);
  3000. return $;
  3001. }
  3002. static decodeText(reader, json) {
  3003. const $ = new circle.SubGraph();
  3004. $.tensors = reader.objects(json.tensors, circle.Tensor);
  3005. $.inputs = reader.array(json.inputs, Int32Array);
  3006. $.outputs = reader.array(json.outputs, Int32Array);
  3007. $.operators = reader.objects(json.operators, circle.Operator);
  3008. $.name = reader.value(json.name, null);
  3009. $.deprecated_data_format = circle.DataFormat[json.deprecated_data_format];
  3010. $.debug_metadata_index = reader.value(json.debug_metadata_index, -1);
  3011. return $;
  3012. }
  3013. };
  3014. circle.Buffer = class Buffer {
  3015. static decode(reader, position) {
  3016. const $ = new circle.Buffer();
  3017. $.data = reader.array(position, 4, Uint8Array);
  3018. $.offset = reader.uint64_(position, 6, 0n);
  3019. $.size = reader.uint64_(position, 8, 0n);
  3020. return $;
  3021. }
  3022. static decodeText(reader, json) {
  3023. const $ = new circle.Buffer();
  3024. $.data = reader.array(json.data, Uint8Array);
  3025. $.offset = reader.uint64(json.offset, 0n);
  3026. $.size = reader.uint64(json.size, 0n);
  3027. return $;
  3028. }
  3029. };
  3030. circle.Metadata = class Metadata {
  3031. static decode(reader, position) {
  3032. const $ = new circle.Metadata();
  3033. $.name = reader.string_(position, 4, null);
  3034. $.buffer = reader.uint32_(position, 6, 0);
  3035. return $;
  3036. }
  3037. static decodeText(reader, json) {
  3038. const $ = new circle.Metadata();
  3039. $.name = reader.value(json.name, null);
  3040. $.buffer = reader.value(json.buffer, 0);
  3041. return $;
  3042. }
  3043. };
  3044. circle.TensorMap = class TensorMap {
  3045. static decode(reader, position) {
  3046. const $ = new circle.TensorMap();
  3047. $.name = reader.string_(position, 4, null);
  3048. $.tensor_index = reader.uint32_(position, 6, 0);
  3049. return $;
  3050. }
  3051. static decodeText(reader, json) {
  3052. const $ = new circle.TensorMap();
  3053. $.name = reader.value(json.name, null);
  3054. $.tensor_index = reader.value(json.tensor_index, 0);
  3055. return $;
  3056. }
  3057. };
  3058. circle.SignatureDef = class SignatureDef {
  3059. static decode(reader, position) {
  3060. const $ = new circle.SignatureDef();
  3061. $.inputs = reader.tables(position, 4, circle.TensorMap);
  3062. $.outputs = reader.tables(position, 6, circle.TensorMap);
  3063. $.signature_key = reader.string_(position, 8, null);
  3064. $.deprecated_tag = reader.string_(position, 10, null);
  3065. $.subgraph_index = reader.uint32_(position, 12, 0);
  3066. return $;
  3067. }
  3068. static decodeText(reader, json) {
  3069. const $ = new circle.SignatureDef();
  3070. $.inputs = reader.objects(json.inputs, circle.TensorMap);
  3071. $.outputs = reader.objects(json.outputs, circle.TensorMap);
  3072. $.signature_key = reader.value(json.signature_key, null);
  3073. $.deprecated_tag = reader.value(json.deprecated_tag, null);
  3074. $.subgraph_index = reader.value(json.subgraph_index, 0);
  3075. return $;
  3076. }
  3077. };
  3078. circle.Model = class Model {
  3079. static identifier(reader) {
  3080. return reader.identifier === 'CIR0';
  3081. }
  3082. static create(reader) {
  3083. return circle.Model.decode(reader, reader.root);
  3084. }
  3085. static createText(reader) {
  3086. return circle.Model.decodeText(reader, reader.root);
  3087. }
  3088. static decode(reader, position) {
  3089. const $ = new circle.Model();
  3090. $.version = reader.uint32_(position, 4, 0);
  3091. $.operator_codes = reader.tables(position, 6, circle.OperatorCode);
  3092. $.subgraphs = reader.tables(position, 8, circle.SubGraph);
  3093. $.description = reader.string_(position, 10, null);
  3094. $.buffers = reader.tables(position, 12, circle.Buffer);
  3095. $.metadata_buffer = reader.array(position, 14, Int32Array);
  3096. $.metadata = reader.tables(position, 16, circle.Metadata);
  3097. $.signature_defs = reader.tables(position, 18, circle.SignatureDef);
  3098. return $;
  3099. }
  3100. static decodeText(reader, json) {
  3101. const $ = new circle.Model();
  3102. $.version = reader.value(json.version, 0);
  3103. $.operator_codes = reader.objects(json.operator_codes, circle.OperatorCode);
  3104. $.subgraphs = reader.objects(json.subgraphs, circle.SubGraph);
  3105. $.description = reader.value(json.description, null);
  3106. $.buffers = reader.objects(json.buffers, circle.Buffer);
  3107. $.metadata_buffer = reader.array(json.metadata_buffer, Int32Array);
  3108. $.metadata = reader.objects(json.metadata, circle.Metadata);
  3109. $.signature_defs = reader.objects(json.signature_defs, circle.SignatureDef);
  3110. return $;
  3111. }
  3112. };