You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Config.cs 331 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/protobuf/config.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021, 8981
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/protobuf/config.proto</summary>
  13. public static partial class ConfigReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/protobuf/config.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static ConfigReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CiV0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvY29uZmlnLnByb3RvEgp0ZW5z",
  24. "b3JmbG93Gip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2Nvc3RfZ3JhcGgu",
  25. "cHJvdG8aJXRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvZ3JhcGgucHJvdG8a",
  26. "KnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvc3RlcF9zdGF0cy5wcm90bxom",
  27. "dGVuc29yZmxvdy9jb3JlL3Byb3RvYnVmL2NsdXN0ZXIucHJvdG8aMnRlbnNv",
  28. "cmZsb3cvY29yZS9wcm90b2J1Zi9jb29yZGluYXRpb25fY29uZmlnLnByb3Rv",
  29. "GiR0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvZGVidWcucHJvdG8aLnRlbnNv",
  30. "cmZsb3cvY29yZS9wcm90b2J1Zi9yZXdyaXRlcl9jb25maWcucHJvdG8i1wYK",
  31. "CkdQVU9wdGlvbnMSJwofcGVyX3Byb2Nlc3NfZ3B1X21lbW9yeV9mcmFjdGlv",
  32. "bhgBIAEoARIUCgxhbGxvd19ncm93dGgYBCABKAgSFgoOYWxsb2NhdG9yX3R5",
  33. "cGUYAiABKAkSHwoXZGVmZXJyZWRfZGVsZXRpb25fYnl0ZXMYAyABKAMSGwoT",
  34. "dmlzaWJsZV9kZXZpY2VfbGlzdBgFIAEoCRIiChpwb2xsaW5nX2FjdGl2ZV9k",
  35. "ZWxheV91c2VjcxgGIAEoBRIkChxwb2xsaW5nX2luYWN0aXZlX2RlbGF5X21z",
  36. "ZWNzGAcgASgFEhwKFGZvcmNlX2dwdV9jb21wYXRpYmxlGAggASgIEjkKDGV4",
  37. "cGVyaW1lbnRhbBgJIAEoCzIjLnRlbnNvcmZsb3cuR1BVT3B0aW9ucy5FeHBl",
  38. "cmltZW50YWwakAQKDEV4cGVyaW1lbnRhbBJLCg92aXJ0dWFsX2RldmljZXMY",
  39. "ASADKAsyMi50ZW5zb3JmbG93LkdQVU9wdGlvbnMuRXhwZXJpbWVudGFsLlZp",
  40. "cnR1YWxEZXZpY2VzEhoKEnVzZV91bmlmaWVkX21lbW9yeRgCIAEoCBIjChtu",
  41. "dW1fZGV2X3RvX2Rldl9jb3B5X3N0cmVhbXMYAyABKAUSHQoVY29sbGVjdGl2",
  42. "ZV9yaW5nX29yZGVyGAQgASgJEh0KFXRpbWVzdGFtcGVkX2FsbG9jYXRvchgF",
  43. "IAEoCBIjChtrZXJuZWxfdHJhY2tlcl9tYXhfaW50ZXJ2YWwYByABKAUSIAoY",
  44. "a2VybmVsX3RyYWNrZXJfbWF4X2J5dGVzGAggASgFEiIKGmtlcm5lbF90cmFj",
  45. "a2VyX21heF9wZW5kaW5nGAkgASgFEicKH2ludGVybmFsX2ZyYWdtZW50YXRp",
  46. "b25fZnJhY3Rpb24YCiABKAESHQoVdXNlX2N1ZGFfbWFsbG9jX2FzeW5jGAsg",
  47. "ASgIEiwKJGRpc2FsbG93X3JldHJ5X29uX2FsbG9jYXRpb25fZmFpbHVyZRgM",
  48. "IAEoCBpTCg5WaXJ0dWFsRGV2aWNlcxIXCg9tZW1vcnlfbGltaXRfbWIYASAD",
  49. "KAISEAoIcHJpb3JpdHkYAiADKAUSFgoOZGV2aWNlX29yZGluYWwYAyADKAUi",
  50. "nQMKEE9wdGltaXplck9wdGlvbnMSKwojZG9fY29tbW9uX3N1YmV4cHJlc3Np",
  51. "b25fZWxpbWluYXRpb24YASABKAgSGwoTZG9fY29uc3RhbnRfZm9sZGluZxgC",
  52. "IAEoCBIkChxtYXhfZm9sZGVkX2NvbnN0YW50X2luX2J5dGVzGAYgASgDEhwK",
  53. "FGRvX2Z1bmN0aW9uX2lubGluaW5nGAQgASgIEjUKCW9wdF9sZXZlbBgDIAEo",
  54. "DjIiLnRlbnNvcmZsb3cuT3B0aW1pemVyT3B0aW9ucy5MZXZlbBJFChBnbG9i",
  55. "YWxfaml0X2xldmVsGAUgASgOMisudGVuc29yZmxvdy5PcHRpbWl6ZXJPcHRp",
  56. "b25zLkdsb2JhbEppdExldmVsEhYKDmNwdV9nbG9iYWxfaml0GAcgASgIIiAK",
  57. "BUxldmVsEgYKAkwxEAASDwoCTDAQ////////////ASJDCg5HbG9iYWxKaXRM",
  58. "ZXZlbBILCgdERUZBVUxUEAASEAoDT0ZGEP///////////wESCAoET05fMRAB",
  59. "EggKBE9OXzIQAiLuAgoMR3JhcGhPcHRpb25zEh4KFmVuYWJsZV9yZWN2X3Nj",
  60. "aGVkdWxpbmcYAiABKAgSNwoRb3B0aW1pemVyX29wdGlvbnMYAyABKAsyHC50",
  61. "ZW5zb3JmbG93Lk9wdGltaXplck9wdGlvbnMSGAoQYnVpbGRfY29zdF9tb2Rl",
  62. "bBgEIAEoAxIeChZidWlsZF9jb3N0X21vZGVsX2FmdGVyGAkgASgDEhQKDGlu",
  63. "ZmVyX3NoYXBlcxgFIAEoCBIaChJwbGFjZV9wcnVuZWRfZ3JhcGgYBiABKAgS",
  64. "IAoYZW5hYmxlX2JmbG9hdDE2X3NlbmRyZWN2GAcgASgIEhUKDXRpbWVsaW5l",
  65. "X3N0ZXAYCCABKAUSMwoPcmV3cml0ZV9vcHRpb25zGAogASgLMhoudGVuc29y",
  66. "Zmxvdy5SZXdyaXRlckNvbmZpZ0oECAEQAlIlc2tpcF9jb21tb25fc3ViZXhw",
  67. "cmVzc2lvbl9lbGltaW5hdGlvbiJBChVUaHJlYWRQb29sT3B0aW9uUHJvdG8S",
  68. "EwoLbnVtX3RocmVhZHMYASABKAUSEwoLZ2xvYmFsX25hbWUYAiABKAki1QEK",
  69. "ClJQQ09wdGlvbnMSJAocdXNlX3JwY19mb3JfaW5wcm9jZXNzX21hc3RlchgB",
  70. "IAEoCBIdChVjb21wcmVzc2lvbl9hbGdvcml0aG0YAiABKAkSGQoRY29tcHJl",
  71. "c3Npb25fbGV2ZWwYAyABKAUSGgoSY2FjaGVfcnBjX3Jlc3BvbnNlGAQgASgI",
  72. "EioKImRpc2FibGVfc2Vzc2lvbl9jb25uZWN0aW9uX3NoYXJpbmcYBSABKAgS",
  73. "HwoXbnVtX2NoYW5uZWxzX3Blcl90YXJnZXQYBiABKAUiMAoPU2Vzc2lvbk1l",
  74. "dGFkYXRhEgwKBG5hbWUYASABKAkSDwoHdmVyc2lvbhgCIAEoAyKuDgoLQ29u",
  75. "ZmlnUHJvdG8SPgoMZGV2aWNlX2NvdW50GAEgAygLMigudGVuc29yZmxvdy5D",
  76. "b25maWdQcm90by5EZXZpY2VDb3VudEVudHJ5EiQKHGludHJhX29wX3BhcmFs",
  77. "bGVsaXNtX3RocmVhZHMYAiABKAUSJAocaW50ZXJfb3BfcGFyYWxsZWxpc21f",
  78. "dGhyZWFkcxgFIAEoBRIfChd1c2VfcGVyX3Nlc3Npb25fdGhyZWFkcxgJIAEo",
  79. "CBJHChxzZXNzaW9uX2ludGVyX29wX3RocmVhZF9wb29sGAwgAygLMiEudGVu",
  80. "c29yZmxvdy5UaHJlYWRQb29sT3B0aW9uUHJvdG8SGAoQcGxhY2VtZW50X3Bl",
  81. "cmlvZBgDIAEoBRIWCg5kZXZpY2VfZmlsdGVycxgEIAMoCRIrCgtncHVfb3B0",
  82. "aW9ucxgGIAEoCzIWLnRlbnNvcmZsb3cuR1BVT3B0aW9ucxIcChRhbGxvd19z",
  83. "b2Z0X3BsYWNlbWVudBgHIAEoCBIcChRsb2dfZGV2aWNlX3BsYWNlbWVudBgI",
  84. "IAEoCBIvCg1ncmFwaF9vcHRpb25zGAogASgLMhgudGVuc29yZmxvdy5HcmFw",
  85. "aE9wdGlvbnMSHwoXb3BlcmF0aW9uX3RpbWVvdXRfaW5fbXMYCyABKAMSKwoL",
  86. "cnBjX29wdGlvbnMYDSABKAsyFi50ZW5zb3JmbG93LlJQQ09wdGlvbnMSKwoL",
  87. "Y2x1c3Rlcl9kZWYYDiABKAsyFi50ZW5zb3JmbG93LkNsdXN0ZXJEZWYSHQoV",
  88. "aXNvbGF0ZV9zZXNzaW9uX3N0YXRlGA8gASgIEigKIHNoYXJlX2NsdXN0ZXJf",
  89. "ZGV2aWNlc19pbl9zZXNzaW9uGBEgASgIEjoKDGV4cGVyaW1lbnRhbBgQIAEo",
  90. "CzIkLnRlbnNvcmZsb3cuQ29uZmlnUHJvdG8uRXhwZXJpbWVudGFsGjIKEERl",
  91. "dmljZUNvdW50RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgFOgI4",
  92. "ARqoCAoMRXhwZXJpbWVudGFsEh8KF2NvbGxlY3RpdmVfZ3JvdXBfbGVhZGVy",
  93. "GAEgASgJEhUKDWV4ZWN1dG9yX3R5cGUYAyABKAkSGgoScmVjdl9idWZfbWF4",
  94. "X2NodW5rGAQgASgFEhkKEXVzZV9udW1hX2FmZmluaXR5GAUgASgIEjUKLWNv",
  95. "bGxlY3RpdmVfZGV0ZXJtaW5pc3RpY19zZXF1ZW50aWFsX2V4ZWN1dGlvbhgG",
  96. "IAEoCBIXCg9jb2xsZWN0aXZlX25jY2wYByABKAgSNgouc2hhcmVfc2Vzc2lv",
  97. "bl9zdGF0ZV9pbl9jbHVzdGVyc3BlY19wcm9wYWdhdGlvbhgIIAEoCBIfChdk",
  98. "aXNhYmxlX3RocmVhZF9zcGlubmluZxgJIAEoCBIoCiBzaGFyZV9jbHVzdGVy",
  99. "X2RldmljZXNfaW5fc2Vzc2lvbhgKIAEoCBI1ChBzZXNzaW9uX21ldGFkYXRh",
  100. "GAsgASgLMhsudGVuc29yZmxvdy5TZXNzaW9uTWV0YWRhdGESIQoZb3B0aW1p",
  101. "emVfZm9yX3N0YXRpY19ncmFwaBgMIAEoCBIaChJlbmFibGVfbWxpcl9icmlk",
  102. "Z2UYDSABKAgSUwoTbWxpcl9icmlkZ2Vfcm9sbG91dBgRIAEoDjI2LnRlbnNv",
  103. "cmZsb3cuQ29uZmlnUHJvdG8uRXhwZXJpbWVudGFsLk1saXJCcmlkZ2VSb2xs",
  104. "b3V0EiYKHmVuYWJsZV9tbGlyX2dyYXBoX29wdGltaXphdGlvbhgQIAEoCBIn",
  105. "Ch9kaXNhYmxlX291dHB1dF9wYXJ0aXRpb25fZ3JhcGhzGA4gASgIEiMKG3hs",
  106. "YV9mdXNpb25fYXV0b3R1bmVyX3RocmVzaBgPIAEoAxIQCgh1c2VfdGZydBgS",
  107. "IAEoCBInCh9kaXNhYmxlX2Z1bmN0aW9uYWxfb3BzX2xvd2VyaW5nGBUgASgI",
  108. "EicKH3hsYV9wcmVmZXJfc2luZ2xlX2dyYXBoX2NsdXN0ZXIYFiABKAgSQgoT",
  109. "Y29vcmRpbmF0aW9uX2NvbmZpZxgXIAEoCzIlLnRlbnNvcmZsb3cuQ29vcmRp",
  110. "bmF0aW9uU2VydmljZUNvbmZpZyLaAQoRTWxpckJyaWRnZVJvbGxvdXQSIwof",
  111. "TUxJUl9CUklER0VfUk9MTE9VVF9VTlNQRUNJRklFRBAAEh8KG01MSVJfQlJJ",
  112. "REdFX1JPTExPVVRfRU5BQkxFRBABEiAKHE1MSVJfQlJJREdFX1JPTExPVVRf",
  113. "RElTQUJMRUQQAhIpCiVNTElSX0JSSURHRV9ST0xMT1VUX1NBRkVfTU9ERV9F",
  114. "TkFCTEVEEAMSMgouTUxJUl9CUklER0VfUk9MTE9VVF9TQUZFX01PREVfRkFM",
  115. "TEJBQ0tfRU5BQkxFRBAESgQIAhADSgQIExAUSgQIFBAVIuEECgpSdW5PcHRp",
  116. "b25zEjYKC3RyYWNlX2xldmVsGAEgASgOMiEudGVuc29yZmxvdy5SdW5PcHRp",
  117. "b25zLlRyYWNlTGV2ZWwSFQoNdGltZW91dF9pbl9tcxgCIAEoAxIcChRpbnRl",
  118. "cl9vcF90aHJlYWRfcG9vbBgDIAEoBRIfChdvdXRwdXRfcGFydGl0aW9uX2dy",
  119. "YXBocxgFIAEoCBIvCg1kZWJ1Z19vcHRpb25zGAYgASgLMhgudGVuc29yZmxv",
  120. "dy5EZWJ1Z09wdGlvbnMSKgoicmVwb3J0X3RlbnNvcl9hbGxvY2F0aW9uc191",
  121. "cG9uX29vbRgHIAEoCBI5CgxleHBlcmltZW50YWwYCCABKAsyIy50ZW5zb3Jm",
  122. "bG93LlJ1bk9wdGlvbnMuRXhwZXJpbWVudGFsGtIBCgxFeHBlcmltZW50YWwS",
  123. "HAoUY29sbGVjdGl2ZV9ncmFwaF9rZXkYASABKAMSHAoUdXNlX3J1bl9oYW5k",
  124. "bGVyX3Bvb2wYAiABKAgSWwoYcnVuX2hhbmRsZXJfcG9vbF9vcHRpb25zGAMg",
  125. "ASgLMjkudGVuc29yZmxvdy5SdW5PcHRpb25zLkV4cGVyaW1lbnRhbC5SdW5I",
  126. "YW5kbGVyUG9vbE9wdGlvbnMaKQoVUnVuSGFuZGxlclBvb2xPcHRpb25zEhAK",
  127. "CHByaW9yaXR5GAEgASgDIlIKClRyYWNlTGV2ZWwSDAoITk9fVFJBQ0UQABIS",
  128. "Cg5TT0ZUV0FSRV9UUkFDRRABEhIKDkhBUkRXQVJFX1RSQUNFEAISDgoKRlVM",
  129. "TF9UUkFDRRADSgQIBBAFIr4DCgtSdW5NZXRhZGF0YRIpCgpzdGVwX3N0YXRz",
  130. "GAEgASgLMhUudGVuc29yZmxvdy5TdGVwU3RhdHMSLAoKY29zdF9ncmFwaBgC",
  131. "IAEoCzIYLnRlbnNvcmZsb3cuQ29zdEdyYXBoRGVmEi4KEHBhcnRpdGlvbl9n",
  132. "cmFwaHMYAyADKAsyFC50ZW5zb3JmbG93LkdyYXBoRGVmEj8KD2Z1bmN0aW9u",
  133. "X2dyYXBocxgEIAMoCzImLnRlbnNvcmZsb3cuUnVuTWV0YWRhdGEuRnVuY3Rp",
  134. "b25HcmFwaHMSNQoQc2Vzc2lvbl9tZXRhZGF0YRgFIAEoCzIbLnRlbnNvcmZs",
  135. "b3cuU2Vzc2lvbk1ldGFkYXRhGq0BCg5GdW5jdGlvbkdyYXBocxIuChBwYXJ0",
  136. "aXRpb25fZ3JhcGhzGAEgAygLMhQudGVuc29yZmxvdy5HcmFwaERlZhI0ChZw",
  137. "cmVfb3B0aW1pemF0aW9uX2dyYXBoGAIgASgLMhQudGVuc29yZmxvdy5HcmFw",
  138. "aERlZhI1Chdwb3N0X29wdGltaXphdGlvbl9ncmFwaBgDIAEoCzIULnRlbnNv",
  139. "cmZsb3cuR3JhcGhEZWYiOgoQVGVuc29yQ29ubmVjdGlvbhITCgtmcm9tX3Rl",
  140. "bnNvchgBIAEoCRIRCgl0b190ZW5zb3IYAiABKAkisAMKD0NhbGxhYmxlT3B0",
  141. "aW9ucxIMCgRmZWVkGAEgAygJEg0KBWZldGNoGAIgAygJEg4KBnRhcmdldBgD",
  142. "IAMoCRIrCgtydW5fb3B0aW9ucxgEIAEoCzIWLnRlbnNvcmZsb3cuUnVuT3B0",
  143. "aW9ucxI3ChF0ZW5zb3JfY29ubmVjdGlvbhgFIAMoCzIcLnRlbnNvcmZsb3cu",
  144. "VGVuc29yQ29ubmVjdGlvbhJCCgxmZWVkX2RldmljZXMYBiADKAsyLC50ZW5z",
  145. "b3JmbG93LkNhbGxhYmxlT3B0aW9ucy5GZWVkRGV2aWNlc0VudHJ5EkQKDWZl",
  146. "dGNoX2RldmljZXMYByADKAsyLS50ZW5zb3JmbG93LkNhbGxhYmxlT3B0aW9u",
  147. "cy5GZXRjaERldmljZXNFbnRyeRIXCg9mZXRjaF9za2lwX3N5bmMYCCABKAga",
  148. "MgoQRmVlZERldmljZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiAB",
  149. "KAk6AjgBGjMKEUZldGNoRGV2aWNlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2",
  150. "YWx1ZRgCIAEoCToCOAFChAEKGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IM",
  151. "Q29uZmlnUHJvdG9zUAFaVWdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3Jm",
  152. "bG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90b2J1Zi9mb3JfY29yZV9wcm90",
  153. "b3NfZ29fcHJvdG/4AQFiBnByb3RvMw=="));
  154. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  155. new pbr::FileDescriptor[] { global::Tensorflow.CostGraphReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.StepStatsReflection.Descriptor, global::Tensorflow.ClusterReflection.Descriptor, global::Tensorflow.CoordinationConfigReflection.Descriptor, global::Tensorflow.DebugReflection.Descriptor, global::Tensorflow.RewriterConfigReflection.Descriptor, },
  156. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  157. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental), global::Tensorflow.GPUOptions.Types.Experimental.Parser, new[]{ "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending", "InternalFragmentationFraction", "UseCudaMallocAsync", "DisallowRetryOnAllocationFailure" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices), global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new[]{ "MemoryLimitMb", "Priority", "DeviceOrdinal" }, null, null, null, null)})}),
  158. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OptimizerOptions), global::Tensorflow.OptimizerOptions.Parser, new[]{ "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel", "CpuGlobalJit" }, null, new[]{ typeof(global::Tensorflow.OptimizerOptions.Types.Level), typeof(global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) }, null, null),
  159. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphOptions), global::Tensorflow.GraphOptions.Parser, new[]{ "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, null, null, null, null),
  160. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ThreadPoolOptionProto), global::Tensorflow.ThreadPoolOptionProto.Parser, new[]{ "NumThreads", "GlobalName" }, null, null, null, null),
  161. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing", "NumChannelsPerTarget" }, null, null, null, null),
  162. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionMetadata), global::Tensorflow.SessionMetadata.Parser, new[]{ "Name", "Version" }, null, null, null, null),
  163. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto), global::Tensorflow.ConfigProto.Parser, new[]{ "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto.Types.Experimental), global::Tensorflow.ConfigProto.Types.Experimental.Parser, new[]{ "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig" }, null, new[]{ typeof(global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout) }, null, null)}),
  164. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions), global::Tensorflow.RunOptions.Parser, new[]{ "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental" }, null, new[]{ typeof(global::Tensorflow.RunOptions.Types.TraceLevel) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental), global::Tensorflow.RunOptions.Types.Experimental.Parser, new[]{ "CollectiveGraphKey", "UseRunHandlerPool", "RunHandlerPoolOptions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions), global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions.Parser, new[]{ "Priority" }, null, null, null, null)})}),
  165. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata), global::Tensorflow.RunMetadata.Parser, new[]{ "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs", "SessionMetadata" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata.Types.FunctionGraphs), global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser, new[]{ "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph" }, null, null, null, null)}),
  166. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorConnection), global::Tensorflow.TensorConnection.Parser, new[]{ "FromTensor", "ToTensor" }, null, null, null, null),
  167. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CallableOptions), global::Tensorflow.CallableOptions.Parser, new[]{ "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, })
  168. }));
  169. }
  170. #endregion
  171. }
  172. #region Messages
  173. public sealed partial class GPUOptions : pb::IMessage<GPUOptions>
  174. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  175. , pb::IBufferMessage
  176. #endif
  177. {
  178. private static readonly pb::MessageParser<GPUOptions> _parser = new pb::MessageParser<GPUOptions>(() => new GPUOptions());
  179. private pb::UnknownFieldSet _unknownFields;
  180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  181. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  182. public static pb::MessageParser<GPUOptions> Parser { get { return _parser; } }
  183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  184. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  185. public static pbr::MessageDescriptor Descriptor {
  186. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[0]; }
  187. }
  188. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  189. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  190. pbr::MessageDescriptor pb::IMessage.Descriptor {
  191. get { return Descriptor; }
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  195. public GPUOptions() {
  196. OnConstruction();
  197. }
  198. partial void OnConstruction();
  199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  200. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  201. public GPUOptions(GPUOptions other) : this() {
  202. perProcessGpuMemoryFraction_ = other.perProcessGpuMemoryFraction_;
  203. allowGrowth_ = other.allowGrowth_;
  204. allocatorType_ = other.allocatorType_;
  205. deferredDeletionBytes_ = other.deferredDeletionBytes_;
  206. visibleDeviceList_ = other.visibleDeviceList_;
  207. pollingActiveDelayUsecs_ = other.pollingActiveDelayUsecs_;
  208. pollingInactiveDelayMsecs_ = other.pollingInactiveDelayMsecs_;
  209. forceGpuCompatible_ = other.forceGpuCompatible_;
  210. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  211. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  212. }
  213. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  214. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  215. public GPUOptions Clone() {
  216. return new GPUOptions(this);
  217. }
  218. /// <summary>Field number for the "per_process_gpu_memory_fraction" field.</summary>
  219. public const int PerProcessGpuMemoryFractionFieldNumber = 1;
  220. private double perProcessGpuMemoryFraction_;
  221. /// <summary>
  222. /// Fraction of the available GPU memory to allocate for each process.
  223. /// 1 means to allocate all of the GPU memory, 0.5 means the process
  224. /// allocates up to ~50% of the available GPU memory.
  225. ///
  226. /// GPU memory is pre-allocated unless the allow_growth option is enabled.
  227. ///
  228. /// If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
  229. /// the amount of memory available on the GPU device by using host memory as a
  230. /// swap space. Accessing memory not available on the device will be
  231. /// significantly slower as that would require memory transfer between the host
  232. /// and the device. Options to reduce the memory requirement should be
  233. /// considered before enabling this option as this may come with a negative
  234. /// performance impact. Oversubscription using the unified memory requires
  235. /// Pascal class or newer GPUs and it is currently only supported on the Linux
  236. /// operating system. See
  237. /// https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
  238. /// for the detailed requirements.
  239. /// </summary>
  240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  241. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  242. public double PerProcessGpuMemoryFraction {
  243. get { return perProcessGpuMemoryFraction_; }
  244. set {
  245. perProcessGpuMemoryFraction_ = value;
  246. }
  247. }
  248. /// <summary>Field number for the "allow_growth" field.</summary>
  249. public const int AllowGrowthFieldNumber = 4;
  250. private bool allowGrowth_;
  251. /// <summary>
  252. /// If true, the allocator does not pre-allocate the entire specified
  253. /// GPU memory region, instead starting small and growing as needed.
  254. /// </summary>
  255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  256. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  257. public bool AllowGrowth {
  258. get { return allowGrowth_; }
  259. set {
  260. allowGrowth_ = value;
  261. }
  262. }
  263. /// <summary>Field number for the "allocator_type" field.</summary>
  264. public const int AllocatorTypeFieldNumber = 2;
  265. private string allocatorType_ = "";
  266. /// <summary>
  267. /// The type of GPU allocation strategy to use.
  268. ///
  269. /// Allowed values:
  270. /// "": The empty string (default) uses a system-chosen default
  271. /// which may change over time.
  272. ///
  273. /// "BFC": A "Best-fit with coalescing" algorithm, simplified from a
  274. /// version of dlmalloc.
  275. /// </summary>
  276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  277. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  278. public string AllocatorType {
  279. get { return allocatorType_; }
  280. set {
  281. allocatorType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  282. }
  283. }
  284. /// <summary>Field number for the "deferred_deletion_bytes" field.</summary>
  285. public const int DeferredDeletionBytesFieldNumber = 3;
  286. private long deferredDeletionBytes_;
  287. /// <summary>
  288. /// Delay deletion of up to this many bytes to reduce the number of
  289. /// interactions with gpu driver code. If 0, the system chooses
  290. /// a reasonable default (several MBs).
  291. /// </summary>
  292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  293. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  294. public long DeferredDeletionBytes {
  295. get { return deferredDeletionBytes_; }
  296. set {
  297. deferredDeletionBytes_ = value;
  298. }
  299. }
  300. /// <summary>Field number for the "visible_device_list" field.</summary>
  301. public const int VisibleDeviceListFieldNumber = 5;
  302. private string visibleDeviceList_ = "";
  303. /// <summary>
  304. /// A comma-separated list of GPU ids that determines the 'visible'
  305. /// to 'virtual' mapping of GPU devices. For example, if TensorFlow
  306. /// can see 8 GPU devices in the process, and one wanted to map
  307. /// visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
  308. /// then one would specify this field as "5,3". This field is similar in
  309. /// spirit to the CUDA_VISIBLE_DEVICES environment variable, except
  310. /// it applies to the visible GPU devices in the process.
  311. ///
  312. /// NOTE:
  313. /// 1. The GPU driver provides the process with the visible GPUs
  314. /// in an order which is not guaranteed to have any correlation to
  315. /// the *physical* GPU id in the machine. This field is used for
  316. /// remapping "visible" to "virtual", which means this operates only
  317. /// after the process starts. Users are required to use vendor
  318. /// specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
  319. /// physical to visible device mapping prior to invoking TensorFlow.
  320. /// 2. In the code, the ids in this list are also called "platform GPU id"s,
  321. /// and the 'virtual' ids of GPU devices (i.e. the ids in the device
  322. /// name "/device:GPU:&lt;id>") are also called "TF GPU id"s. Please
  323. /// refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
  324. /// for more information.
  325. /// </summary>
  326. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  327. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  328. public string VisibleDeviceList {
  329. get { return visibleDeviceList_; }
  330. set {
  331. visibleDeviceList_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  332. }
  333. }
  334. /// <summary>Field number for the "polling_active_delay_usecs" field.</summary>
  335. public const int PollingActiveDelayUsecsFieldNumber = 6;
  336. private int pollingActiveDelayUsecs_;
  337. /// <summary>
  338. /// In the event polling loop sleep this many microseconds between
  339. /// PollEvents calls, when the queue is not empty. If value is not
  340. /// set or set to 0, gets set to a non-zero default.
  341. /// </summary>
  342. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  343. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  344. public int PollingActiveDelayUsecs {
  345. get { return pollingActiveDelayUsecs_; }
  346. set {
  347. pollingActiveDelayUsecs_ = value;
  348. }
  349. }
  350. /// <summary>Field number for the "polling_inactive_delay_msecs" field.</summary>
  351. public const int PollingInactiveDelayMsecsFieldNumber = 7;
  352. private int pollingInactiveDelayMsecs_;
  353. /// <summary>
  354. /// This field is deprecated and ignored.
  355. /// </summary>
  356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  357. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  358. public int PollingInactiveDelayMsecs {
  359. get { return pollingInactiveDelayMsecs_; }
  360. set {
  361. pollingInactiveDelayMsecs_ = value;
  362. }
  363. }
  364. /// <summary>Field number for the "force_gpu_compatible" field.</summary>
  365. public const int ForceGpuCompatibleFieldNumber = 8;
  366. private bool forceGpuCompatible_;
  367. /// <summary>
  368. /// Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
  369. /// enabling this option forces all CPU tensors to be allocated with Cuda
  370. /// pinned memory. Normally, TensorFlow will infer which tensors should be
  371. /// allocated as the pinned memory. But in case where the inference is
  372. /// incomplete, this option can significantly speed up the cross-device memory
  373. /// copy performance as long as it fits the memory.
  374. /// Note that this option is not something that should be
  375. /// enabled by default for unknown or very large models, since all Cuda pinned
  376. /// memory is unpageable, having too much pinned memory might negatively impact
  377. /// the overall host system performance.
  378. /// </summary>
  379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  380. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  381. public bool ForceGpuCompatible {
  382. get { return forceGpuCompatible_; }
  383. set {
  384. forceGpuCompatible_ = value;
  385. }
  386. }
  387. /// <summary>Field number for the "experimental" field.</summary>
  388. public const int ExperimentalFieldNumber = 9;
  389. private global::Tensorflow.GPUOptions.Types.Experimental experimental_;
  390. /// <summary>
  391. /// Everything inside experimental is subject to change and is not subject
  392. /// to API stability guarantees in
  393. /// https://www.tensorflow.org/guide/version_compat.
  394. /// </summary>
  395. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  396. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  397. public global::Tensorflow.GPUOptions.Types.Experimental Experimental {
  398. get { return experimental_; }
  399. set {
  400. experimental_ = value;
  401. }
  402. }
  403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  404. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  405. public override bool Equals(object other) {
  406. return Equals(other as GPUOptions);
  407. }
  408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  409. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  410. public bool Equals(GPUOptions other) {
  411. if (ReferenceEquals(other, null)) {
  412. return false;
  413. }
  414. if (ReferenceEquals(other, this)) {
  415. return true;
  416. }
  417. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(PerProcessGpuMemoryFraction, other.PerProcessGpuMemoryFraction)) return false;
  418. if (AllowGrowth != other.AllowGrowth) return false;
  419. if (AllocatorType != other.AllocatorType) return false;
  420. if (DeferredDeletionBytes != other.DeferredDeletionBytes) return false;
  421. if (VisibleDeviceList != other.VisibleDeviceList) return false;
  422. if (PollingActiveDelayUsecs != other.PollingActiveDelayUsecs) return false;
  423. if (PollingInactiveDelayMsecs != other.PollingInactiveDelayMsecs) return false;
  424. if (ForceGpuCompatible != other.ForceGpuCompatible) return false;
  425. if (!object.Equals(Experimental, other.Experimental)) return false;
  426. return Equals(_unknownFields, other._unknownFields);
  427. }
  428. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  429. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  430. public override int GetHashCode() {
  431. int hash = 1;
  432. if (PerProcessGpuMemoryFraction != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PerProcessGpuMemoryFraction);
  433. if (AllowGrowth != false) hash ^= AllowGrowth.GetHashCode();
  434. if (AllocatorType.Length != 0) hash ^= AllocatorType.GetHashCode();
  435. if (DeferredDeletionBytes != 0L) hash ^= DeferredDeletionBytes.GetHashCode();
  436. if (VisibleDeviceList.Length != 0) hash ^= VisibleDeviceList.GetHashCode();
  437. if (PollingActiveDelayUsecs != 0) hash ^= PollingActiveDelayUsecs.GetHashCode();
  438. if (PollingInactiveDelayMsecs != 0) hash ^= PollingInactiveDelayMsecs.GetHashCode();
  439. if (ForceGpuCompatible != false) hash ^= ForceGpuCompatible.GetHashCode();
  440. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  441. if (_unknownFields != null) {
  442. hash ^= _unknownFields.GetHashCode();
  443. }
  444. return hash;
  445. }
  446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  447. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  448. public override string ToString() {
  449. return pb::JsonFormatter.ToDiagnosticString(this);
  450. }
  451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  452. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  453. public void WriteTo(pb::CodedOutputStream output) {
  454. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  455. output.WriteRawMessage(this);
  456. #else
  457. if (PerProcessGpuMemoryFraction != 0D) {
  458. output.WriteRawTag(9);
  459. output.WriteDouble(PerProcessGpuMemoryFraction);
  460. }
  461. if (AllocatorType.Length != 0) {
  462. output.WriteRawTag(18);
  463. output.WriteString(AllocatorType);
  464. }
  465. if (DeferredDeletionBytes != 0L) {
  466. output.WriteRawTag(24);
  467. output.WriteInt64(DeferredDeletionBytes);
  468. }
  469. if (AllowGrowth != false) {
  470. output.WriteRawTag(32);
  471. output.WriteBool(AllowGrowth);
  472. }
  473. if (VisibleDeviceList.Length != 0) {
  474. output.WriteRawTag(42);
  475. output.WriteString(VisibleDeviceList);
  476. }
  477. if (PollingActiveDelayUsecs != 0) {
  478. output.WriteRawTag(48);
  479. output.WriteInt32(PollingActiveDelayUsecs);
  480. }
  481. if (PollingInactiveDelayMsecs != 0) {
  482. output.WriteRawTag(56);
  483. output.WriteInt32(PollingInactiveDelayMsecs);
  484. }
  485. if (ForceGpuCompatible != false) {
  486. output.WriteRawTag(64);
  487. output.WriteBool(ForceGpuCompatible);
  488. }
  489. if (experimental_ != null) {
  490. output.WriteRawTag(74);
  491. output.WriteMessage(Experimental);
  492. }
  493. if (_unknownFields != null) {
  494. _unknownFields.WriteTo(output);
  495. }
  496. #endif
  497. }
  498. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  499. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  500. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  501. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  502. if (PerProcessGpuMemoryFraction != 0D) {
  503. output.WriteRawTag(9);
  504. output.WriteDouble(PerProcessGpuMemoryFraction);
  505. }
  506. if (AllocatorType.Length != 0) {
  507. output.WriteRawTag(18);
  508. output.WriteString(AllocatorType);
  509. }
  510. if (DeferredDeletionBytes != 0L) {
  511. output.WriteRawTag(24);
  512. output.WriteInt64(DeferredDeletionBytes);
  513. }
  514. if (AllowGrowth != false) {
  515. output.WriteRawTag(32);
  516. output.WriteBool(AllowGrowth);
  517. }
  518. if (VisibleDeviceList.Length != 0) {
  519. output.WriteRawTag(42);
  520. output.WriteString(VisibleDeviceList);
  521. }
  522. if (PollingActiveDelayUsecs != 0) {
  523. output.WriteRawTag(48);
  524. output.WriteInt32(PollingActiveDelayUsecs);
  525. }
  526. if (PollingInactiveDelayMsecs != 0) {
  527. output.WriteRawTag(56);
  528. output.WriteInt32(PollingInactiveDelayMsecs);
  529. }
  530. if (ForceGpuCompatible != false) {
  531. output.WriteRawTag(64);
  532. output.WriteBool(ForceGpuCompatible);
  533. }
  534. if (experimental_ != null) {
  535. output.WriteRawTag(74);
  536. output.WriteMessage(Experimental);
  537. }
  538. if (_unknownFields != null) {
  539. _unknownFields.WriteTo(ref output);
  540. }
  541. }
  542. #endif
  543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  544. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  545. public int CalculateSize() {
  546. int size = 0;
  547. if (PerProcessGpuMemoryFraction != 0D) {
  548. size += 1 + 8;
  549. }
  550. if (AllowGrowth != false) {
  551. size += 1 + 1;
  552. }
  553. if (AllocatorType.Length != 0) {
  554. size += 1 + pb::CodedOutputStream.ComputeStringSize(AllocatorType);
  555. }
  556. if (DeferredDeletionBytes != 0L) {
  557. size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeferredDeletionBytes);
  558. }
  559. if (VisibleDeviceList.Length != 0) {
  560. size += 1 + pb::CodedOutputStream.ComputeStringSize(VisibleDeviceList);
  561. }
  562. if (PollingActiveDelayUsecs != 0) {
  563. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PollingActiveDelayUsecs);
  564. }
  565. if (PollingInactiveDelayMsecs != 0) {
  566. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PollingInactiveDelayMsecs);
  567. }
  568. if (ForceGpuCompatible != false) {
  569. size += 1 + 1;
  570. }
  571. if (experimental_ != null) {
  572. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  573. }
  574. if (_unknownFields != null) {
  575. size += _unknownFields.CalculateSize();
  576. }
  577. return size;
  578. }
  579. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  580. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  581. public void MergeFrom(GPUOptions other) {
  582. if (other == null) {
  583. return;
  584. }
  585. if (other.PerProcessGpuMemoryFraction != 0D) {
  586. PerProcessGpuMemoryFraction = other.PerProcessGpuMemoryFraction;
  587. }
  588. if (other.AllowGrowth != false) {
  589. AllowGrowth = other.AllowGrowth;
  590. }
  591. if (other.AllocatorType.Length != 0) {
  592. AllocatorType = other.AllocatorType;
  593. }
  594. if (other.DeferredDeletionBytes != 0L) {
  595. DeferredDeletionBytes = other.DeferredDeletionBytes;
  596. }
  597. if (other.VisibleDeviceList.Length != 0) {
  598. VisibleDeviceList = other.VisibleDeviceList;
  599. }
  600. if (other.PollingActiveDelayUsecs != 0) {
  601. PollingActiveDelayUsecs = other.PollingActiveDelayUsecs;
  602. }
  603. if (other.PollingInactiveDelayMsecs != 0) {
  604. PollingInactiveDelayMsecs = other.PollingInactiveDelayMsecs;
  605. }
  606. if (other.ForceGpuCompatible != false) {
  607. ForceGpuCompatible = other.ForceGpuCompatible;
  608. }
  609. if (other.experimental_ != null) {
  610. if (experimental_ == null) {
  611. Experimental = new global::Tensorflow.GPUOptions.Types.Experimental();
  612. }
  613. Experimental.MergeFrom(other.Experimental);
  614. }
  615. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  616. }
  617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  618. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  619. public void MergeFrom(pb::CodedInputStream input) {
  620. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  621. input.ReadRawMessage(this);
  622. #else
  623. uint tag;
  624. while ((tag = input.ReadTag()) != 0) {
  625. switch(tag) {
  626. default:
  627. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  628. break;
  629. case 9: {
  630. PerProcessGpuMemoryFraction = input.ReadDouble();
  631. break;
  632. }
  633. case 18: {
  634. AllocatorType = input.ReadString();
  635. break;
  636. }
  637. case 24: {
  638. DeferredDeletionBytes = input.ReadInt64();
  639. break;
  640. }
  641. case 32: {
  642. AllowGrowth = input.ReadBool();
  643. break;
  644. }
  645. case 42: {
  646. VisibleDeviceList = input.ReadString();
  647. break;
  648. }
  649. case 48: {
  650. PollingActiveDelayUsecs = input.ReadInt32();
  651. break;
  652. }
  653. case 56: {
  654. PollingInactiveDelayMsecs = input.ReadInt32();
  655. break;
  656. }
  657. case 64: {
  658. ForceGpuCompatible = input.ReadBool();
  659. break;
  660. }
  661. case 74: {
  662. if (experimental_ == null) {
  663. Experimental = new global::Tensorflow.GPUOptions.Types.Experimental();
  664. }
  665. input.ReadMessage(Experimental);
  666. break;
  667. }
  668. }
  669. }
  670. #endif
  671. }
  672. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  673. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  674. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  675. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  676. uint tag;
  677. while ((tag = input.ReadTag()) != 0) {
  678. switch(tag) {
  679. default:
  680. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  681. break;
  682. case 9: {
  683. PerProcessGpuMemoryFraction = input.ReadDouble();
  684. break;
  685. }
  686. case 18: {
  687. AllocatorType = input.ReadString();
  688. break;
  689. }
  690. case 24: {
  691. DeferredDeletionBytes = input.ReadInt64();
  692. break;
  693. }
  694. case 32: {
  695. AllowGrowth = input.ReadBool();
  696. break;
  697. }
  698. case 42: {
  699. VisibleDeviceList = input.ReadString();
  700. break;
  701. }
  702. case 48: {
  703. PollingActiveDelayUsecs = input.ReadInt32();
  704. break;
  705. }
  706. case 56: {
  707. PollingInactiveDelayMsecs = input.ReadInt32();
  708. break;
  709. }
  710. case 64: {
  711. ForceGpuCompatible = input.ReadBool();
  712. break;
  713. }
  714. case 74: {
  715. if (experimental_ == null) {
  716. Experimental = new global::Tensorflow.GPUOptions.Types.Experimental();
  717. }
  718. input.ReadMessage(Experimental);
  719. break;
  720. }
  721. }
  722. }
  723. }
  724. #endif
  725. #region Nested types
  726. /// <summary>Container for nested types declared in the GPUOptions message type.</summary>
  727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  728. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  729. public static partial class Types {
  730. public sealed partial class Experimental : pb::IMessage<Experimental>
  731. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  732. , pb::IBufferMessage
  733. #endif
  734. {
  735. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  736. private pb::UnknownFieldSet _unknownFields;
  737. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  738. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  739. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  740. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  741. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  742. public static pbr::MessageDescriptor Descriptor {
  743. get { return global::Tensorflow.GPUOptions.Descriptor.NestedTypes[0]; }
  744. }
  745. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  746. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  747. pbr::MessageDescriptor pb::IMessage.Descriptor {
  748. get { return Descriptor; }
  749. }
  750. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  751. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  752. public Experimental() {
  753. OnConstruction();
  754. }
  755. partial void OnConstruction();
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  757. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  758. public Experimental(Experimental other) : this() {
  759. virtualDevices_ = other.virtualDevices_.Clone();
  760. useUnifiedMemory_ = other.useUnifiedMemory_;
  761. numDevToDevCopyStreams_ = other.numDevToDevCopyStreams_;
  762. collectiveRingOrder_ = other.collectiveRingOrder_;
  763. timestampedAllocator_ = other.timestampedAllocator_;
  764. kernelTrackerMaxInterval_ = other.kernelTrackerMaxInterval_;
  765. kernelTrackerMaxBytes_ = other.kernelTrackerMaxBytes_;
  766. kernelTrackerMaxPending_ = other.kernelTrackerMaxPending_;
  767. internalFragmentationFraction_ = other.internalFragmentationFraction_;
  768. useCudaMallocAsync_ = other.useCudaMallocAsync_;
  769. disallowRetryOnAllocationFailure_ = other.disallowRetryOnAllocationFailure_;
  770. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  771. }
  772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  773. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  774. public Experimental Clone() {
  775. return new Experimental(this);
  776. }
  777. /// <summary>Field number for the "virtual_devices" field.</summary>
  778. public const int VirtualDevicesFieldNumber = 1;
  779. private static readonly pb::FieldCodec<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> _repeated_virtualDevices_codec
  780. = pb::FieldCodec.ForMessage(10, global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser);
  781. private readonly pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> virtualDevices_ = new pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices>();
  782. /// <summary>
  783. /// The multi virtual device settings. If empty (not set), it will create
  784. /// single virtual device on each visible GPU, according to the settings
  785. /// in "visible_device_list" above. Otherwise, the number of elements in the
  786. /// list must be the same as the number of visible GPUs (after
  787. /// "visible_device_list" filtering if it is set), and the string represented
  788. /// device names (e.g. /device:GPU:&lt;id>) will refer to the virtual
  789. /// devices and have the &lt;id> field assigned sequentially starting from 0,
  790. /// according to the order of the virtual devices determined by
  791. /// device_ordinal and the location in the virtual device list.
  792. ///
  793. /// For example,
  794. /// visible_device_list = "1,0"
  795. /// virtual_devices { memory_limit: 1GB memory_limit: 2GB }
  796. /// virtual_devices { memory_limit: 3GB memory_limit: 4GB }
  797. /// will create 4 virtual devices as:
  798. /// /device:GPU:0 -> visible GPU 1 with 1GB memory
  799. /// /device:GPU:1 -> visible GPU 1 with 2GB memory
  800. /// /device:GPU:2 -> visible GPU 0 with 3GB memory
  801. /// /device:GPU:3 -> visible GPU 0 with 4GB memory
  802. ///
  803. /// but
  804. /// visible_device_list = "1,0"
  805. /// virtual_devices { memory_limit: 1GB memory_limit: 2GB
  806. /// device_ordinal: 10 device_ordinal: 20}
  807. /// virtual_devices { memory_limit: 3GB memory_limit: 4GB
  808. /// device_ordinal: 10 device_ordinal: 20}
  809. /// will create 4 virtual devices as:
  810. /// /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10)
  811. /// /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10)
  812. /// /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20)
  813. /// /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20)
  814. ///
  815. /// NOTE:
  816. /// 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
  817. /// at the same time.
  818. /// 2. Currently this setting is per-process, not per-session. Using
  819. /// different settings in different sessions within same process will
  820. /// result in undefined behavior.
  821. /// </summary>
  822. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  823. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  824. public pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> VirtualDevices {
  825. get { return virtualDevices_; }
  826. }
  827. /// <summary>Field number for the "use_unified_memory" field.</summary>
  828. public const int UseUnifiedMemoryFieldNumber = 2;
  829. private bool useUnifiedMemory_;
  830. /// <summary>
  831. /// If true, uses CUDA unified memory for memory allocations. If
  832. /// per_process_gpu_memory_fraction option is greater than 1.0, then unified
  833. /// memory is used regardless of the value for this field. See comments for
  834. /// per_process_gpu_memory_fraction field for more details and requirements
  835. /// of the unified memory. This option is useful to oversubscribe memory if
  836. /// multiple processes are sharing a single GPU while individually using less
  837. /// than 1.0 per process memory fraction.
  838. /// </summary>
  839. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  840. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  841. public bool UseUnifiedMemory {
  842. get { return useUnifiedMemory_; }
  843. set {
  844. useUnifiedMemory_ = value;
  845. }
  846. }
  847. /// <summary>Field number for the "num_dev_to_dev_copy_streams" field.</summary>
  848. public const int NumDevToDevCopyStreamsFieldNumber = 3;
  849. private int numDevToDevCopyStreams_;
  850. /// <summary>
  851. /// If > 1, the number of device-to-device copy streams to create
  852. /// for each GPUDevice. Default value is 0, which is automatically
  853. /// converted to 1.
  854. /// </summary>
  855. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  856. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  857. public int NumDevToDevCopyStreams {
  858. get { return numDevToDevCopyStreams_; }
  859. set {
  860. numDevToDevCopyStreams_ = value;
  861. }
  862. }
  863. /// <summary>Field number for the "collective_ring_order" field.</summary>
  864. public const int CollectiveRingOrderFieldNumber = 4;
  865. private string collectiveRingOrder_ = "";
  866. /// <summary>
  867. /// If non-empty, defines a good GPU ring order on a single worker based on
  868. /// device interconnect. This assumes that all workers have the same GPU
  869. /// topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
  870. /// This ring order is used by the RingReducer implementation of
  871. /// CollectiveReduce, and serves as an override to automatic ring order
  872. /// generation in OrderTaskDeviceMap() during CollectiveParam resolution.
  873. /// </summary>
  874. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  875. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  876. public string CollectiveRingOrder {
  877. get { return collectiveRingOrder_; }
  878. set {
  879. collectiveRingOrder_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  880. }
  881. }
  882. /// <summary>Field number for the "timestamped_allocator" field.</summary>
  883. public const int TimestampedAllocatorFieldNumber = 5;
  884. private bool timestampedAllocator_;
  885. /// <summary>
  886. /// If true then extra work is done by GPUDevice and GPUBFCAllocator to
  887. /// keep track of when GPU memory is freed and when kernels actually
  888. /// complete so that we can know when a nominally free memory chunk
  889. /// is really not subject to pending use.
  890. /// </summary>
  891. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  892. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  893. public bool TimestampedAllocator {
  894. get { return timestampedAllocator_; }
  895. set {
  896. timestampedAllocator_ = value;
  897. }
  898. }
  899. /// <summary>Field number for the "kernel_tracker_max_interval" field.</summary>
  900. public const int KernelTrackerMaxIntervalFieldNumber = 7;
  901. private int kernelTrackerMaxInterval_;
  902. /// <summary>
  903. /// Parameters for GPUKernelTracker. By default no kernel tracking is done.
  904. /// Note that timestamped_allocator is only effective if some tracking is
  905. /// specified.
  906. ///
  907. /// If kernel_tracker_max_interval = n > 0, then a tracking event
  908. /// is inserted after every n kernels without an event.
  909. /// </summary>
  910. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  911. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  912. public int KernelTrackerMaxInterval {
  913. get { return kernelTrackerMaxInterval_; }
  914. set {
  915. kernelTrackerMaxInterval_ = value;
  916. }
  917. }
  918. /// <summary>Field number for the "kernel_tracker_max_bytes" field.</summary>
  919. public const int KernelTrackerMaxBytesFieldNumber = 8;
  920. private int kernelTrackerMaxBytes_;
  921. /// <summary>
  922. /// If kernel_tracker_max_bytes = n > 0, then a tracking event is
  923. /// inserted after every series of kernels allocating a sum of
  924. /// memory >= n. If one kernel allocates b * n bytes, then one
  925. /// event will be inserted after it, but it will count as b against
  926. /// the pending limit.
  927. /// </summary>
  928. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  929. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  930. public int KernelTrackerMaxBytes {
  931. get { return kernelTrackerMaxBytes_; }
  932. set {
  933. kernelTrackerMaxBytes_ = value;
  934. }
  935. }
  936. /// <summary>Field number for the "kernel_tracker_max_pending" field.</summary>
  937. public const int KernelTrackerMaxPendingFieldNumber = 9;
  938. private int kernelTrackerMaxPending_;
  939. /// <summary>
  940. /// If kernel_tracker_max_pending > 0 then no more than this many
  941. /// tracking events can be outstanding at a time. An attempt to
  942. /// launch an additional kernel will stall until an event
  943. /// completes.
  944. /// </summary>
  945. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  946. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  947. public int KernelTrackerMaxPending {
  948. get { return kernelTrackerMaxPending_; }
  949. set {
  950. kernelTrackerMaxPending_ = value;
  951. }
  952. }
  953. /// <summary>Field number for the "internal_fragmentation_fraction" field.</summary>
  954. public const int InternalFragmentationFractionFieldNumber = 10;
  955. private double internalFragmentationFraction_;
  956. /// <summary>
  957. /// BFC Allocator can return an allocated chunk of memory upto 2x the
  958. /// requested size. For virtual devices with tight memory constraints, and
  959. /// proportionately large allocation requests, this can lead to a significant
  960. /// reduction in available memory. The threshold below controls when a chunk
  961. /// should be split if the chunk size exceeds requested memory size. It is
  962. /// expressed as a fraction of total available memory for the tf device. For
  963. /// example setting it to 0.05 would imply a chunk needs to be split if its
  964. /// size exceeds the requested memory by 5% of the total virtual device/gpu
  965. /// memory size.
  966. /// </summary>
  967. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  968. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  969. public double InternalFragmentationFraction {
  970. get { return internalFragmentationFraction_; }
  971. set {
  972. internalFragmentationFraction_ = value;
  973. }
  974. }
  975. /// <summary>Field number for the "use_cuda_malloc_async" field.</summary>
  976. public const int UseCudaMallocAsyncFieldNumber = 11;
  977. private bool useCudaMallocAsync_;
  978. /// <summary>
  979. /// When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.
  980. /// </summary>
  981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  982. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  983. public bool UseCudaMallocAsync {
  984. get { return useCudaMallocAsync_; }
  985. set {
  986. useCudaMallocAsync_ = value;
  987. }
  988. }
  989. /// <summary>Field number for the "disallow_retry_on_allocation_failure" field.</summary>
  990. public const int DisallowRetryOnAllocationFailureFieldNumber = 12;
  991. private bool disallowRetryOnAllocationFailure_;
  992. /// <summary>
  993. /// By default, BFCAllocator may sleep when it runs out of memory, in the
  994. /// hopes that another thread will free up memory in the meantime. Setting
  995. /// this to true disables the sleep; instead we'll OOM immediately.
  996. /// </summary>
  997. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  998. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  999. public bool DisallowRetryOnAllocationFailure {
  1000. get { return disallowRetryOnAllocationFailure_; }
  1001. set {
  1002. disallowRetryOnAllocationFailure_ = value;
  1003. }
  1004. }
  1005. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1006. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1007. public override bool Equals(object other) {
  1008. return Equals(other as Experimental);
  1009. }
  1010. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1011. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1012. public bool Equals(Experimental other) {
  1013. if (ReferenceEquals(other, null)) {
  1014. return false;
  1015. }
  1016. if (ReferenceEquals(other, this)) {
  1017. return true;
  1018. }
  1019. if(!virtualDevices_.Equals(other.virtualDevices_)) return false;
  1020. if (UseUnifiedMemory != other.UseUnifiedMemory) return false;
  1021. if (NumDevToDevCopyStreams != other.NumDevToDevCopyStreams) return false;
  1022. if (CollectiveRingOrder != other.CollectiveRingOrder) return false;
  1023. if (TimestampedAllocator != other.TimestampedAllocator) return false;
  1024. if (KernelTrackerMaxInterval != other.KernelTrackerMaxInterval) return false;
  1025. if (KernelTrackerMaxBytes != other.KernelTrackerMaxBytes) return false;
  1026. if (KernelTrackerMaxPending != other.KernelTrackerMaxPending) return false;
  1027. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(InternalFragmentationFraction, other.InternalFragmentationFraction)) return false;
  1028. if (UseCudaMallocAsync != other.UseCudaMallocAsync) return false;
  1029. if (DisallowRetryOnAllocationFailure != other.DisallowRetryOnAllocationFailure) return false;
  1030. return Equals(_unknownFields, other._unknownFields);
  1031. }
  1032. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1033. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1034. public override int GetHashCode() {
  1035. int hash = 1;
  1036. hash ^= virtualDevices_.GetHashCode();
  1037. if (UseUnifiedMemory != false) hash ^= UseUnifiedMemory.GetHashCode();
  1038. if (NumDevToDevCopyStreams != 0) hash ^= NumDevToDevCopyStreams.GetHashCode();
  1039. if (CollectiveRingOrder.Length != 0) hash ^= CollectiveRingOrder.GetHashCode();
  1040. if (TimestampedAllocator != false) hash ^= TimestampedAllocator.GetHashCode();
  1041. if (KernelTrackerMaxInterval != 0) hash ^= KernelTrackerMaxInterval.GetHashCode();
  1042. if (KernelTrackerMaxBytes != 0) hash ^= KernelTrackerMaxBytes.GetHashCode();
  1043. if (KernelTrackerMaxPending != 0) hash ^= KernelTrackerMaxPending.GetHashCode();
  1044. if (InternalFragmentationFraction != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(InternalFragmentationFraction);
  1045. if (UseCudaMallocAsync != false) hash ^= UseCudaMallocAsync.GetHashCode();
  1046. if (DisallowRetryOnAllocationFailure != false) hash ^= DisallowRetryOnAllocationFailure.GetHashCode();
  1047. if (_unknownFields != null) {
  1048. hash ^= _unknownFields.GetHashCode();
  1049. }
  1050. return hash;
  1051. }
  1052. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1053. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1054. public override string ToString() {
  1055. return pb::JsonFormatter.ToDiagnosticString(this);
  1056. }
  1057. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1058. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1059. public void WriteTo(pb::CodedOutputStream output) {
  1060. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1061. output.WriteRawMessage(this);
  1062. #else
  1063. virtualDevices_.WriteTo(output, _repeated_virtualDevices_codec);
  1064. if (UseUnifiedMemory != false) {
  1065. output.WriteRawTag(16);
  1066. output.WriteBool(UseUnifiedMemory);
  1067. }
  1068. if (NumDevToDevCopyStreams != 0) {
  1069. output.WriteRawTag(24);
  1070. output.WriteInt32(NumDevToDevCopyStreams);
  1071. }
  1072. if (CollectiveRingOrder.Length != 0) {
  1073. output.WriteRawTag(34);
  1074. output.WriteString(CollectiveRingOrder);
  1075. }
  1076. if (TimestampedAllocator != false) {
  1077. output.WriteRawTag(40);
  1078. output.WriteBool(TimestampedAllocator);
  1079. }
  1080. if (KernelTrackerMaxInterval != 0) {
  1081. output.WriteRawTag(56);
  1082. output.WriteInt32(KernelTrackerMaxInterval);
  1083. }
  1084. if (KernelTrackerMaxBytes != 0) {
  1085. output.WriteRawTag(64);
  1086. output.WriteInt32(KernelTrackerMaxBytes);
  1087. }
  1088. if (KernelTrackerMaxPending != 0) {
  1089. output.WriteRawTag(72);
  1090. output.WriteInt32(KernelTrackerMaxPending);
  1091. }
  1092. if (InternalFragmentationFraction != 0D) {
  1093. output.WriteRawTag(81);
  1094. output.WriteDouble(InternalFragmentationFraction);
  1095. }
  1096. if (UseCudaMallocAsync != false) {
  1097. output.WriteRawTag(88);
  1098. output.WriteBool(UseCudaMallocAsync);
  1099. }
  1100. if (DisallowRetryOnAllocationFailure != false) {
  1101. output.WriteRawTag(96);
  1102. output.WriteBool(DisallowRetryOnAllocationFailure);
  1103. }
  1104. if (_unknownFields != null) {
  1105. _unknownFields.WriteTo(output);
  1106. }
  1107. #endif
  1108. }
  1109. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1110. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1111. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1112. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1113. virtualDevices_.WriteTo(ref output, _repeated_virtualDevices_codec);
  1114. if (UseUnifiedMemory != false) {
  1115. output.WriteRawTag(16);
  1116. output.WriteBool(UseUnifiedMemory);
  1117. }
  1118. if (NumDevToDevCopyStreams != 0) {
  1119. output.WriteRawTag(24);
  1120. output.WriteInt32(NumDevToDevCopyStreams);
  1121. }
  1122. if (CollectiveRingOrder.Length != 0) {
  1123. output.WriteRawTag(34);
  1124. output.WriteString(CollectiveRingOrder);
  1125. }
  1126. if (TimestampedAllocator != false) {
  1127. output.WriteRawTag(40);
  1128. output.WriteBool(TimestampedAllocator);
  1129. }
  1130. if (KernelTrackerMaxInterval != 0) {
  1131. output.WriteRawTag(56);
  1132. output.WriteInt32(KernelTrackerMaxInterval);
  1133. }
  1134. if (KernelTrackerMaxBytes != 0) {
  1135. output.WriteRawTag(64);
  1136. output.WriteInt32(KernelTrackerMaxBytes);
  1137. }
  1138. if (KernelTrackerMaxPending != 0) {
  1139. output.WriteRawTag(72);
  1140. output.WriteInt32(KernelTrackerMaxPending);
  1141. }
  1142. if (InternalFragmentationFraction != 0D) {
  1143. output.WriteRawTag(81);
  1144. output.WriteDouble(InternalFragmentationFraction);
  1145. }
  1146. if (UseCudaMallocAsync != false) {
  1147. output.WriteRawTag(88);
  1148. output.WriteBool(UseCudaMallocAsync);
  1149. }
  1150. if (DisallowRetryOnAllocationFailure != false) {
  1151. output.WriteRawTag(96);
  1152. output.WriteBool(DisallowRetryOnAllocationFailure);
  1153. }
  1154. if (_unknownFields != null) {
  1155. _unknownFields.WriteTo(ref output);
  1156. }
  1157. }
  1158. #endif
  1159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1160. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1161. public int CalculateSize() {
  1162. int size = 0;
  1163. size += virtualDevices_.CalculateSize(_repeated_virtualDevices_codec);
  1164. if (UseUnifiedMemory != false) {
  1165. size += 1 + 1;
  1166. }
  1167. if (NumDevToDevCopyStreams != 0) {
  1168. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumDevToDevCopyStreams);
  1169. }
  1170. if (CollectiveRingOrder.Length != 0) {
  1171. size += 1 + pb::CodedOutputStream.ComputeStringSize(CollectiveRingOrder);
  1172. }
  1173. if (TimestampedAllocator != false) {
  1174. size += 1 + 1;
  1175. }
  1176. if (KernelTrackerMaxInterval != 0) {
  1177. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxInterval);
  1178. }
  1179. if (KernelTrackerMaxBytes != 0) {
  1180. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxBytes);
  1181. }
  1182. if (KernelTrackerMaxPending != 0) {
  1183. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxPending);
  1184. }
  1185. if (InternalFragmentationFraction != 0D) {
  1186. size += 1 + 8;
  1187. }
  1188. if (UseCudaMallocAsync != false) {
  1189. size += 1 + 1;
  1190. }
  1191. if (DisallowRetryOnAllocationFailure != false) {
  1192. size += 1 + 1;
  1193. }
  1194. if (_unknownFields != null) {
  1195. size += _unknownFields.CalculateSize();
  1196. }
  1197. return size;
  1198. }
  1199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1200. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1201. public void MergeFrom(Experimental other) {
  1202. if (other == null) {
  1203. return;
  1204. }
  1205. virtualDevices_.Add(other.virtualDevices_);
  1206. if (other.UseUnifiedMemory != false) {
  1207. UseUnifiedMemory = other.UseUnifiedMemory;
  1208. }
  1209. if (other.NumDevToDevCopyStreams != 0) {
  1210. NumDevToDevCopyStreams = other.NumDevToDevCopyStreams;
  1211. }
  1212. if (other.CollectiveRingOrder.Length != 0) {
  1213. CollectiveRingOrder = other.CollectiveRingOrder;
  1214. }
  1215. if (other.TimestampedAllocator != false) {
  1216. TimestampedAllocator = other.TimestampedAllocator;
  1217. }
  1218. if (other.KernelTrackerMaxInterval != 0) {
  1219. KernelTrackerMaxInterval = other.KernelTrackerMaxInterval;
  1220. }
  1221. if (other.KernelTrackerMaxBytes != 0) {
  1222. KernelTrackerMaxBytes = other.KernelTrackerMaxBytes;
  1223. }
  1224. if (other.KernelTrackerMaxPending != 0) {
  1225. KernelTrackerMaxPending = other.KernelTrackerMaxPending;
  1226. }
  1227. if (other.InternalFragmentationFraction != 0D) {
  1228. InternalFragmentationFraction = other.InternalFragmentationFraction;
  1229. }
  1230. if (other.UseCudaMallocAsync != false) {
  1231. UseCudaMallocAsync = other.UseCudaMallocAsync;
  1232. }
  1233. if (other.DisallowRetryOnAllocationFailure != false) {
  1234. DisallowRetryOnAllocationFailure = other.DisallowRetryOnAllocationFailure;
  1235. }
  1236. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1237. }
  1238. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1239. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1240. public void MergeFrom(pb::CodedInputStream input) {
  1241. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1242. input.ReadRawMessage(this);
  1243. #else
  1244. uint tag;
  1245. while ((tag = input.ReadTag()) != 0) {
  1246. switch(tag) {
  1247. default:
  1248. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1249. break;
  1250. case 10: {
  1251. virtualDevices_.AddEntriesFrom(input, _repeated_virtualDevices_codec);
  1252. break;
  1253. }
  1254. case 16: {
  1255. UseUnifiedMemory = input.ReadBool();
  1256. break;
  1257. }
  1258. case 24: {
  1259. NumDevToDevCopyStreams = input.ReadInt32();
  1260. break;
  1261. }
  1262. case 34: {
  1263. CollectiveRingOrder = input.ReadString();
  1264. break;
  1265. }
  1266. case 40: {
  1267. TimestampedAllocator = input.ReadBool();
  1268. break;
  1269. }
  1270. case 56: {
  1271. KernelTrackerMaxInterval = input.ReadInt32();
  1272. break;
  1273. }
  1274. case 64: {
  1275. KernelTrackerMaxBytes = input.ReadInt32();
  1276. break;
  1277. }
  1278. case 72: {
  1279. KernelTrackerMaxPending = input.ReadInt32();
  1280. break;
  1281. }
  1282. case 81: {
  1283. InternalFragmentationFraction = input.ReadDouble();
  1284. break;
  1285. }
  1286. case 88: {
  1287. UseCudaMallocAsync = input.ReadBool();
  1288. break;
  1289. }
  1290. case 96: {
  1291. DisallowRetryOnAllocationFailure = input.ReadBool();
  1292. break;
  1293. }
  1294. }
  1295. }
  1296. #endif
  1297. }
  1298. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1300. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1301. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1302. uint tag;
  1303. while ((tag = input.ReadTag()) != 0) {
  1304. switch(tag) {
  1305. default:
  1306. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1307. break;
  1308. case 10: {
  1309. virtualDevices_.AddEntriesFrom(ref input, _repeated_virtualDevices_codec);
  1310. break;
  1311. }
  1312. case 16: {
  1313. UseUnifiedMemory = input.ReadBool();
  1314. break;
  1315. }
  1316. case 24: {
  1317. NumDevToDevCopyStreams = input.ReadInt32();
  1318. break;
  1319. }
  1320. case 34: {
  1321. CollectiveRingOrder = input.ReadString();
  1322. break;
  1323. }
  1324. case 40: {
  1325. TimestampedAllocator = input.ReadBool();
  1326. break;
  1327. }
  1328. case 56: {
  1329. KernelTrackerMaxInterval = input.ReadInt32();
  1330. break;
  1331. }
  1332. case 64: {
  1333. KernelTrackerMaxBytes = input.ReadInt32();
  1334. break;
  1335. }
  1336. case 72: {
  1337. KernelTrackerMaxPending = input.ReadInt32();
  1338. break;
  1339. }
  1340. case 81: {
  1341. InternalFragmentationFraction = input.ReadDouble();
  1342. break;
  1343. }
  1344. case 88: {
  1345. UseCudaMallocAsync = input.ReadBool();
  1346. break;
  1347. }
  1348. case 96: {
  1349. DisallowRetryOnAllocationFailure = input.ReadBool();
  1350. break;
  1351. }
  1352. }
  1353. }
  1354. }
  1355. #endif
  1356. #region Nested types
  1357. /// <summary>Container for nested types declared in the Experimental message type.</summary>
  1358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1359. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1360. public static partial class Types {
  1361. /// <summary>
  1362. /// Configuration for breaking down a visible GPU into multiple "virtual"
  1363. /// devices.
  1364. /// </summary>
  1365. public sealed partial class VirtualDevices : pb::IMessage<VirtualDevices>
  1366. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1367. , pb::IBufferMessage
  1368. #endif
  1369. {
  1370. private static readonly pb::MessageParser<VirtualDevices> _parser = new pb::MessageParser<VirtualDevices>(() => new VirtualDevices());
  1371. private pb::UnknownFieldSet _unknownFields;
  1372. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1373. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1374. public static pb::MessageParser<VirtualDevices> Parser { get { return _parser; } }
  1375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1376. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1377. public static pbr::MessageDescriptor Descriptor {
  1378. get { return global::Tensorflow.GPUOptions.Types.Experimental.Descriptor.NestedTypes[0]; }
  1379. }
  1380. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1381. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1382. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1383. get { return Descriptor; }
  1384. }
  1385. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1386. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1387. public VirtualDevices() {
  1388. OnConstruction();
  1389. }
  1390. partial void OnConstruction();
  1391. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1392. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1393. public VirtualDevices(VirtualDevices other) : this() {
  1394. memoryLimitMb_ = other.memoryLimitMb_.Clone();
  1395. priority_ = other.priority_.Clone();
  1396. deviceOrdinal_ = other.deviceOrdinal_.Clone();
  1397. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1398. }
  1399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1400. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1401. public VirtualDevices Clone() {
  1402. return new VirtualDevices(this);
  1403. }
  1404. /// <summary>Field number for the "memory_limit_mb" field.</summary>
  1405. public const int MemoryLimitMbFieldNumber = 1;
  1406. private static readonly pb::FieldCodec<float> _repeated_memoryLimitMb_codec
  1407. = pb::FieldCodec.ForFloat(10);
  1408. private readonly pbc::RepeatedField<float> memoryLimitMb_ = new pbc::RepeatedField<float>();
  1409. /// <summary>
  1410. /// Per "virtual" device memory limit, in MB. The number of elements in
  1411. /// the list is the number of virtual devices to create on the
  1412. /// corresponding visible GPU (see "virtual_devices" below).
  1413. /// If empty, it will create single virtual device taking all available
  1414. /// memory from the device.
  1415. ///
  1416. /// For the concept of "visible" and "virtual" GPU, see the comments for
  1417. /// "visible_device_list" above for more information.
  1418. /// </summary>
  1419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1420. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1421. public pbc::RepeatedField<float> MemoryLimitMb {
  1422. get { return memoryLimitMb_; }
  1423. }
  1424. /// <summary>Field number for the "priority" field.</summary>
  1425. public const int PriorityFieldNumber = 2;
  1426. private static readonly pb::FieldCodec<int> _repeated_priority_codec
  1427. = pb::FieldCodec.ForInt32(18);
  1428. private readonly pbc::RepeatedField<int> priority_ = new pbc::RepeatedField<int>();
  1429. /// <summary>
  1430. /// Priority values to use with the virtual devices. Use the cuda function
  1431. /// cudaDeviceGetStreamPriorityRange to query for valid range of values for
  1432. /// priority.
  1433. ///
  1434. /// On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
  1435. /// least priority and -1 for greatest priority.
  1436. ///
  1437. /// If this field is not specified, then the virtual devices will be
  1438. /// created with the default. If this field has values set, then the size
  1439. /// of this must match with the above memory_limit_mb.
  1440. /// </summary>
  1441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1442. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1443. public pbc::RepeatedField<int> Priority {
  1444. get { return priority_; }
  1445. }
  1446. /// <summary>Field number for the "device_ordinal" field.</summary>
  1447. public const int DeviceOrdinalFieldNumber = 3;
  1448. private static readonly pb::FieldCodec<int> _repeated_deviceOrdinal_codec
  1449. = pb::FieldCodec.ForInt32(26);
  1450. private readonly pbc::RepeatedField<int> deviceOrdinal_ = new pbc::RepeatedField<int>();
  1451. /// <summary>
  1452. /// Virtual Device ordinal number determines the device ID of the device.
  1453. /// A Virtual device with a lower ordinal number always receives the a
  1454. /// smaller device id. The phyiscal device id and location in the
  1455. /// virtual device list is used to break ties.
  1456. /// </summary>
  1457. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1458. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1459. public pbc::RepeatedField<int> DeviceOrdinal {
  1460. get { return deviceOrdinal_; }
  1461. }
  1462. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1463. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1464. public override bool Equals(object other) {
  1465. return Equals(other as VirtualDevices);
  1466. }
  1467. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1468. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1469. public bool Equals(VirtualDevices other) {
  1470. if (ReferenceEquals(other, null)) {
  1471. return false;
  1472. }
  1473. if (ReferenceEquals(other, this)) {
  1474. return true;
  1475. }
  1476. if(!memoryLimitMb_.Equals(other.memoryLimitMb_)) return false;
  1477. if(!priority_.Equals(other.priority_)) return false;
  1478. if(!deviceOrdinal_.Equals(other.deviceOrdinal_)) return false;
  1479. return Equals(_unknownFields, other._unknownFields);
  1480. }
  1481. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1482. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1483. public override int GetHashCode() {
  1484. int hash = 1;
  1485. hash ^= memoryLimitMb_.GetHashCode();
  1486. hash ^= priority_.GetHashCode();
  1487. hash ^= deviceOrdinal_.GetHashCode();
  1488. if (_unknownFields != null) {
  1489. hash ^= _unknownFields.GetHashCode();
  1490. }
  1491. return hash;
  1492. }
  1493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1494. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1495. public override string ToString() {
  1496. return pb::JsonFormatter.ToDiagnosticString(this);
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1499. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1500. public void WriteTo(pb::CodedOutputStream output) {
  1501. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1502. output.WriteRawMessage(this);
  1503. #else
  1504. memoryLimitMb_.WriteTo(output, _repeated_memoryLimitMb_codec);
  1505. priority_.WriteTo(output, _repeated_priority_codec);
  1506. deviceOrdinal_.WriteTo(output, _repeated_deviceOrdinal_codec);
  1507. if (_unknownFields != null) {
  1508. _unknownFields.WriteTo(output);
  1509. }
  1510. #endif
  1511. }
  1512. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1513. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1514. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1515. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1516. memoryLimitMb_.WriteTo(ref output, _repeated_memoryLimitMb_codec);
  1517. priority_.WriteTo(ref output, _repeated_priority_codec);
  1518. deviceOrdinal_.WriteTo(ref output, _repeated_deviceOrdinal_codec);
  1519. if (_unknownFields != null) {
  1520. _unknownFields.WriteTo(ref output);
  1521. }
  1522. }
  1523. #endif
  1524. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1525. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1526. public int CalculateSize() {
  1527. int size = 0;
  1528. size += memoryLimitMb_.CalculateSize(_repeated_memoryLimitMb_codec);
  1529. size += priority_.CalculateSize(_repeated_priority_codec);
  1530. size += deviceOrdinal_.CalculateSize(_repeated_deviceOrdinal_codec);
  1531. if (_unknownFields != null) {
  1532. size += _unknownFields.CalculateSize();
  1533. }
  1534. return size;
  1535. }
  1536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1537. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1538. public void MergeFrom(VirtualDevices other) {
  1539. if (other == null) {
  1540. return;
  1541. }
  1542. memoryLimitMb_.Add(other.memoryLimitMb_);
  1543. priority_.Add(other.priority_);
  1544. deviceOrdinal_.Add(other.deviceOrdinal_);
  1545. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1546. }
  1547. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1548. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1549. public void MergeFrom(pb::CodedInputStream input) {
  1550. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1551. input.ReadRawMessage(this);
  1552. #else
  1553. uint tag;
  1554. while ((tag = input.ReadTag()) != 0) {
  1555. switch(tag) {
  1556. default:
  1557. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1558. break;
  1559. case 10:
  1560. case 13: {
  1561. memoryLimitMb_.AddEntriesFrom(input, _repeated_memoryLimitMb_codec);
  1562. break;
  1563. }
  1564. case 18:
  1565. case 16: {
  1566. priority_.AddEntriesFrom(input, _repeated_priority_codec);
  1567. break;
  1568. }
  1569. case 26:
  1570. case 24: {
  1571. deviceOrdinal_.AddEntriesFrom(input, _repeated_deviceOrdinal_codec);
  1572. break;
  1573. }
  1574. }
  1575. }
  1576. #endif
  1577. }
  1578. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1579. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1580. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1581. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1582. uint tag;
  1583. while ((tag = input.ReadTag()) != 0) {
  1584. switch(tag) {
  1585. default:
  1586. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1587. break;
  1588. case 10:
  1589. case 13: {
  1590. memoryLimitMb_.AddEntriesFrom(ref input, _repeated_memoryLimitMb_codec);
  1591. break;
  1592. }
  1593. case 18:
  1594. case 16: {
  1595. priority_.AddEntriesFrom(ref input, _repeated_priority_codec);
  1596. break;
  1597. }
  1598. case 26:
  1599. case 24: {
  1600. deviceOrdinal_.AddEntriesFrom(ref input, _repeated_deviceOrdinal_codec);
  1601. break;
  1602. }
  1603. }
  1604. }
  1605. }
  1606. #endif
  1607. }
  1608. }
  1609. #endregion
  1610. }
  1611. }
  1612. #endregion
  1613. }
  1614. /// <summary>
  1615. /// Options passed to the graph optimizer
  1616. /// </summary>
  1617. public sealed partial class OptimizerOptions : pb::IMessage<OptimizerOptions>
  1618. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1619. , pb::IBufferMessage
  1620. #endif
  1621. {
  1622. private static readonly pb::MessageParser<OptimizerOptions> _parser = new pb::MessageParser<OptimizerOptions>(() => new OptimizerOptions());
  1623. private pb::UnknownFieldSet _unknownFields;
  1624. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1625. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1626. public static pb::MessageParser<OptimizerOptions> Parser { get { return _parser; } }
  1627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1628. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1629. public static pbr::MessageDescriptor Descriptor {
  1630. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[1]; }
  1631. }
  1632. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1633. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1634. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1635. get { return Descriptor; }
  1636. }
  1637. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1638. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1639. public OptimizerOptions() {
  1640. OnConstruction();
  1641. }
  1642. partial void OnConstruction();
  1643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1644. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1645. public OptimizerOptions(OptimizerOptions other) : this() {
  1646. doCommonSubexpressionElimination_ = other.doCommonSubexpressionElimination_;
  1647. doConstantFolding_ = other.doConstantFolding_;
  1648. maxFoldedConstantInBytes_ = other.maxFoldedConstantInBytes_;
  1649. doFunctionInlining_ = other.doFunctionInlining_;
  1650. optLevel_ = other.optLevel_;
  1651. globalJitLevel_ = other.globalJitLevel_;
  1652. cpuGlobalJit_ = other.cpuGlobalJit_;
  1653. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1654. }
  1655. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1656. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1657. public OptimizerOptions Clone() {
  1658. return new OptimizerOptions(this);
  1659. }
  1660. /// <summary>Field number for the "do_common_subexpression_elimination" field.</summary>
  1661. public const int DoCommonSubexpressionEliminationFieldNumber = 1;
  1662. private bool doCommonSubexpressionElimination_;
  1663. /// <summary>
  1664. /// If true, optimize the graph using common subexpression elimination.
  1665. /// Note: the optimization Level L1 will override this setting to true. So in
  1666. /// order to disable common subexpression elimination the opt_level has to be
  1667. /// set to L0.
  1668. /// </summary>
  1669. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1670. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1671. public bool DoCommonSubexpressionElimination {
  1672. get { return doCommonSubexpressionElimination_; }
  1673. set {
  1674. doCommonSubexpressionElimination_ = value;
  1675. }
  1676. }
  1677. /// <summary>Field number for the "do_constant_folding" field.</summary>
  1678. public const int DoConstantFoldingFieldNumber = 2;
  1679. private bool doConstantFolding_;
  1680. /// <summary>
  1681. /// If true, perform constant folding optimization on the graph.
  1682. /// Note: the optimization Level L1 will override this setting to true. So in
  1683. /// order to disable constant folding the opt_level has to be set to L0.
  1684. /// </summary>
  1685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1686. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1687. public bool DoConstantFolding {
  1688. get { return doConstantFolding_; }
  1689. set {
  1690. doConstantFolding_ = value;
  1691. }
  1692. }
  1693. /// <summary>Field number for the "max_folded_constant_in_bytes" field.</summary>
  1694. public const int MaxFoldedConstantInBytesFieldNumber = 6;
  1695. private long maxFoldedConstantInBytes_;
  1696. /// <summary>
  1697. /// Constant folding optimization replaces tensors whose values can be
  1698. /// predetermined, with constant nodes. To avoid inserting too large constants,
  1699. /// the size of each constant created can be limited. If this value is zero, a
  1700. /// default limit of 10 MiB will be applied. If constant folding optimization
  1701. /// is disabled, this value is ignored.
  1702. /// </summary>
  1703. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1704. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1705. public long MaxFoldedConstantInBytes {
  1706. get { return maxFoldedConstantInBytes_; }
  1707. set {
  1708. maxFoldedConstantInBytes_ = value;
  1709. }
  1710. }
  1711. /// <summary>Field number for the "do_function_inlining" field.</summary>
  1712. public const int DoFunctionInliningFieldNumber = 4;
  1713. private bool doFunctionInlining_;
  1714. /// <summary>
  1715. /// If true, perform function inlining on the graph.
  1716. /// </summary>
  1717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1718. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1719. public bool DoFunctionInlining {
  1720. get { return doFunctionInlining_; }
  1721. set {
  1722. doFunctionInlining_ = value;
  1723. }
  1724. }
  1725. /// <summary>Field number for the "opt_level" field.</summary>
  1726. public const int OptLevelFieldNumber = 3;
  1727. private global::Tensorflow.OptimizerOptions.Types.Level optLevel_ = global::Tensorflow.OptimizerOptions.Types.Level.L1;
  1728. /// <summary>
  1729. /// Overall optimization level. The actual optimizations applied will be the
  1730. /// logical OR of the flags that this level implies and any flags already set.
  1731. /// </summary>
  1732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1733. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1734. public global::Tensorflow.OptimizerOptions.Types.Level OptLevel {
  1735. get { return optLevel_; }
  1736. set {
  1737. optLevel_ = value;
  1738. }
  1739. }
  1740. /// <summary>Field number for the "global_jit_level" field.</summary>
  1741. public const int GlobalJitLevelFieldNumber = 5;
  1742. private global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel globalJitLevel_ = global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default;
  1743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1744. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1745. public global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel GlobalJitLevel {
  1746. get { return globalJitLevel_; }
  1747. set {
  1748. globalJitLevel_ = value;
  1749. }
  1750. }
  1751. /// <summary>Field number for the "cpu_global_jit" field.</summary>
  1752. public const int CpuGlobalJitFieldNumber = 7;
  1753. private bool cpuGlobalJit_;
  1754. /// <summary>
  1755. /// CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
  1756. /// - this flag is true, or
  1757. /// - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
  1758. /// </summary>
  1759. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1760. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1761. public bool CpuGlobalJit {
  1762. get { return cpuGlobalJit_; }
  1763. set {
  1764. cpuGlobalJit_ = value;
  1765. }
  1766. }
  1767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1768. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1769. public override bool Equals(object other) {
  1770. return Equals(other as OptimizerOptions);
  1771. }
  1772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1773. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1774. public bool Equals(OptimizerOptions other) {
  1775. if (ReferenceEquals(other, null)) {
  1776. return false;
  1777. }
  1778. if (ReferenceEquals(other, this)) {
  1779. return true;
  1780. }
  1781. if (DoCommonSubexpressionElimination != other.DoCommonSubexpressionElimination) return false;
  1782. if (DoConstantFolding != other.DoConstantFolding) return false;
  1783. if (MaxFoldedConstantInBytes != other.MaxFoldedConstantInBytes) return false;
  1784. if (DoFunctionInlining != other.DoFunctionInlining) return false;
  1785. if (OptLevel != other.OptLevel) return false;
  1786. if (GlobalJitLevel != other.GlobalJitLevel) return false;
  1787. if (CpuGlobalJit != other.CpuGlobalJit) return false;
  1788. return Equals(_unknownFields, other._unknownFields);
  1789. }
  1790. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1791. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1792. public override int GetHashCode() {
  1793. int hash = 1;
  1794. if (DoCommonSubexpressionElimination != false) hash ^= DoCommonSubexpressionElimination.GetHashCode();
  1795. if (DoConstantFolding != false) hash ^= DoConstantFolding.GetHashCode();
  1796. if (MaxFoldedConstantInBytes != 0L) hash ^= MaxFoldedConstantInBytes.GetHashCode();
  1797. if (DoFunctionInlining != false) hash ^= DoFunctionInlining.GetHashCode();
  1798. if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) hash ^= OptLevel.GetHashCode();
  1799. if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) hash ^= GlobalJitLevel.GetHashCode();
  1800. if (CpuGlobalJit != false) hash ^= CpuGlobalJit.GetHashCode();
  1801. if (_unknownFields != null) {
  1802. hash ^= _unknownFields.GetHashCode();
  1803. }
  1804. return hash;
  1805. }
  1806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1807. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1808. public override string ToString() {
  1809. return pb::JsonFormatter.ToDiagnosticString(this);
  1810. }
  1811. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1812. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1813. public void WriteTo(pb::CodedOutputStream output) {
  1814. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1815. output.WriteRawMessage(this);
  1816. #else
  1817. if (DoCommonSubexpressionElimination != false) {
  1818. output.WriteRawTag(8);
  1819. output.WriteBool(DoCommonSubexpressionElimination);
  1820. }
  1821. if (DoConstantFolding != false) {
  1822. output.WriteRawTag(16);
  1823. output.WriteBool(DoConstantFolding);
  1824. }
  1825. if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) {
  1826. output.WriteRawTag(24);
  1827. output.WriteEnum((int) OptLevel);
  1828. }
  1829. if (DoFunctionInlining != false) {
  1830. output.WriteRawTag(32);
  1831. output.WriteBool(DoFunctionInlining);
  1832. }
  1833. if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) {
  1834. output.WriteRawTag(40);
  1835. output.WriteEnum((int) GlobalJitLevel);
  1836. }
  1837. if (MaxFoldedConstantInBytes != 0L) {
  1838. output.WriteRawTag(48);
  1839. output.WriteInt64(MaxFoldedConstantInBytes);
  1840. }
  1841. if (CpuGlobalJit != false) {
  1842. output.WriteRawTag(56);
  1843. output.WriteBool(CpuGlobalJit);
  1844. }
  1845. if (_unknownFields != null) {
  1846. _unknownFields.WriteTo(output);
  1847. }
  1848. #endif
  1849. }
  1850. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1851. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1852. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1853. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1854. if (DoCommonSubexpressionElimination != false) {
  1855. output.WriteRawTag(8);
  1856. output.WriteBool(DoCommonSubexpressionElimination);
  1857. }
  1858. if (DoConstantFolding != false) {
  1859. output.WriteRawTag(16);
  1860. output.WriteBool(DoConstantFolding);
  1861. }
  1862. if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) {
  1863. output.WriteRawTag(24);
  1864. output.WriteEnum((int) OptLevel);
  1865. }
  1866. if (DoFunctionInlining != false) {
  1867. output.WriteRawTag(32);
  1868. output.WriteBool(DoFunctionInlining);
  1869. }
  1870. if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) {
  1871. output.WriteRawTag(40);
  1872. output.WriteEnum((int) GlobalJitLevel);
  1873. }
  1874. if (MaxFoldedConstantInBytes != 0L) {
  1875. output.WriteRawTag(48);
  1876. output.WriteInt64(MaxFoldedConstantInBytes);
  1877. }
  1878. if (CpuGlobalJit != false) {
  1879. output.WriteRawTag(56);
  1880. output.WriteBool(CpuGlobalJit);
  1881. }
  1882. if (_unknownFields != null) {
  1883. _unknownFields.WriteTo(ref output);
  1884. }
  1885. }
  1886. #endif
  1887. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1888. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1889. public int CalculateSize() {
  1890. int size = 0;
  1891. if (DoCommonSubexpressionElimination != false) {
  1892. size += 1 + 1;
  1893. }
  1894. if (DoConstantFolding != false) {
  1895. size += 1 + 1;
  1896. }
  1897. if (MaxFoldedConstantInBytes != 0L) {
  1898. size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxFoldedConstantInBytes);
  1899. }
  1900. if (DoFunctionInlining != false) {
  1901. size += 1 + 1;
  1902. }
  1903. if (OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) {
  1904. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptLevel);
  1905. }
  1906. if (GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) {
  1907. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GlobalJitLevel);
  1908. }
  1909. if (CpuGlobalJit != false) {
  1910. size += 1 + 1;
  1911. }
  1912. if (_unknownFields != null) {
  1913. size += _unknownFields.CalculateSize();
  1914. }
  1915. return size;
  1916. }
  1917. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1918. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1919. public void MergeFrom(OptimizerOptions other) {
  1920. if (other == null) {
  1921. return;
  1922. }
  1923. if (other.DoCommonSubexpressionElimination != false) {
  1924. DoCommonSubexpressionElimination = other.DoCommonSubexpressionElimination;
  1925. }
  1926. if (other.DoConstantFolding != false) {
  1927. DoConstantFolding = other.DoConstantFolding;
  1928. }
  1929. if (other.MaxFoldedConstantInBytes != 0L) {
  1930. MaxFoldedConstantInBytes = other.MaxFoldedConstantInBytes;
  1931. }
  1932. if (other.DoFunctionInlining != false) {
  1933. DoFunctionInlining = other.DoFunctionInlining;
  1934. }
  1935. if (other.OptLevel != global::Tensorflow.OptimizerOptions.Types.Level.L1) {
  1936. OptLevel = other.OptLevel;
  1937. }
  1938. if (other.GlobalJitLevel != global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel.Default) {
  1939. GlobalJitLevel = other.GlobalJitLevel;
  1940. }
  1941. if (other.CpuGlobalJit != false) {
  1942. CpuGlobalJit = other.CpuGlobalJit;
  1943. }
  1944. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1945. }
  1946. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1947. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1948. public void MergeFrom(pb::CodedInputStream input) {
  1949. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1950. input.ReadRawMessage(this);
  1951. #else
  1952. uint tag;
  1953. while ((tag = input.ReadTag()) != 0) {
  1954. switch(tag) {
  1955. default:
  1956. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1957. break;
  1958. case 8: {
  1959. DoCommonSubexpressionElimination = input.ReadBool();
  1960. break;
  1961. }
  1962. case 16: {
  1963. DoConstantFolding = input.ReadBool();
  1964. break;
  1965. }
  1966. case 24: {
  1967. OptLevel = (global::Tensorflow.OptimizerOptions.Types.Level) input.ReadEnum();
  1968. break;
  1969. }
  1970. case 32: {
  1971. DoFunctionInlining = input.ReadBool();
  1972. break;
  1973. }
  1974. case 40: {
  1975. GlobalJitLevel = (global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) input.ReadEnum();
  1976. break;
  1977. }
  1978. case 48: {
  1979. MaxFoldedConstantInBytes = input.ReadInt64();
  1980. break;
  1981. }
  1982. case 56: {
  1983. CpuGlobalJit = input.ReadBool();
  1984. break;
  1985. }
  1986. }
  1987. }
  1988. #endif
  1989. }
  1990. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1992. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1993. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1994. uint tag;
  1995. while ((tag = input.ReadTag()) != 0) {
  1996. switch(tag) {
  1997. default:
  1998. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1999. break;
  2000. case 8: {
  2001. DoCommonSubexpressionElimination = input.ReadBool();
  2002. break;
  2003. }
  2004. case 16: {
  2005. DoConstantFolding = input.ReadBool();
  2006. break;
  2007. }
  2008. case 24: {
  2009. OptLevel = (global::Tensorflow.OptimizerOptions.Types.Level) input.ReadEnum();
  2010. break;
  2011. }
  2012. case 32: {
  2013. DoFunctionInlining = input.ReadBool();
  2014. break;
  2015. }
  2016. case 40: {
  2017. GlobalJitLevel = (global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) input.ReadEnum();
  2018. break;
  2019. }
  2020. case 48: {
  2021. MaxFoldedConstantInBytes = input.ReadInt64();
  2022. break;
  2023. }
  2024. case 56: {
  2025. CpuGlobalJit = input.ReadBool();
  2026. break;
  2027. }
  2028. }
  2029. }
  2030. }
  2031. #endif
  2032. #region Nested types
  2033. /// <summary>Container for nested types declared in the OptimizerOptions message type.</summary>
  2034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2035. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2036. public static partial class Types {
  2037. /// <summary>
  2038. /// Optimization level
  2039. /// </summary>
  2040. public enum Level {
  2041. /// <summary>
  2042. /// L1 is the default level.
  2043. /// Optimization performed at L1 :
  2044. /// 1. Common subexpression elimination
  2045. /// 2. Constant folding
  2046. /// </summary>
  2047. [pbr::OriginalName("L1")] L1 = 0,
  2048. /// <summary>
  2049. /// No optimizations
  2050. /// </summary>
  2051. [pbr::OriginalName("L0")] L0 = -1,
  2052. }
  2053. /// <summary>
  2054. /// Control the use of the compiler/jit. Experimental.
  2055. /// </summary>
  2056. public enum GlobalJitLevel {
  2057. /// <summary>
  2058. /// Default setting ("off" now, but later expected to be "on")
  2059. /// </summary>
  2060. [pbr::OriginalName("DEFAULT")] Default = 0,
  2061. [pbr::OriginalName("OFF")] Off = -1,
  2062. /// <summary>
  2063. /// The following settings turn on compilation, with higher values being
  2064. /// more aggressive. Higher values may reduce opportunities for parallelism
  2065. /// and may use more memory. (At present, there is no distinction, but this
  2066. /// is expected to change.)
  2067. /// </summary>
  2068. [pbr::OriginalName("ON_1")] On1 = 1,
  2069. [pbr::OriginalName("ON_2")] On2 = 2,
  2070. }
  2071. }
  2072. #endregion
  2073. }
  2074. public sealed partial class GraphOptions : pb::IMessage<GraphOptions>
  2075. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2076. , pb::IBufferMessage
  2077. #endif
  2078. {
  2079. private static readonly pb::MessageParser<GraphOptions> _parser = new pb::MessageParser<GraphOptions>(() => new GraphOptions());
  2080. private pb::UnknownFieldSet _unknownFields;
  2081. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2082. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2083. public static pb::MessageParser<GraphOptions> Parser { get { return _parser; } }
  2084. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2085. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2086. public static pbr::MessageDescriptor Descriptor {
  2087. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[2]; }
  2088. }
  2089. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2090. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2091. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2092. get { return Descriptor; }
  2093. }
  2094. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2095. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2096. public GraphOptions() {
  2097. OnConstruction();
  2098. }
  2099. partial void OnConstruction();
  2100. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2101. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2102. public GraphOptions(GraphOptions other) : this() {
  2103. enableRecvScheduling_ = other.enableRecvScheduling_;
  2104. optimizerOptions_ = other.optimizerOptions_ != null ? other.optimizerOptions_.Clone() : null;
  2105. buildCostModel_ = other.buildCostModel_;
  2106. buildCostModelAfter_ = other.buildCostModelAfter_;
  2107. inferShapes_ = other.inferShapes_;
  2108. placePrunedGraph_ = other.placePrunedGraph_;
  2109. enableBfloat16Sendrecv_ = other.enableBfloat16Sendrecv_;
  2110. timelineStep_ = other.timelineStep_;
  2111. rewriteOptions_ = other.rewriteOptions_ != null ? other.rewriteOptions_.Clone() : null;
  2112. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2113. }
  2114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2115. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2116. public GraphOptions Clone() {
  2117. return new GraphOptions(this);
  2118. }
  2119. /// <summary>Field number for the "enable_recv_scheduling" field.</summary>
  2120. public const int EnableRecvSchedulingFieldNumber = 2;
  2121. private bool enableRecvScheduling_;
  2122. /// <summary>
  2123. /// If true, use control flow to schedule the activation of Recv nodes.
  2124. /// (Currently ignored.)
  2125. /// </summary>
  2126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2127. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2128. public bool EnableRecvScheduling {
  2129. get { return enableRecvScheduling_; }
  2130. set {
  2131. enableRecvScheduling_ = value;
  2132. }
  2133. }
  2134. /// <summary>Field number for the "optimizer_options" field.</summary>
  2135. public const int OptimizerOptionsFieldNumber = 3;
  2136. private global::Tensorflow.OptimizerOptions optimizerOptions_;
  2137. /// <summary>
  2138. /// Options controlling how graph is optimized.
  2139. /// </summary>
  2140. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2141. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2142. public global::Tensorflow.OptimizerOptions OptimizerOptions {
  2143. get { return optimizerOptions_; }
  2144. set {
  2145. optimizerOptions_ = value;
  2146. }
  2147. }
  2148. /// <summary>Field number for the "build_cost_model" field.</summary>
  2149. public const int BuildCostModelFieldNumber = 4;
  2150. private long buildCostModel_;
  2151. /// <summary>
  2152. /// The number of steps to run before returning a cost model detailing
  2153. /// the memory usage and performance of each node of the graph. 0 means
  2154. /// no cost model.
  2155. /// </summary>
  2156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2157. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2158. public long BuildCostModel {
  2159. get { return buildCostModel_; }
  2160. set {
  2161. buildCostModel_ = value;
  2162. }
  2163. }
  2164. /// <summary>Field number for the "build_cost_model_after" field.</summary>
  2165. public const int BuildCostModelAfterFieldNumber = 9;
  2166. private long buildCostModelAfter_;
  2167. /// <summary>
  2168. /// The number of steps to skip before collecting statistics for the
  2169. /// cost model.
  2170. /// </summary>
  2171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2172. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2173. public long BuildCostModelAfter {
  2174. get { return buildCostModelAfter_; }
  2175. set {
  2176. buildCostModelAfter_ = value;
  2177. }
  2178. }
  2179. /// <summary>Field number for the "infer_shapes" field.</summary>
  2180. public const int InferShapesFieldNumber = 5;
  2181. private bool inferShapes_;
  2182. /// <summary>
  2183. /// Annotate each Node with Op output shape data, to the extent it can
  2184. /// be statically inferred.
  2185. /// </summary>
  2186. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2187. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2188. public bool InferShapes {
  2189. get { return inferShapes_; }
  2190. set {
  2191. inferShapes_ = value;
  2192. }
  2193. }
  2194. /// <summary>Field number for the "place_pruned_graph" field.</summary>
  2195. public const int PlacePrunedGraphFieldNumber = 6;
  2196. private bool placePrunedGraph_;
  2197. /// <summary>
  2198. /// Only place the subgraphs that are run, rather than the entire graph.
  2199. ///
  2200. /// This is useful for interactive graph building, where one might
  2201. /// produce graphs that cannot be placed during the debugging
  2202. /// process. In particular, it allows the client to continue work in
  2203. /// a session after adding a node to a graph whose placement
  2204. /// constraints are unsatisfiable.
  2205. /// </summary>
  2206. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2207. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2208. public bool PlacePrunedGraph {
  2209. get { return placePrunedGraph_; }
  2210. set {
  2211. placePrunedGraph_ = value;
  2212. }
  2213. }
  2214. /// <summary>Field number for the "enable_bfloat16_sendrecv" field.</summary>
  2215. public const int EnableBfloat16SendrecvFieldNumber = 7;
  2216. private bool enableBfloat16Sendrecv_;
  2217. /// <summary>
  2218. /// If true, transfer float values between processes as bfloat16.
  2219. /// </summary>
  2220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2221. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2222. public bool EnableBfloat16Sendrecv {
  2223. get { return enableBfloat16Sendrecv_; }
  2224. set {
  2225. enableBfloat16Sendrecv_ = value;
  2226. }
  2227. }
  2228. /// <summary>Field number for the "timeline_step" field.</summary>
  2229. public const int TimelineStepFieldNumber = 8;
  2230. private int timelineStep_;
  2231. /// <summary>
  2232. /// If > 0, record a timeline every this many steps.
  2233. /// EXPERIMENTAL: This currently has no effect in MasterSession.
  2234. /// </summary>
  2235. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2236. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2237. public int TimelineStep {
  2238. get { return timelineStep_; }
  2239. set {
  2240. timelineStep_ = value;
  2241. }
  2242. }
  2243. /// <summary>Field number for the "rewrite_options" field.</summary>
  2244. public const int RewriteOptionsFieldNumber = 10;
  2245. private global::Tensorflow.RewriterConfig rewriteOptions_;
  2246. /// <summary>
  2247. /// Options that control the type and amount of graph rewriting.
  2248. /// Not currently configurable via the public Python API (i.e. there is no API
  2249. /// stability guarantee if you import RewriterConfig explicitly).
  2250. /// </summary>
  2251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2252. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2253. public global::Tensorflow.RewriterConfig RewriteOptions {
  2254. get { return rewriteOptions_; }
  2255. set {
  2256. rewriteOptions_ = value;
  2257. }
  2258. }
  2259. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2260. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2261. public override bool Equals(object other) {
  2262. return Equals(other as GraphOptions);
  2263. }
  2264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2265. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2266. public bool Equals(GraphOptions other) {
  2267. if (ReferenceEquals(other, null)) {
  2268. return false;
  2269. }
  2270. if (ReferenceEquals(other, this)) {
  2271. return true;
  2272. }
  2273. if (EnableRecvScheduling != other.EnableRecvScheduling) return false;
  2274. if (!object.Equals(OptimizerOptions, other.OptimizerOptions)) return false;
  2275. if (BuildCostModel != other.BuildCostModel) return false;
  2276. if (BuildCostModelAfter != other.BuildCostModelAfter) return false;
  2277. if (InferShapes != other.InferShapes) return false;
  2278. if (PlacePrunedGraph != other.PlacePrunedGraph) return false;
  2279. if (EnableBfloat16Sendrecv != other.EnableBfloat16Sendrecv) return false;
  2280. if (TimelineStep != other.TimelineStep) return false;
  2281. if (!object.Equals(RewriteOptions, other.RewriteOptions)) return false;
  2282. return Equals(_unknownFields, other._unknownFields);
  2283. }
  2284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2285. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2286. public override int GetHashCode() {
  2287. int hash = 1;
  2288. if (EnableRecvScheduling != false) hash ^= EnableRecvScheduling.GetHashCode();
  2289. if (optimizerOptions_ != null) hash ^= OptimizerOptions.GetHashCode();
  2290. if (BuildCostModel != 0L) hash ^= BuildCostModel.GetHashCode();
  2291. if (BuildCostModelAfter != 0L) hash ^= BuildCostModelAfter.GetHashCode();
  2292. if (InferShapes != false) hash ^= InferShapes.GetHashCode();
  2293. if (PlacePrunedGraph != false) hash ^= PlacePrunedGraph.GetHashCode();
  2294. if (EnableBfloat16Sendrecv != false) hash ^= EnableBfloat16Sendrecv.GetHashCode();
  2295. if (TimelineStep != 0) hash ^= TimelineStep.GetHashCode();
  2296. if (rewriteOptions_ != null) hash ^= RewriteOptions.GetHashCode();
  2297. if (_unknownFields != null) {
  2298. hash ^= _unknownFields.GetHashCode();
  2299. }
  2300. return hash;
  2301. }
  2302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2303. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2304. public override string ToString() {
  2305. return pb::JsonFormatter.ToDiagnosticString(this);
  2306. }
  2307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2308. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2309. public void WriteTo(pb::CodedOutputStream output) {
  2310. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2311. output.WriteRawMessage(this);
  2312. #else
  2313. if (EnableRecvScheduling != false) {
  2314. output.WriteRawTag(16);
  2315. output.WriteBool(EnableRecvScheduling);
  2316. }
  2317. if (optimizerOptions_ != null) {
  2318. output.WriteRawTag(26);
  2319. output.WriteMessage(OptimizerOptions);
  2320. }
  2321. if (BuildCostModel != 0L) {
  2322. output.WriteRawTag(32);
  2323. output.WriteInt64(BuildCostModel);
  2324. }
  2325. if (InferShapes != false) {
  2326. output.WriteRawTag(40);
  2327. output.WriteBool(InferShapes);
  2328. }
  2329. if (PlacePrunedGraph != false) {
  2330. output.WriteRawTag(48);
  2331. output.WriteBool(PlacePrunedGraph);
  2332. }
  2333. if (EnableBfloat16Sendrecv != false) {
  2334. output.WriteRawTag(56);
  2335. output.WriteBool(EnableBfloat16Sendrecv);
  2336. }
  2337. if (TimelineStep != 0) {
  2338. output.WriteRawTag(64);
  2339. output.WriteInt32(TimelineStep);
  2340. }
  2341. if (BuildCostModelAfter != 0L) {
  2342. output.WriteRawTag(72);
  2343. output.WriteInt64(BuildCostModelAfter);
  2344. }
  2345. if (rewriteOptions_ != null) {
  2346. output.WriteRawTag(82);
  2347. output.WriteMessage(RewriteOptions);
  2348. }
  2349. if (_unknownFields != null) {
  2350. _unknownFields.WriteTo(output);
  2351. }
  2352. #endif
  2353. }
  2354. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2355. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2356. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2357. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2358. if (EnableRecvScheduling != false) {
  2359. output.WriteRawTag(16);
  2360. output.WriteBool(EnableRecvScheduling);
  2361. }
  2362. if (optimizerOptions_ != null) {
  2363. output.WriteRawTag(26);
  2364. output.WriteMessage(OptimizerOptions);
  2365. }
  2366. if (BuildCostModel != 0L) {
  2367. output.WriteRawTag(32);
  2368. output.WriteInt64(BuildCostModel);
  2369. }
  2370. if (InferShapes != false) {
  2371. output.WriteRawTag(40);
  2372. output.WriteBool(InferShapes);
  2373. }
  2374. if (PlacePrunedGraph != false) {
  2375. output.WriteRawTag(48);
  2376. output.WriteBool(PlacePrunedGraph);
  2377. }
  2378. if (EnableBfloat16Sendrecv != false) {
  2379. output.WriteRawTag(56);
  2380. output.WriteBool(EnableBfloat16Sendrecv);
  2381. }
  2382. if (TimelineStep != 0) {
  2383. output.WriteRawTag(64);
  2384. output.WriteInt32(TimelineStep);
  2385. }
  2386. if (BuildCostModelAfter != 0L) {
  2387. output.WriteRawTag(72);
  2388. output.WriteInt64(BuildCostModelAfter);
  2389. }
  2390. if (rewriteOptions_ != null) {
  2391. output.WriteRawTag(82);
  2392. output.WriteMessage(RewriteOptions);
  2393. }
  2394. if (_unknownFields != null) {
  2395. _unknownFields.WriteTo(ref output);
  2396. }
  2397. }
  2398. #endif
  2399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2400. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2401. public int CalculateSize() {
  2402. int size = 0;
  2403. if (EnableRecvScheduling != false) {
  2404. size += 1 + 1;
  2405. }
  2406. if (optimizerOptions_ != null) {
  2407. size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptimizerOptions);
  2408. }
  2409. if (BuildCostModel != 0L) {
  2410. size += 1 + pb::CodedOutputStream.ComputeInt64Size(BuildCostModel);
  2411. }
  2412. if (BuildCostModelAfter != 0L) {
  2413. size += 1 + pb::CodedOutputStream.ComputeInt64Size(BuildCostModelAfter);
  2414. }
  2415. if (InferShapes != false) {
  2416. size += 1 + 1;
  2417. }
  2418. if (PlacePrunedGraph != false) {
  2419. size += 1 + 1;
  2420. }
  2421. if (EnableBfloat16Sendrecv != false) {
  2422. size += 1 + 1;
  2423. }
  2424. if (TimelineStep != 0) {
  2425. size += 1 + pb::CodedOutputStream.ComputeInt32Size(TimelineStep);
  2426. }
  2427. if (rewriteOptions_ != null) {
  2428. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RewriteOptions);
  2429. }
  2430. if (_unknownFields != null) {
  2431. size += _unknownFields.CalculateSize();
  2432. }
  2433. return size;
  2434. }
  2435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2436. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2437. public void MergeFrom(GraphOptions other) {
  2438. if (other == null) {
  2439. return;
  2440. }
  2441. if (other.EnableRecvScheduling != false) {
  2442. EnableRecvScheduling = other.EnableRecvScheduling;
  2443. }
  2444. if (other.optimizerOptions_ != null) {
  2445. if (optimizerOptions_ == null) {
  2446. OptimizerOptions = new global::Tensorflow.OptimizerOptions();
  2447. }
  2448. OptimizerOptions.MergeFrom(other.OptimizerOptions);
  2449. }
  2450. if (other.BuildCostModel != 0L) {
  2451. BuildCostModel = other.BuildCostModel;
  2452. }
  2453. if (other.BuildCostModelAfter != 0L) {
  2454. BuildCostModelAfter = other.BuildCostModelAfter;
  2455. }
  2456. if (other.InferShapes != false) {
  2457. InferShapes = other.InferShapes;
  2458. }
  2459. if (other.PlacePrunedGraph != false) {
  2460. PlacePrunedGraph = other.PlacePrunedGraph;
  2461. }
  2462. if (other.EnableBfloat16Sendrecv != false) {
  2463. EnableBfloat16Sendrecv = other.EnableBfloat16Sendrecv;
  2464. }
  2465. if (other.TimelineStep != 0) {
  2466. TimelineStep = other.TimelineStep;
  2467. }
  2468. if (other.rewriteOptions_ != null) {
  2469. if (rewriteOptions_ == null) {
  2470. RewriteOptions = new global::Tensorflow.RewriterConfig();
  2471. }
  2472. RewriteOptions.MergeFrom(other.RewriteOptions);
  2473. }
  2474. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2475. }
  2476. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2477. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2478. public void MergeFrom(pb::CodedInputStream input) {
  2479. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2480. input.ReadRawMessage(this);
  2481. #else
  2482. uint tag;
  2483. while ((tag = input.ReadTag()) != 0) {
  2484. switch(tag) {
  2485. default:
  2486. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2487. break;
  2488. case 16: {
  2489. EnableRecvScheduling = input.ReadBool();
  2490. break;
  2491. }
  2492. case 26: {
  2493. if (optimizerOptions_ == null) {
  2494. OptimizerOptions = new global::Tensorflow.OptimizerOptions();
  2495. }
  2496. input.ReadMessage(OptimizerOptions);
  2497. break;
  2498. }
  2499. case 32: {
  2500. BuildCostModel = input.ReadInt64();
  2501. break;
  2502. }
  2503. case 40: {
  2504. InferShapes = input.ReadBool();
  2505. break;
  2506. }
  2507. case 48: {
  2508. PlacePrunedGraph = input.ReadBool();
  2509. break;
  2510. }
  2511. case 56: {
  2512. EnableBfloat16Sendrecv = input.ReadBool();
  2513. break;
  2514. }
  2515. case 64: {
  2516. TimelineStep = input.ReadInt32();
  2517. break;
  2518. }
  2519. case 72: {
  2520. BuildCostModelAfter = input.ReadInt64();
  2521. break;
  2522. }
  2523. case 82: {
  2524. if (rewriteOptions_ == null) {
  2525. RewriteOptions = new global::Tensorflow.RewriterConfig();
  2526. }
  2527. input.ReadMessage(RewriteOptions);
  2528. break;
  2529. }
  2530. }
  2531. }
  2532. #endif
  2533. }
  2534. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2536. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2537. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2538. uint tag;
  2539. while ((tag = input.ReadTag()) != 0) {
  2540. switch(tag) {
  2541. default:
  2542. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2543. break;
  2544. case 16: {
  2545. EnableRecvScheduling = input.ReadBool();
  2546. break;
  2547. }
  2548. case 26: {
  2549. if (optimizerOptions_ == null) {
  2550. OptimizerOptions = new global::Tensorflow.OptimizerOptions();
  2551. }
  2552. input.ReadMessage(OptimizerOptions);
  2553. break;
  2554. }
  2555. case 32: {
  2556. BuildCostModel = input.ReadInt64();
  2557. break;
  2558. }
  2559. case 40: {
  2560. InferShapes = input.ReadBool();
  2561. break;
  2562. }
  2563. case 48: {
  2564. PlacePrunedGraph = input.ReadBool();
  2565. break;
  2566. }
  2567. case 56: {
  2568. EnableBfloat16Sendrecv = input.ReadBool();
  2569. break;
  2570. }
  2571. case 64: {
  2572. TimelineStep = input.ReadInt32();
  2573. break;
  2574. }
  2575. case 72: {
  2576. BuildCostModelAfter = input.ReadInt64();
  2577. break;
  2578. }
  2579. case 82: {
  2580. if (rewriteOptions_ == null) {
  2581. RewriteOptions = new global::Tensorflow.RewriterConfig();
  2582. }
  2583. input.ReadMessage(RewriteOptions);
  2584. break;
  2585. }
  2586. }
  2587. }
  2588. }
  2589. #endif
  2590. }
  2591. public sealed partial class ThreadPoolOptionProto : pb::IMessage<ThreadPoolOptionProto>
  2592. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2593. , pb::IBufferMessage
  2594. #endif
  2595. {
  2596. private static readonly pb::MessageParser<ThreadPoolOptionProto> _parser = new pb::MessageParser<ThreadPoolOptionProto>(() => new ThreadPoolOptionProto());
  2597. private pb::UnknownFieldSet _unknownFields;
  2598. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2599. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2600. public static pb::MessageParser<ThreadPoolOptionProto> Parser { get { return _parser; } }
  2601. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2602. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2603. public static pbr::MessageDescriptor Descriptor {
  2604. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[3]; }
  2605. }
  2606. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2607. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2608. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2609. get { return Descriptor; }
  2610. }
  2611. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2612. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2613. public ThreadPoolOptionProto() {
  2614. OnConstruction();
  2615. }
  2616. partial void OnConstruction();
  2617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2618. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2619. public ThreadPoolOptionProto(ThreadPoolOptionProto other) : this() {
  2620. numThreads_ = other.numThreads_;
  2621. globalName_ = other.globalName_;
  2622. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2623. }
  2624. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2625. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2626. public ThreadPoolOptionProto Clone() {
  2627. return new ThreadPoolOptionProto(this);
  2628. }
  2629. /// <summary>Field number for the "num_threads" field.</summary>
  2630. public const int NumThreadsFieldNumber = 1;
  2631. private int numThreads_;
  2632. /// <summary>
  2633. /// The number of threads in the pool.
  2634. ///
  2635. /// 0 means the system picks a value based on where this option proto is used
  2636. /// (see the declaration of the specific field for more info).
  2637. /// </summary>
  2638. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2639. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2640. public int NumThreads {
  2641. get { return numThreads_; }
  2642. set {
  2643. numThreads_ = value;
  2644. }
  2645. }
  2646. /// <summary>Field number for the "global_name" field.</summary>
  2647. public const int GlobalNameFieldNumber = 2;
  2648. private string globalName_ = "";
  2649. /// <summary>
  2650. /// The global name of the threadpool.
  2651. ///
  2652. /// If empty, then the threadpool is made and used according to the scope it's
  2653. /// in - e.g., for a session threadpool, it is used by that session only.
  2654. ///
  2655. /// If non-empty, then:
  2656. /// - a global threadpool associated with this name is looked
  2657. /// up or created. This allows, for example, sharing one threadpool across
  2658. /// many sessions (e.g., like the default behavior, if
  2659. /// inter_op_parallelism_threads is not configured), but still partitioning
  2660. /// into a large and small pool.
  2661. /// - if the threadpool for this global_name already exists, then it is an
  2662. /// error if the existing pool was created using a different num_threads
  2663. /// value as is specified on this call.
  2664. /// - threadpools created this way are never garbage collected.
  2665. /// </summary>
  2666. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2667. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2668. public string GlobalName {
  2669. get { return globalName_; }
  2670. set {
  2671. globalName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2672. }
  2673. }
  2674. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2675. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2676. public override bool Equals(object other) {
  2677. return Equals(other as ThreadPoolOptionProto);
  2678. }
  2679. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2680. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2681. public bool Equals(ThreadPoolOptionProto other) {
  2682. if (ReferenceEquals(other, null)) {
  2683. return false;
  2684. }
  2685. if (ReferenceEquals(other, this)) {
  2686. return true;
  2687. }
  2688. if (NumThreads != other.NumThreads) return false;
  2689. if (GlobalName != other.GlobalName) return false;
  2690. return Equals(_unknownFields, other._unknownFields);
  2691. }
  2692. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2693. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2694. public override int GetHashCode() {
  2695. int hash = 1;
  2696. if (NumThreads != 0) hash ^= NumThreads.GetHashCode();
  2697. if (GlobalName.Length != 0) hash ^= GlobalName.GetHashCode();
  2698. if (_unknownFields != null) {
  2699. hash ^= _unknownFields.GetHashCode();
  2700. }
  2701. return hash;
  2702. }
  2703. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2704. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2705. public override string ToString() {
  2706. return pb::JsonFormatter.ToDiagnosticString(this);
  2707. }
  2708. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2709. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2710. public void WriteTo(pb::CodedOutputStream output) {
  2711. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2712. output.WriteRawMessage(this);
  2713. #else
  2714. if (NumThreads != 0) {
  2715. output.WriteRawTag(8);
  2716. output.WriteInt32(NumThreads);
  2717. }
  2718. if (GlobalName.Length != 0) {
  2719. output.WriteRawTag(18);
  2720. output.WriteString(GlobalName);
  2721. }
  2722. if (_unknownFields != null) {
  2723. _unknownFields.WriteTo(output);
  2724. }
  2725. #endif
  2726. }
  2727. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2729. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2730. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  2731. if (NumThreads != 0) {
  2732. output.WriteRawTag(8);
  2733. output.WriteInt32(NumThreads);
  2734. }
  2735. if (GlobalName.Length != 0) {
  2736. output.WriteRawTag(18);
  2737. output.WriteString(GlobalName);
  2738. }
  2739. if (_unknownFields != null) {
  2740. _unknownFields.WriteTo(ref output);
  2741. }
  2742. }
  2743. #endif
  2744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2745. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2746. public int CalculateSize() {
  2747. int size = 0;
  2748. if (NumThreads != 0) {
  2749. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumThreads);
  2750. }
  2751. if (GlobalName.Length != 0) {
  2752. size += 1 + pb::CodedOutputStream.ComputeStringSize(GlobalName);
  2753. }
  2754. if (_unknownFields != null) {
  2755. size += _unknownFields.CalculateSize();
  2756. }
  2757. return size;
  2758. }
  2759. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2760. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2761. public void MergeFrom(ThreadPoolOptionProto other) {
  2762. if (other == null) {
  2763. return;
  2764. }
  2765. if (other.NumThreads != 0) {
  2766. NumThreads = other.NumThreads;
  2767. }
  2768. if (other.GlobalName.Length != 0) {
  2769. GlobalName = other.GlobalName;
  2770. }
  2771. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2772. }
  2773. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2774. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2775. public void MergeFrom(pb::CodedInputStream input) {
  2776. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2777. input.ReadRawMessage(this);
  2778. #else
  2779. uint tag;
  2780. while ((tag = input.ReadTag()) != 0) {
  2781. switch(tag) {
  2782. default:
  2783. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2784. break;
  2785. case 8: {
  2786. NumThreads = input.ReadInt32();
  2787. break;
  2788. }
  2789. case 18: {
  2790. GlobalName = input.ReadString();
  2791. break;
  2792. }
  2793. }
  2794. }
  2795. #endif
  2796. }
  2797. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2798. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2799. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2800. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  2801. uint tag;
  2802. while ((tag = input.ReadTag()) != 0) {
  2803. switch(tag) {
  2804. default:
  2805. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  2806. break;
  2807. case 8: {
  2808. NumThreads = input.ReadInt32();
  2809. break;
  2810. }
  2811. case 18: {
  2812. GlobalName = input.ReadString();
  2813. break;
  2814. }
  2815. }
  2816. }
  2817. }
  2818. #endif
  2819. }
  2820. public sealed partial class RPCOptions : pb::IMessage<RPCOptions>
  2821. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  2822. , pb::IBufferMessage
  2823. #endif
  2824. {
  2825. private static readonly pb::MessageParser<RPCOptions> _parser = new pb::MessageParser<RPCOptions>(() => new RPCOptions());
  2826. private pb::UnknownFieldSet _unknownFields;
  2827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2828. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2829. public static pb::MessageParser<RPCOptions> Parser { get { return _parser; } }
  2830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2831. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2832. public static pbr::MessageDescriptor Descriptor {
  2833. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[4]; }
  2834. }
  2835. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2836. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2837. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2838. get { return Descriptor; }
  2839. }
  2840. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2841. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2842. public RPCOptions() {
  2843. OnConstruction();
  2844. }
  2845. partial void OnConstruction();
  2846. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2847. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2848. public RPCOptions(RPCOptions other) : this() {
  2849. useRpcForInprocessMaster_ = other.useRpcForInprocessMaster_;
  2850. compressionAlgorithm_ = other.compressionAlgorithm_;
  2851. compressionLevel_ = other.compressionLevel_;
  2852. cacheRpcResponse_ = other.cacheRpcResponse_;
  2853. disableSessionConnectionSharing_ = other.disableSessionConnectionSharing_;
  2854. numChannelsPerTarget_ = other.numChannelsPerTarget_;
  2855. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2856. }
  2857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2858. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2859. public RPCOptions Clone() {
  2860. return new RPCOptions(this);
  2861. }
  2862. /// <summary>Field number for the "use_rpc_for_inprocess_master" field.</summary>
  2863. public const int UseRpcForInprocessMasterFieldNumber = 1;
  2864. private bool useRpcForInprocessMaster_;
  2865. /// <summary>
  2866. /// If true, always use RPC to contact the session target.
  2867. ///
  2868. /// If false (the default option), TensorFlow may use an optimized
  2869. /// transport for client-master communication that avoids the RPC
  2870. /// stack. This option is primarily for used testing the RPC stack.
  2871. /// </summary>
  2872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2873. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2874. public bool UseRpcForInprocessMaster {
  2875. get { return useRpcForInprocessMaster_; }
  2876. set {
  2877. useRpcForInprocessMaster_ = value;
  2878. }
  2879. }
  2880. /// <summary>Field number for the "compression_algorithm" field.</summary>
  2881. public const int CompressionAlgorithmFieldNumber = 2;
  2882. private string compressionAlgorithm_ = "";
  2883. /// <summary>
  2884. /// The compression algorithm to be used. One of "deflate", "gzip".
  2885. /// </summary>
  2886. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2887. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2888. public string CompressionAlgorithm {
  2889. get { return compressionAlgorithm_; }
  2890. set {
  2891. compressionAlgorithm_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2892. }
  2893. }
  2894. /// <summary>Field number for the "compression_level" field.</summary>
  2895. public const int CompressionLevelFieldNumber = 3;
  2896. private int compressionLevel_;
  2897. /// <summary>
  2898. /// If compression_algorithm is set, the compression level to be used.
  2899. /// From 0 (no compression), up to 3.
  2900. /// </summary>
  2901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2902. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2903. public int CompressionLevel {
  2904. get { return compressionLevel_; }
  2905. set {
  2906. compressionLevel_ = value;
  2907. }
  2908. }
  2909. /// <summary>Field number for the "cache_rpc_response" field.</summary>
  2910. public const int CacheRpcResponseFieldNumber = 4;
  2911. private bool cacheRpcResponse_;
  2912. /// <summary>
  2913. /// Setting cache_rpc_response to true will enable sender side caching of
  2914. /// response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
  2915. /// requests . This is only necessary when the network fabric is experiencing a
  2916. /// significant error rate. Without it we'll fail a step on an network error,
  2917. /// while with it we'll be able to complete long steps (like complex
  2918. /// initializations) in the face of some network errors during RecvTensor.
  2919. /// </summary>
  2920. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2921. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2922. public bool CacheRpcResponse {
  2923. get { return cacheRpcResponse_; }
  2924. set {
  2925. cacheRpcResponse_ = value;
  2926. }
  2927. }
  2928. /// <summary>Field number for the "disable_session_connection_sharing" field.</summary>
  2929. public const int DisableSessionConnectionSharingFieldNumber = 5;
  2930. private bool disableSessionConnectionSharing_;
  2931. /// <summary>
  2932. /// Disables TCP connection sharing when opening a new RPC channel.
  2933. /// </summary>
  2934. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2935. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2936. public bool DisableSessionConnectionSharing {
  2937. get { return disableSessionConnectionSharing_; }
  2938. set {
  2939. disableSessionConnectionSharing_ = value;
  2940. }
  2941. }
  2942. /// <summary>Field number for the "num_channels_per_target" field.</summary>
  2943. public const int NumChannelsPerTargetFieldNumber = 6;
  2944. private int numChannelsPerTarget_;
  2945. /// <summary>
  2946. /// Setting num_channels_per_target > 0 allows uses of multiple channels to
  2947. /// communicate to the same target. This can be used to improve the aggregate
  2948. /// throughput on high speed links (e.g 100G) where single connection is not
  2949. /// sufficient to maximize link utilization. Note that a single RPC only goes
  2950. /// on a single channel, this only helps in situations where there are multiple
  2951. /// transfers to the same target overlapping in time.
  2952. /// </summary>
  2953. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2954. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2955. public int NumChannelsPerTarget {
  2956. get { return numChannelsPerTarget_; }
  2957. set {
  2958. numChannelsPerTarget_ = value;
  2959. }
  2960. }
  2961. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2962. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2963. public override bool Equals(object other) {
  2964. return Equals(other as RPCOptions);
  2965. }
  2966. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2967. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2968. public bool Equals(RPCOptions other) {
  2969. if (ReferenceEquals(other, null)) {
  2970. return false;
  2971. }
  2972. if (ReferenceEquals(other, this)) {
  2973. return true;
  2974. }
  2975. if (UseRpcForInprocessMaster != other.UseRpcForInprocessMaster) return false;
  2976. if (CompressionAlgorithm != other.CompressionAlgorithm) return false;
  2977. if (CompressionLevel != other.CompressionLevel) return false;
  2978. if (CacheRpcResponse != other.CacheRpcResponse) return false;
  2979. if (DisableSessionConnectionSharing != other.DisableSessionConnectionSharing) return false;
  2980. if (NumChannelsPerTarget != other.NumChannelsPerTarget) return false;
  2981. return Equals(_unknownFields, other._unknownFields);
  2982. }
  2983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2984. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  2985. public override int GetHashCode() {
  2986. int hash = 1;
  2987. if (UseRpcForInprocessMaster != false) hash ^= UseRpcForInprocessMaster.GetHashCode();
  2988. if (CompressionAlgorithm.Length != 0) hash ^= CompressionAlgorithm.GetHashCode();
  2989. if (CompressionLevel != 0) hash ^= CompressionLevel.GetHashCode();
  2990. if (CacheRpcResponse != false) hash ^= CacheRpcResponse.GetHashCode();
  2991. if (DisableSessionConnectionSharing != false) hash ^= DisableSessionConnectionSharing.GetHashCode();
  2992. if (NumChannelsPerTarget != 0) hash ^= NumChannelsPerTarget.GetHashCode();
  2993. if (_unknownFields != null) {
  2994. hash ^= _unknownFields.GetHashCode();
  2995. }
  2996. return hash;
  2997. }
  2998. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2999. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3000. public override string ToString() {
  3001. return pb::JsonFormatter.ToDiagnosticString(this);
  3002. }
  3003. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3004. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3005. public void WriteTo(pb::CodedOutputStream output) {
  3006. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3007. output.WriteRawMessage(this);
  3008. #else
  3009. if (UseRpcForInprocessMaster != false) {
  3010. output.WriteRawTag(8);
  3011. output.WriteBool(UseRpcForInprocessMaster);
  3012. }
  3013. if (CompressionAlgorithm.Length != 0) {
  3014. output.WriteRawTag(18);
  3015. output.WriteString(CompressionAlgorithm);
  3016. }
  3017. if (CompressionLevel != 0) {
  3018. output.WriteRawTag(24);
  3019. output.WriteInt32(CompressionLevel);
  3020. }
  3021. if (CacheRpcResponse != false) {
  3022. output.WriteRawTag(32);
  3023. output.WriteBool(CacheRpcResponse);
  3024. }
  3025. if (DisableSessionConnectionSharing != false) {
  3026. output.WriteRawTag(40);
  3027. output.WriteBool(DisableSessionConnectionSharing);
  3028. }
  3029. if (NumChannelsPerTarget != 0) {
  3030. output.WriteRawTag(48);
  3031. output.WriteInt32(NumChannelsPerTarget);
  3032. }
  3033. if (_unknownFields != null) {
  3034. _unknownFields.WriteTo(output);
  3035. }
  3036. #endif
  3037. }
  3038. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3039. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3040. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3041. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  3042. if (UseRpcForInprocessMaster != false) {
  3043. output.WriteRawTag(8);
  3044. output.WriteBool(UseRpcForInprocessMaster);
  3045. }
  3046. if (CompressionAlgorithm.Length != 0) {
  3047. output.WriteRawTag(18);
  3048. output.WriteString(CompressionAlgorithm);
  3049. }
  3050. if (CompressionLevel != 0) {
  3051. output.WriteRawTag(24);
  3052. output.WriteInt32(CompressionLevel);
  3053. }
  3054. if (CacheRpcResponse != false) {
  3055. output.WriteRawTag(32);
  3056. output.WriteBool(CacheRpcResponse);
  3057. }
  3058. if (DisableSessionConnectionSharing != false) {
  3059. output.WriteRawTag(40);
  3060. output.WriteBool(DisableSessionConnectionSharing);
  3061. }
  3062. if (NumChannelsPerTarget != 0) {
  3063. output.WriteRawTag(48);
  3064. output.WriteInt32(NumChannelsPerTarget);
  3065. }
  3066. if (_unknownFields != null) {
  3067. _unknownFields.WriteTo(ref output);
  3068. }
  3069. }
  3070. #endif
  3071. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3072. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3073. public int CalculateSize() {
  3074. int size = 0;
  3075. if (UseRpcForInprocessMaster != false) {
  3076. size += 1 + 1;
  3077. }
  3078. if (CompressionAlgorithm.Length != 0) {
  3079. size += 1 + pb::CodedOutputStream.ComputeStringSize(CompressionAlgorithm);
  3080. }
  3081. if (CompressionLevel != 0) {
  3082. size += 1 + pb::CodedOutputStream.ComputeInt32Size(CompressionLevel);
  3083. }
  3084. if (CacheRpcResponse != false) {
  3085. size += 1 + 1;
  3086. }
  3087. if (DisableSessionConnectionSharing != false) {
  3088. size += 1 + 1;
  3089. }
  3090. if (NumChannelsPerTarget != 0) {
  3091. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumChannelsPerTarget);
  3092. }
  3093. if (_unknownFields != null) {
  3094. size += _unknownFields.CalculateSize();
  3095. }
  3096. return size;
  3097. }
  3098. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3099. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3100. public void MergeFrom(RPCOptions other) {
  3101. if (other == null) {
  3102. return;
  3103. }
  3104. if (other.UseRpcForInprocessMaster != false) {
  3105. UseRpcForInprocessMaster = other.UseRpcForInprocessMaster;
  3106. }
  3107. if (other.CompressionAlgorithm.Length != 0) {
  3108. CompressionAlgorithm = other.CompressionAlgorithm;
  3109. }
  3110. if (other.CompressionLevel != 0) {
  3111. CompressionLevel = other.CompressionLevel;
  3112. }
  3113. if (other.CacheRpcResponse != false) {
  3114. CacheRpcResponse = other.CacheRpcResponse;
  3115. }
  3116. if (other.DisableSessionConnectionSharing != false) {
  3117. DisableSessionConnectionSharing = other.DisableSessionConnectionSharing;
  3118. }
  3119. if (other.NumChannelsPerTarget != 0) {
  3120. NumChannelsPerTarget = other.NumChannelsPerTarget;
  3121. }
  3122. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3123. }
  3124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3125. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3126. public void MergeFrom(pb::CodedInputStream input) {
  3127. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3128. input.ReadRawMessage(this);
  3129. #else
  3130. uint tag;
  3131. while ((tag = input.ReadTag()) != 0) {
  3132. switch(tag) {
  3133. default:
  3134. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3135. break;
  3136. case 8: {
  3137. UseRpcForInprocessMaster = input.ReadBool();
  3138. break;
  3139. }
  3140. case 18: {
  3141. CompressionAlgorithm = input.ReadString();
  3142. break;
  3143. }
  3144. case 24: {
  3145. CompressionLevel = input.ReadInt32();
  3146. break;
  3147. }
  3148. case 32: {
  3149. CacheRpcResponse = input.ReadBool();
  3150. break;
  3151. }
  3152. case 40: {
  3153. DisableSessionConnectionSharing = input.ReadBool();
  3154. break;
  3155. }
  3156. case 48: {
  3157. NumChannelsPerTarget = input.ReadInt32();
  3158. break;
  3159. }
  3160. }
  3161. }
  3162. #endif
  3163. }
  3164. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3165. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3166. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3167. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  3168. uint tag;
  3169. while ((tag = input.ReadTag()) != 0) {
  3170. switch(tag) {
  3171. default:
  3172. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  3173. break;
  3174. case 8: {
  3175. UseRpcForInprocessMaster = input.ReadBool();
  3176. break;
  3177. }
  3178. case 18: {
  3179. CompressionAlgorithm = input.ReadString();
  3180. break;
  3181. }
  3182. case 24: {
  3183. CompressionLevel = input.ReadInt32();
  3184. break;
  3185. }
  3186. case 32: {
  3187. CacheRpcResponse = input.ReadBool();
  3188. break;
  3189. }
  3190. case 40: {
  3191. DisableSessionConnectionSharing = input.ReadBool();
  3192. break;
  3193. }
  3194. case 48: {
  3195. NumChannelsPerTarget = input.ReadInt32();
  3196. break;
  3197. }
  3198. }
  3199. }
  3200. }
  3201. #endif
  3202. }
  3203. /// <summary>
  3204. /// Metadata about the session.
  3205. ///
  3206. /// This can be used by the runtime and the Ops for debugging, monitoring, etc.
  3207. ///
  3208. /// The (name, version) tuple is expected to be a unique identifier for
  3209. /// sessions within the same process.
  3210. ///
  3211. /// NOTE: This is currently used and propagated only by the direct session.
  3212. /// </summary>
  3213. public sealed partial class SessionMetadata : pb::IMessage<SessionMetadata>
  3214. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3215. , pb::IBufferMessage
  3216. #endif
  3217. {
  3218. private static readonly pb::MessageParser<SessionMetadata> _parser = new pb::MessageParser<SessionMetadata>(() => new SessionMetadata());
  3219. private pb::UnknownFieldSet _unknownFields;
  3220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3221. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3222. public static pb::MessageParser<SessionMetadata> Parser { get { return _parser; } }
  3223. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3224. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3225. public static pbr::MessageDescriptor Descriptor {
  3226. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[5]; }
  3227. }
  3228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3229. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3230. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3231. get { return Descriptor; }
  3232. }
  3233. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3234. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3235. public SessionMetadata() {
  3236. OnConstruction();
  3237. }
  3238. partial void OnConstruction();
  3239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3240. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3241. public SessionMetadata(SessionMetadata other) : this() {
  3242. name_ = other.name_;
  3243. version_ = other.version_;
  3244. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3245. }
  3246. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3247. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3248. public SessionMetadata Clone() {
  3249. return new SessionMetadata(this);
  3250. }
  3251. /// <summary>Field number for the "name" field.</summary>
  3252. public const int NameFieldNumber = 1;
  3253. private string name_ = "";
  3254. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3255. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3256. public string Name {
  3257. get { return name_; }
  3258. set {
  3259. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  3260. }
  3261. }
  3262. /// <summary>Field number for the "version" field.</summary>
  3263. public const int VersionFieldNumber = 2;
  3264. private long version_;
  3265. /// <summary>
  3266. /// The version is optional. If set, needs to be >= 0.
  3267. /// </summary>
  3268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3269. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3270. public long Version {
  3271. get { return version_; }
  3272. set {
  3273. version_ = value;
  3274. }
  3275. }
  3276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3277. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3278. public override bool Equals(object other) {
  3279. return Equals(other as SessionMetadata);
  3280. }
  3281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3282. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3283. public bool Equals(SessionMetadata other) {
  3284. if (ReferenceEquals(other, null)) {
  3285. return false;
  3286. }
  3287. if (ReferenceEquals(other, this)) {
  3288. return true;
  3289. }
  3290. if (Name != other.Name) return false;
  3291. if (Version != other.Version) return false;
  3292. return Equals(_unknownFields, other._unknownFields);
  3293. }
  3294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3295. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3296. public override int GetHashCode() {
  3297. int hash = 1;
  3298. if (Name.Length != 0) hash ^= Name.GetHashCode();
  3299. if (Version != 0L) hash ^= Version.GetHashCode();
  3300. if (_unknownFields != null) {
  3301. hash ^= _unknownFields.GetHashCode();
  3302. }
  3303. return hash;
  3304. }
  3305. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3306. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3307. public override string ToString() {
  3308. return pb::JsonFormatter.ToDiagnosticString(this);
  3309. }
  3310. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3311. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3312. public void WriteTo(pb::CodedOutputStream output) {
  3313. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3314. output.WriteRawMessage(this);
  3315. #else
  3316. if (Name.Length != 0) {
  3317. output.WriteRawTag(10);
  3318. output.WriteString(Name);
  3319. }
  3320. if (Version != 0L) {
  3321. output.WriteRawTag(16);
  3322. output.WriteInt64(Version);
  3323. }
  3324. if (_unknownFields != null) {
  3325. _unknownFields.WriteTo(output);
  3326. }
  3327. #endif
  3328. }
  3329. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3331. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3332. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  3333. if (Name.Length != 0) {
  3334. output.WriteRawTag(10);
  3335. output.WriteString(Name);
  3336. }
  3337. if (Version != 0L) {
  3338. output.WriteRawTag(16);
  3339. output.WriteInt64(Version);
  3340. }
  3341. if (_unknownFields != null) {
  3342. _unknownFields.WriteTo(ref output);
  3343. }
  3344. }
  3345. #endif
  3346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3347. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3348. public int CalculateSize() {
  3349. int size = 0;
  3350. if (Name.Length != 0) {
  3351. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  3352. }
  3353. if (Version != 0L) {
  3354. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Version);
  3355. }
  3356. if (_unknownFields != null) {
  3357. size += _unknownFields.CalculateSize();
  3358. }
  3359. return size;
  3360. }
  3361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3362. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3363. public void MergeFrom(SessionMetadata other) {
  3364. if (other == null) {
  3365. return;
  3366. }
  3367. if (other.Name.Length != 0) {
  3368. Name = other.Name;
  3369. }
  3370. if (other.Version != 0L) {
  3371. Version = other.Version;
  3372. }
  3373. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3374. }
  3375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3376. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3377. public void MergeFrom(pb::CodedInputStream input) {
  3378. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3379. input.ReadRawMessage(this);
  3380. #else
  3381. uint tag;
  3382. while ((tag = input.ReadTag()) != 0) {
  3383. switch(tag) {
  3384. default:
  3385. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3386. break;
  3387. case 10: {
  3388. Name = input.ReadString();
  3389. break;
  3390. }
  3391. case 16: {
  3392. Version = input.ReadInt64();
  3393. break;
  3394. }
  3395. }
  3396. }
  3397. #endif
  3398. }
  3399. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3401. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3402. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  3403. uint tag;
  3404. while ((tag = input.ReadTag()) != 0) {
  3405. switch(tag) {
  3406. default:
  3407. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  3408. break;
  3409. case 10: {
  3410. Name = input.ReadString();
  3411. break;
  3412. }
  3413. case 16: {
  3414. Version = input.ReadInt64();
  3415. break;
  3416. }
  3417. }
  3418. }
  3419. }
  3420. #endif
  3421. }
  3422. /// <summary>
  3423. /// Session configuration parameters.
  3424. /// The system picks appropriate values for fields that are not set.
  3425. /// </summary>
  3426. public sealed partial class ConfigProto : pb::IMessage<ConfigProto>
  3427. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3428. , pb::IBufferMessage
  3429. #endif
  3430. {
  3431. private static readonly pb::MessageParser<ConfigProto> _parser = new pb::MessageParser<ConfigProto>(() => new ConfigProto());
  3432. private pb::UnknownFieldSet _unknownFields;
  3433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3434. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3435. public static pb::MessageParser<ConfigProto> Parser { get { return _parser; } }
  3436. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3437. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3438. public static pbr::MessageDescriptor Descriptor {
  3439. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[6]; }
  3440. }
  3441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3442. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3443. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3444. get { return Descriptor; }
  3445. }
  3446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3447. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3448. public ConfigProto() {
  3449. OnConstruction();
  3450. }
  3451. partial void OnConstruction();
  3452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3453. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3454. public ConfigProto(ConfigProto other) : this() {
  3455. deviceCount_ = other.deviceCount_.Clone();
  3456. intraOpParallelismThreads_ = other.intraOpParallelismThreads_;
  3457. interOpParallelismThreads_ = other.interOpParallelismThreads_;
  3458. usePerSessionThreads_ = other.usePerSessionThreads_;
  3459. sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_.Clone();
  3460. placementPeriod_ = other.placementPeriod_;
  3461. deviceFilters_ = other.deviceFilters_.Clone();
  3462. gpuOptions_ = other.gpuOptions_ != null ? other.gpuOptions_.Clone() : null;
  3463. allowSoftPlacement_ = other.allowSoftPlacement_;
  3464. logDevicePlacement_ = other.logDevicePlacement_;
  3465. graphOptions_ = other.graphOptions_ != null ? other.graphOptions_.Clone() : null;
  3466. operationTimeoutInMs_ = other.operationTimeoutInMs_;
  3467. rpcOptions_ = other.rpcOptions_ != null ? other.rpcOptions_.Clone() : null;
  3468. clusterDef_ = other.clusterDef_ != null ? other.clusterDef_.Clone() : null;
  3469. isolateSessionState_ = other.isolateSessionState_;
  3470. shareClusterDevicesInSession_ = other.shareClusterDevicesInSession_;
  3471. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  3472. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3473. }
  3474. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3475. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3476. public ConfigProto Clone() {
  3477. return new ConfigProto(this);
  3478. }
  3479. /// <summary>Field number for the "device_count" field.</summary>
  3480. public const int DeviceCountFieldNumber = 1;
  3481. private static readonly pbc::MapField<string, int>.Codec _map_deviceCount_codec
  3482. = new pbc::MapField<string, int>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForInt32(16, 0), 10);
  3483. private readonly pbc::MapField<string, int> deviceCount_ = new pbc::MapField<string, int>();
  3484. /// <summary>
  3485. /// Map from device type name (e.g., "CPU" or "GPU" ) to maximum
  3486. /// number of devices of that type to use. If a particular device
  3487. /// type is not found in the map, the system picks an appropriate
  3488. /// number.
  3489. /// </summary>
  3490. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3491. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3492. public pbc::MapField<string, int> DeviceCount {
  3493. get { return deviceCount_; }
  3494. }
  3495. /// <summary>Field number for the "intra_op_parallelism_threads" field.</summary>
  3496. public const int IntraOpParallelismThreadsFieldNumber = 2;
  3497. private int intraOpParallelismThreads_;
  3498. /// <summary>
  3499. /// The execution of an individual op (for some op types) can be
  3500. /// parallelized on a pool of intra_op_parallelism_threads.
  3501. /// 0 means the system picks an appropriate number.
  3502. ///
  3503. /// If you create an ordinary session, e.g., from Python or C++,
  3504. /// then there is exactly one intra op thread pool per process.
  3505. /// The first session created determines the number of threads in this pool.
  3506. /// All subsequent sessions reuse/share this one global pool.
  3507. ///
  3508. /// There are notable exceptions to the default behavior described above:
  3509. /// 1. There is an environment variable for overriding this thread pool,
  3510. /// named TF_OVERRIDE_GLOBAL_THREADPOOL.
  3511. /// 2. When connecting to a server, such as a remote `tf.train.Server`
  3512. /// instance, then this option will be ignored altogether.
  3513. /// </summary>
  3514. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3515. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3516. public int IntraOpParallelismThreads {
  3517. get { return intraOpParallelismThreads_; }
  3518. set {
  3519. intraOpParallelismThreads_ = value;
  3520. }
  3521. }
  3522. /// <summary>Field number for the "inter_op_parallelism_threads" field.</summary>
  3523. public const int InterOpParallelismThreadsFieldNumber = 5;
  3524. private int interOpParallelismThreads_;
  3525. /// <summary>
  3526. /// Nodes that perform blocking operations are enqueued on a pool of
  3527. /// inter_op_parallelism_threads available in each process.
  3528. ///
  3529. /// 0 means the system picks an appropriate number.
  3530. /// Negative means all operations are performed in caller's thread.
  3531. ///
  3532. /// Note that the first Session created in the process sets the
  3533. /// number of threads for all future sessions unless use_per_session_threads is
  3534. /// true or session_inter_op_thread_pool is configured.
  3535. /// </summary>
  3536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3537. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3538. public int InterOpParallelismThreads {
  3539. get { return interOpParallelismThreads_; }
  3540. set {
  3541. interOpParallelismThreads_ = value;
  3542. }
  3543. }
  3544. /// <summary>Field number for the "use_per_session_threads" field.</summary>
  3545. public const int UsePerSessionThreadsFieldNumber = 9;
  3546. private bool usePerSessionThreads_;
  3547. /// <summary>
  3548. /// If true, use a new set of threads for this session rather than the global
  3549. /// pool of threads. Only supported by direct sessions.
  3550. ///
  3551. /// If false, use the global threads created by the first session, or the
  3552. /// per-session thread pools configured by session_inter_op_thread_pool.
  3553. ///
  3554. /// This option is deprecated. The same effect can be achieved by setting
  3555. /// session_inter_op_thread_pool to have one element, whose num_threads equals
  3556. /// inter_op_parallelism_threads.
  3557. /// </summary>
  3558. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3559. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3560. public bool UsePerSessionThreads {
  3561. get { return usePerSessionThreads_; }
  3562. set {
  3563. usePerSessionThreads_ = value;
  3564. }
  3565. }
  3566. /// <summary>Field number for the "session_inter_op_thread_pool" field.</summary>
  3567. public const int SessionInterOpThreadPoolFieldNumber = 12;
  3568. private static readonly pb::FieldCodec<global::Tensorflow.ThreadPoolOptionProto> _repeated_sessionInterOpThreadPool_codec
  3569. = pb::FieldCodec.ForMessage(98, global::Tensorflow.ThreadPoolOptionProto.Parser);
  3570. private readonly pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto> sessionInterOpThreadPool_ = new pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto>();
  3571. /// <summary>
  3572. /// This option is experimental - it may be replaced with a different mechanism
  3573. /// in the future.
  3574. ///
  3575. /// Configures session thread pools. If this is configured, then RunOptions for
  3576. /// a Run call can select the thread pool to use.
  3577. ///
  3578. /// The intended use is for when some session invocations need to run in a
  3579. /// background pool limited to a small number of threads:
  3580. /// - For example, a session may be configured to have one large pool (for
  3581. /// regular compute) and one small pool (for periodic, low priority work);
  3582. /// using the small pool is currently the mechanism for limiting the inter-op
  3583. /// parallelism of the low priority work. Note that it does not limit the
  3584. /// parallelism of work spawned by a single op kernel implementation.
  3585. /// - Using this setting is normally not needed in training, but may help some
  3586. /// serving use cases.
  3587. /// - It is also generally recommended to set the global_name field of this
  3588. /// proto, to avoid creating multiple large pools. It is typically better to
  3589. /// run the non-low-priority work, even across sessions, in a single large
  3590. /// pool.
  3591. /// </summary>
  3592. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3593. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3594. public pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto> SessionInterOpThreadPool {
  3595. get { return sessionInterOpThreadPool_; }
  3596. }
  3597. /// <summary>Field number for the "placement_period" field.</summary>
  3598. public const int PlacementPeriodFieldNumber = 3;
  3599. private int placementPeriod_;
  3600. /// <summary>
  3601. /// Assignment of Nodes to Devices is recomputed every placement_period
  3602. /// steps until the system warms up (at which point the recomputation
  3603. /// typically slows down automatically).
  3604. /// </summary>
  3605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3606. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3607. public int PlacementPeriod {
  3608. get { return placementPeriod_; }
  3609. set {
  3610. placementPeriod_ = value;
  3611. }
  3612. }
  3613. /// <summary>Field number for the "device_filters" field.</summary>
  3614. public const int DeviceFiltersFieldNumber = 4;
  3615. private static readonly pb::FieldCodec<string> _repeated_deviceFilters_codec
  3616. = pb::FieldCodec.ForString(34);
  3617. private readonly pbc::RepeatedField<string> deviceFilters_ = new pbc::RepeatedField<string>();
  3618. /// <summary>
  3619. /// When any filters are present sessions will ignore all devices which do not
  3620. /// match the filters. Each filter can be partially specified, e.g. "/job:ps"
  3621. /// "/job:worker/replica:3", etc.
  3622. /// </summary>
  3623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3624. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3625. public pbc::RepeatedField<string> DeviceFilters {
  3626. get { return deviceFilters_; }
  3627. }
  3628. /// <summary>Field number for the "gpu_options" field.</summary>
  3629. public const int GpuOptionsFieldNumber = 6;
  3630. private global::Tensorflow.GPUOptions gpuOptions_;
  3631. /// <summary>
  3632. /// Options that apply to all GPUs.
  3633. /// </summary>
  3634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3635. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3636. public global::Tensorflow.GPUOptions GpuOptions {
  3637. get { return gpuOptions_; }
  3638. set {
  3639. gpuOptions_ = value;
  3640. }
  3641. }
  3642. /// <summary>Field number for the "allow_soft_placement" field.</summary>
  3643. public const int AllowSoftPlacementFieldNumber = 7;
  3644. private bool allowSoftPlacement_;
  3645. /// <summary>
  3646. /// Whether soft placement is allowed. If allow_soft_placement is true,
  3647. /// an op will be placed on CPU if
  3648. /// 1. there's no GPU implementation for the OP
  3649. /// or
  3650. /// 2. no GPU devices are known or registered
  3651. /// or
  3652. /// 3. need to co-locate with reftype input(s) which are from CPU.
  3653. /// </summary>
  3654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3655. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3656. public bool AllowSoftPlacement {
  3657. get { return allowSoftPlacement_; }
  3658. set {
  3659. allowSoftPlacement_ = value;
  3660. }
  3661. }
  3662. /// <summary>Field number for the "log_device_placement" field.</summary>
  3663. public const int LogDevicePlacementFieldNumber = 8;
  3664. private bool logDevicePlacement_;
  3665. /// <summary>
  3666. /// Whether device placements should be logged.
  3667. /// </summary>
  3668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3669. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3670. public bool LogDevicePlacement {
  3671. get { return logDevicePlacement_; }
  3672. set {
  3673. logDevicePlacement_ = value;
  3674. }
  3675. }
  3676. /// <summary>Field number for the "graph_options" field.</summary>
  3677. public const int GraphOptionsFieldNumber = 10;
  3678. private global::Tensorflow.GraphOptions graphOptions_;
  3679. /// <summary>
  3680. /// Options that apply to all graphs.
  3681. /// </summary>
  3682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3683. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3684. public global::Tensorflow.GraphOptions GraphOptions {
  3685. get { return graphOptions_; }
  3686. set {
  3687. graphOptions_ = value;
  3688. }
  3689. }
  3690. /// <summary>Field number for the "operation_timeout_in_ms" field.</summary>
  3691. public const int OperationTimeoutInMsFieldNumber = 11;
  3692. private long operationTimeoutInMs_;
  3693. /// <summary>
  3694. /// Global timeout for all blocking operations in this session. If non-zero,
  3695. /// and not overridden on a per-operation basis, this value will be used as the
  3696. /// deadline for all blocking operations.
  3697. /// </summary>
  3698. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3699. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3700. public long OperationTimeoutInMs {
  3701. get { return operationTimeoutInMs_; }
  3702. set {
  3703. operationTimeoutInMs_ = value;
  3704. }
  3705. }
  3706. /// <summary>Field number for the "rpc_options" field.</summary>
  3707. public const int RpcOptionsFieldNumber = 13;
  3708. private global::Tensorflow.RPCOptions rpcOptions_;
  3709. /// <summary>
  3710. /// Options that apply when this session uses the distributed runtime.
  3711. /// </summary>
  3712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3713. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3714. public global::Tensorflow.RPCOptions RpcOptions {
  3715. get { return rpcOptions_; }
  3716. set {
  3717. rpcOptions_ = value;
  3718. }
  3719. }
  3720. /// <summary>Field number for the "cluster_def" field.</summary>
  3721. public const int ClusterDefFieldNumber = 14;
  3722. private global::Tensorflow.ClusterDef clusterDef_;
  3723. /// <summary>
  3724. /// Optional list of all workers to use in this session.
  3725. /// </summary>
  3726. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3727. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3728. public global::Tensorflow.ClusterDef ClusterDef {
  3729. get { return clusterDef_; }
  3730. set {
  3731. clusterDef_ = value;
  3732. }
  3733. }
  3734. /// <summary>Field number for the "isolate_session_state" field.</summary>
  3735. public const int IsolateSessionStateFieldNumber = 15;
  3736. private bool isolateSessionState_;
  3737. /// <summary>
  3738. /// If true, any resources such as Variables used in the session will not be
  3739. /// shared with other sessions. However, when clusterspec propagation is
  3740. /// enabled, this field is ignored and sessions are always isolated.
  3741. /// </summary>
  3742. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3743. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3744. public bool IsolateSessionState {
  3745. get { return isolateSessionState_; }
  3746. set {
  3747. isolateSessionState_ = value;
  3748. }
  3749. }
  3750. /// <summary>Field number for the "share_cluster_devices_in_session" field.</summary>
  3751. public const int ShareClusterDevicesInSessionFieldNumber = 17;
  3752. private bool shareClusterDevicesInSession_;
  3753. /// <summary>
  3754. /// When true, WorkerSessions are created with device attributes from the
  3755. /// full cluster.
  3756. /// This is helpful when a worker wants to partition a graph
  3757. /// (for example during a PartitionedCallOp).
  3758. /// </summary>
  3759. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3760. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3761. public bool ShareClusterDevicesInSession {
  3762. get { return shareClusterDevicesInSession_; }
  3763. set {
  3764. shareClusterDevicesInSession_ = value;
  3765. }
  3766. }
  3767. /// <summary>Field number for the "experimental" field.</summary>
  3768. public const int ExperimentalFieldNumber = 16;
  3769. private global::Tensorflow.ConfigProto.Types.Experimental experimental_;
  3770. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3771. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3772. public global::Tensorflow.ConfigProto.Types.Experimental Experimental {
  3773. get { return experimental_; }
  3774. set {
  3775. experimental_ = value;
  3776. }
  3777. }
  3778. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3779. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3780. public override bool Equals(object other) {
  3781. return Equals(other as ConfigProto);
  3782. }
  3783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3784. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3785. public bool Equals(ConfigProto other) {
  3786. if (ReferenceEquals(other, null)) {
  3787. return false;
  3788. }
  3789. if (ReferenceEquals(other, this)) {
  3790. return true;
  3791. }
  3792. if (!DeviceCount.Equals(other.DeviceCount)) return false;
  3793. if (IntraOpParallelismThreads != other.IntraOpParallelismThreads) return false;
  3794. if (InterOpParallelismThreads != other.InterOpParallelismThreads) return false;
  3795. if (UsePerSessionThreads != other.UsePerSessionThreads) return false;
  3796. if(!sessionInterOpThreadPool_.Equals(other.sessionInterOpThreadPool_)) return false;
  3797. if (PlacementPeriod != other.PlacementPeriod) return false;
  3798. if(!deviceFilters_.Equals(other.deviceFilters_)) return false;
  3799. if (!object.Equals(GpuOptions, other.GpuOptions)) return false;
  3800. if (AllowSoftPlacement != other.AllowSoftPlacement) return false;
  3801. if (LogDevicePlacement != other.LogDevicePlacement) return false;
  3802. if (!object.Equals(GraphOptions, other.GraphOptions)) return false;
  3803. if (OperationTimeoutInMs != other.OperationTimeoutInMs) return false;
  3804. if (!object.Equals(RpcOptions, other.RpcOptions)) return false;
  3805. if (!object.Equals(ClusterDef, other.ClusterDef)) return false;
  3806. if (IsolateSessionState != other.IsolateSessionState) return false;
  3807. if (ShareClusterDevicesInSession != other.ShareClusterDevicesInSession) return false;
  3808. if (!object.Equals(Experimental, other.Experimental)) return false;
  3809. return Equals(_unknownFields, other._unknownFields);
  3810. }
  3811. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3812. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3813. public override int GetHashCode() {
  3814. int hash = 1;
  3815. hash ^= DeviceCount.GetHashCode();
  3816. if (IntraOpParallelismThreads != 0) hash ^= IntraOpParallelismThreads.GetHashCode();
  3817. if (InterOpParallelismThreads != 0) hash ^= InterOpParallelismThreads.GetHashCode();
  3818. if (UsePerSessionThreads != false) hash ^= UsePerSessionThreads.GetHashCode();
  3819. hash ^= sessionInterOpThreadPool_.GetHashCode();
  3820. if (PlacementPeriod != 0) hash ^= PlacementPeriod.GetHashCode();
  3821. hash ^= deviceFilters_.GetHashCode();
  3822. if (gpuOptions_ != null) hash ^= GpuOptions.GetHashCode();
  3823. if (AllowSoftPlacement != false) hash ^= AllowSoftPlacement.GetHashCode();
  3824. if (LogDevicePlacement != false) hash ^= LogDevicePlacement.GetHashCode();
  3825. if (graphOptions_ != null) hash ^= GraphOptions.GetHashCode();
  3826. if (OperationTimeoutInMs != 0L) hash ^= OperationTimeoutInMs.GetHashCode();
  3827. if (rpcOptions_ != null) hash ^= RpcOptions.GetHashCode();
  3828. if (clusterDef_ != null) hash ^= ClusterDef.GetHashCode();
  3829. if (IsolateSessionState != false) hash ^= IsolateSessionState.GetHashCode();
  3830. if (ShareClusterDevicesInSession != false) hash ^= ShareClusterDevicesInSession.GetHashCode();
  3831. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  3832. if (_unknownFields != null) {
  3833. hash ^= _unknownFields.GetHashCode();
  3834. }
  3835. return hash;
  3836. }
  3837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3838. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3839. public override string ToString() {
  3840. return pb::JsonFormatter.ToDiagnosticString(this);
  3841. }
  3842. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3843. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3844. public void WriteTo(pb::CodedOutputStream output) {
  3845. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3846. output.WriteRawMessage(this);
  3847. #else
  3848. deviceCount_.WriteTo(output, _map_deviceCount_codec);
  3849. if (IntraOpParallelismThreads != 0) {
  3850. output.WriteRawTag(16);
  3851. output.WriteInt32(IntraOpParallelismThreads);
  3852. }
  3853. if (PlacementPeriod != 0) {
  3854. output.WriteRawTag(24);
  3855. output.WriteInt32(PlacementPeriod);
  3856. }
  3857. deviceFilters_.WriteTo(output, _repeated_deviceFilters_codec);
  3858. if (InterOpParallelismThreads != 0) {
  3859. output.WriteRawTag(40);
  3860. output.WriteInt32(InterOpParallelismThreads);
  3861. }
  3862. if (gpuOptions_ != null) {
  3863. output.WriteRawTag(50);
  3864. output.WriteMessage(GpuOptions);
  3865. }
  3866. if (AllowSoftPlacement != false) {
  3867. output.WriteRawTag(56);
  3868. output.WriteBool(AllowSoftPlacement);
  3869. }
  3870. if (LogDevicePlacement != false) {
  3871. output.WriteRawTag(64);
  3872. output.WriteBool(LogDevicePlacement);
  3873. }
  3874. if (UsePerSessionThreads != false) {
  3875. output.WriteRawTag(72);
  3876. output.WriteBool(UsePerSessionThreads);
  3877. }
  3878. if (graphOptions_ != null) {
  3879. output.WriteRawTag(82);
  3880. output.WriteMessage(GraphOptions);
  3881. }
  3882. if (OperationTimeoutInMs != 0L) {
  3883. output.WriteRawTag(88);
  3884. output.WriteInt64(OperationTimeoutInMs);
  3885. }
  3886. sessionInterOpThreadPool_.WriteTo(output, _repeated_sessionInterOpThreadPool_codec);
  3887. if (rpcOptions_ != null) {
  3888. output.WriteRawTag(106);
  3889. output.WriteMessage(RpcOptions);
  3890. }
  3891. if (clusterDef_ != null) {
  3892. output.WriteRawTag(114);
  3893. output.WriteMessage(ClusterDef);
  3894. }
  3895. if (IsolateSessionState != false) {
  3896. output.WriteRawTag(120);
  3897. output.WriteBool(IsolateSessionState);
  3898. }
  3899. if (experimental_ != null) {
  3900. output.WriteRawTag(130, 1);
  3901. output.WriteMessage(Experimental);
  3902. }
  3903. if (ShareClusterDevicesInSession != false) {
  3904. output.WriteRawTag(136, 1);
  3905. output.WriteBool(ShareClusterDevicesInSession);
  3906. }
  3907. if (_unknownFields != null) {
  3908. _unknownFields.WriteTo(output);
  3909. }
  3910. #endif
  3911. }
  3912. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  3913. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3914. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3915. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  3916. deviceCount_.WriteTo(ref output, _map_deviceCount_codec);
  3917. if (IntraOpParallelismThreads != 0) {
  3918. output.WriteRawTag(16);
  3919. output.WriteInt32(IntraOpParallelismThreads);
  3920. }
  3921. if (PlacementPeriod != 0) {
  3922. output.WriteRawTag(24);
  3923. output.WriteInt32(PlacementPeriod);
  3924. }
  3925. deviceFilters_.WriteTo(ref output, _repeated_deviceFilters_codec);
  3926. if (InterOpParallelismThreads != 0) {
  3927. output.WriteRawTag(40);
  3928. output.WriteInt32(InterOpParallelismThreads);
  3929. }
  3930. if (gpuOptions_ != null) {
  3931. output.WriteRawTag(50);
  3932. output.WriteMessage(GpuOptions);
  3933. }
  3934. if (AllowSoftPlacement != false) {
  3935. output.WriteRawTag(56);
  3936. output.WriteBool(AllowSoftPlacement);
  3937. }
  3938. if (LogDevicePlacement != false) {
  3939. output.WriteRawTag(64);
  3940. output.WriteBool(LogDevicePlacement);
  3941. }
  3942. if (UsePerSessionThreads != false) {
  3943. output.WriteRawTag(72);
  3944. output.WriteBool(UsePerSessionThreads);
  3945. }
  3946. if (graphOptions_ != null) {
  3947. output.WriteRawTag(82);
  3948. output.WriteMessage(GraphOptions);
  3949. }
  3950. if (OperationTimeoutInMs != 0L) {
  3951. output.WriteRawTag(88);
  3952. output.WriteInt64(OperationTimeoutInMs);
  3953. }
  3954. sessionInterOpThreadPool_.WriteTo(ref output, _repeated_sessionInterOpThreadPool_codec);
  3955. if (rpcOptions_ != null) {
  3956. output.WriteRawTag(106);
  3957. output.WriteMessage(RpcOptions);
  3958. }
  3959. if (clusterDef_ != null) {
  3960. output.WriteRawTag(114);
  3961. output.WriteMessage(ClusterDef);
  3962. }
  3963. if (IsolateSessionState != false) {
  3964. output.WriteRawTag(120);
  3965. output.WriteBool(IsolateSessionState);
  3966. }
  3967. if (experimental_ != null) {
  3968. output.WriteRawTag(130, 1);
  3969. output.WriteMessage(Experimental);
  3970. }
  3971. if (ShareClusterDevicesInSession != false) {
  3972. output.WriteRawTag(136, 1);
  3973. output.WriteBool(ShareClusterDevicesInSession);
  3974. }
  3975. if (_unknownFields != null) {
  3976. _unknownFields.WriteTo(ref output);
  3977. }
  3978. }
  3979. #endif
  3980. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3981. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  3982. public int CalculateSize() {
  3983. int size = 0;
  3984. size += deviceCount_.CalculateSize(_map_deviceCount_codec);
  3985. if (IntraOpParallelismThreads != 0) {
  3986. size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntraOpParallelismThreads);
  3987. }
  3988. if (InterOpParallelismThreads != 0) {
  3989. size += 1 + pb::CodedOutputStream.ComputeInt32Size(InterOpParallelismThreads);
  3990. }
  3991. if (UsePerSessionThreads != false) {
  3992. size += 1 + 1;
  3993. }
  3994. size += sessionInterOpThreadPool_.CalculateSize(_repeated_sessionInterOpThreadPool_codec);
  3995. if (PlacementPeriod != 0) {
  3996. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlacementPeriod);
  3997. }
  3998. size += deviceFilters_.CalculateSize(_repeated_deviceFilters_codec);
  3999. if (gpuOptions_ != null) {
  4000. size += 1 + pb::CodedOutputStream.ComputeMessageSize(GpuOptions);
  4001. }
  4002. if (AllowSoftPlacement != false) {
  4003. size += 1 + 1;
  4004. }
  4005. if (LogDevicePlacement != false) {
  4006. size += 1 + 1;
  4007. }
  4008. if (graphOptions_ != null) {
  4009. size += 1 + pb::CodedOutputStream.ComputeMessageSize(GraphOptions);
  4010. }
  4011. if (OperationTimeoutInMs != 0L) {
  4012. size += 1 + pb::CodedOutputStream.ComputeInt64Size(OperationTimeoutInMs);
  4013. }
  4014. if (rpcOptions_ != null) {
  4015. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RpcOptions);
  4016. }
  4017. if (clusterDef_ != null) {
  4018. size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClusterDef);
  4019. }
  4020. if (IsolateSessionState != false) {
  4021. size += 1 + 1;
  4022. }
  4023. if (ShareClusterDevicesInSession != false) {
  4024. size += 2 + 1;
  4025. }
  4026. if (experimental_ != null) {
  4027. size += 2 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  4028. }
  4029. if (_unknownFields != null) {
  4030. size += _unknownFields.CalculateSize();
  4031. }
  4032. return size;
  4033. }
  4034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4035. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4036. public void MergeFrom(ConfigProto other) {
  4037. if (other == null) {
  4038. return;
  4039. }
  4040. deviceCount_.Add(other.deviceCount_);
  4041. if (other.IntraOpParallelismThreads != 0) {
  4042. IntraOpParallelismThreads = other.IntraOpParallelismThreads;
  4043. }
  4044. if (other.InterOpParallelismThreads != 0) {
  4045. InterOpParallelismThreads = other.InterOpParallelismThreads;
  4046. }
  4047. if (other.UsePerSessionThreads != false) {
  4048. UsePerSessionThreads = other.UsePerSessionThreads;
  4049. }
  4050. sessionInterOpThreadPool_.Add(other.sessionInterOpThreadPool_);
  4051. if (other.PlacementPeriod != 0) {
  4052. PlacementPeriod = other.PlacementPeriod;
  4053. }
  4054. deviceFilters_.Add(other.deviceFilters_);
  4055. if (other.gpuOptions_ != null) {
  4056. if (gpuOptions_ == null) {
  4057. GpuOptions = new global::Tensorflow.GPUOptions();
  4058. }
  4059. GpuOptions.MergeFrom(other.GpuOptions);
  4060. }
  4061. if (other.AllowSoftPlacement != false) {
  4062. AllowSoftPlacement = other.AllowSoftPlacement;
  4063. }
  4064. if (other.LogDevicePlacement != false) {
  4065. LogDevicePlacement = other.LogDevicePlacement;
  4066. }
  4067. if (other.graphOptions_ != null) {
  4068. if (graphOptions_ == null) {
  4069. GraphOptions = new global::Tensorflow.GraphOptions();
  4070. }
  4071. GraphOptions.MergeFrom(other.GraphOptions);
  4072. }
  4073. if (other.OperationTimeoutInMs != 0L) {
  4074. OperationTimeoutInMs = other.OperationTimeoutInMs;
  4075. }
  4076. if (other.rpcOptions_ != null) {
  4077. if (rpcOptions_ == null) {
  4078. RpcOptions = new global::Tensorflow.RPCOptions();
  4079. }
  4080. RpcOptions.MergeFrom(other.RpcOptions);
  4081. }
  4082. if (other.clusterDef_ != null) {
  4083. if (clusterDef_ == null) {
  4084. ClusterDef = new global::Tensorflow.ClusterDef();
  4085. }
  4086. ClusterDef.MergeFrom(other.ClusterDef);
  4087. }
  4088. if (other.IsolateSessionState != false) {
  4089. IsolateSessionState = other.IsolateSessionState;
  4090. }
  4091. if (other.ShareClusterDevicesInSession != false) {
  4092. ShareClusterDevicesInSession = other.ShareClusterDevicesInSession;
  4093. }
  4094. if (other.experimental_ != null) {
  4095. if (experimental_ == null) {
  4096. Experimental = new global::Tensorflow.ConfigProto.Types.Experimental();
  4097. }
  4098. Experimental.MergeFrom(other.Experimental);
  4099. }
  4100. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  4101. }
  4102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4103. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4104. public void MergeFrom(pb::CodedInputStream input) {
  4105. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  4106. input.ReadRawMessage(this);
  4107. #else
  4108. uint tag;
  4109. while ((tag = input.ReadTag()) != 0) {
  4110. switch(tag) {
  4111. default:
  4112. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  4113. break;
  4114. case 10: {
  4115. deviceCount_.AddEntriesFrom(input, _map_deviceCount_codec);
  4116. break;
  4117. }
  4118. case 16: {
  4119. IntraOpParallelismThreads = input.ReadInt32();
  4120. break;
  4121. }
  4122. case 24: {
  4123. PlacementPeriod = input.ReadInt32();
  4124. break;
  4125. }
  4126. case 34: {
  4127. deviceFilters_.AddEntriesFrom(input, _repeated_deviceFilters_codec);
  4128. break;
  4129. }
  4130. case 40: {
  4131. InterOpParallelismThreads = input.ReadInt32();
  4132. break;
  4133. }
  4134. case 50: {
  4135. if (gpuOptions_ == null) {
  4136. GpuOptions = new global::Tensorflow.GPUOptions();
  4137. }
  4138. input.ReadMessage(GpuOptions);
  4139. break;
  4140. }
  4141. case 56: {
  4142. AllowSoftPlacement = input.ReadBool();
  4143. break;
  4144. }
  4145. case 64: {
  4146. LogDevicePlacement = input.ReadBool();
  4147. break;
  4148. }
  4149. case 72: {
  4150. UsePerSessionThreads = input.ReadBool();
  4151. break;
  4152. }
  4153. case 82: {
  4154. if (graphOptions_ == null) {
  4155. GraphOptions = new global::Tensorflow.GraphOptions();
  4156. }
  4157. input.ReadMessage(GraphOptions);
  4158. break;
  4159. }
  4160. case 88: {
  4161. OperationTimeoutInMs = input.ReadInt64();
  4162. break;
  4163. }
  4164. case 98: {
  4165. sessionInterOpThreadPool_.AddEntriesFrom(input, _repeated_sessionInterOpThreadPool_codec);
  4166. break;
  4167. }
  4168. case 106: {
  4169. if (rpcOptions_ == null) {
  4170. RpcOptions = new global::Tensorflow.RPCOptions();
  4171. }
  4172. input.ReadMessage(RpcOptions);
  4173. break;
  4174. }
  4175. case 114: {
  4176. if (clusterDef_ == null) {
  4177. ClusterDef = new global::Tensorflow.ClusterDef();
  4178. }
  4179. input.ReadMessage(ClusterDef);
  4180. break;
  4181. }
  4182. case 120: {
  4183. IsolateSessionState = input.ReadBool();
  4184. break;
  4185. }
  4186. case 130: {
  4187. if (experimental_ == null) {
  4188. Experimental = new global::Tensorflow.ConfigProto.Types.Experimental();
  4189. }
  4190. input.ReadMessage(Experimental);
  4191. break;
  4192. }
  4193. case 136: {
  4194. ShareClusterDevicesInSession = input.ReadBool();
  4195. break;
  4196. }
  4197. }
  4198. }
  4199. #endif
  4200. }
  4201. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  4202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4203. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4204. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  4205. uint tag;
  4206. while ((tag = input.ReadTag()) != 0) {
  4207. switch(tag) {
  4208. default:
  4209. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  4210. break;
  4211. case 10: {
  4212. deviceCount_.AddEntriesFrom(ref input, _map_deviceCount_codec);
  4213. break;
  4214. }
  4215. case 16: {
  4216. IntraOpParallelismThreads = input.ReadInt32();
  4217. break;
  4218. }
  4219. case 24: {
  4220. PlacementPeriod = input.ReadInt32();
  4221. break;
  4222. }
  4223. case 34: {
  4224. deviceFilters_.AddEntriesFrom(ref input, _repeated_deviceFilters_codec);
  4225. break;
  4226. }
  4227. case 40: {
  4228. InterOpParallelismThreads = input.ReadInt32();
  4229. break;
  4230. }
  4231. case 50: {
  4232. if (gpuOptions_ == null) {
  4233. GpuOptions = new global::Tensorflow.GPUOptions();
  4234. }
  4235. input.ReadMessage(GpuOptions);
  4236. break;
  4237. }
  4238. case 56: {
  4239. AllowSoftPlacement = input.ReadBool();
  4240. break;
  4241. }
  4242. case 64: {
  4243. LogDevicePlacement = input.ReadBool();
  4244. break;
  4245. }
  4246. case 72: {
  4247. UsePerSessionThreads = input.ReadBool();
  4248. break;
  4249. }
  4250. case 82: {
  4251. if (graphOptions_ == null) {
  4252. GraphOptions = new global::Tensorflow.GraphOptions();
  4253. }
  4254. input.ReadMessage(GraphOptions);
  4255. break;
  4256. }
  4257. case 88: {
  4258. OperationTimeoutInMs = input.ReadInt64();
  4259. break;
  4260. }
  4261. case 98: {
  4262. sessionInterOpThreadPool_.AddEntriesFrom(ref input, _repeated_sessionInterOpThreadPool_codec);
  4263. break;
  4264. }
  4265. case 106: {
  4266. if (rpcOptions_ == null) {
  4267. RpcOptions = new global::Tensorflow.RPCOptions();
  4268. }
  4269. input.ReadMessage(RpcOptions);
  4270. break;
  4271. }
  4272. case 114: {
  4273. if (clusterDef_ == null) {
  4274. ClusterDef = new global::Tensorflow.ClusterDef();
  4275. }
  4276. input.ReadMessage(ClusterDef);
  4277. break;
  4278. }
  4279. case 120: {
  4280. IsolateSessionState = input.ReadBool();
  4281. break;
  4282. }
  4283. case 130: {
  4284. if (experimental_ == null) {
  4285. Experimental = new global::Tensorflow.ConfigProto.Types.Experimental();
  4286. }
  4287. input.ReadMessage(Experimental);
  4288. break;
  4289. }
  4290. case 136: {
  4291. ShareClusterDevicesInSession = input.ReadBool();
  4292. break;
  4293. }
  4294. }
  4295. }
  4296. }
  4297. #endif
  4298. #region Nested types
  4299. /// <summary>Container for nested types declared in the ConfigProto message type.</summary>
  4300. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4301. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4302. public static partial class Types {
  4303. /// <summary>
  4304. /// Everything inside Experimental is subject to change and is not subject
  4305. /// to API stability guarantees in
  4306. /// https://www.tensorflow.org/guide/version_compat.
  4307. /// </summary>
  4308. public sealed partial class Experimental : pb::IMessage<Experimental>
  4309. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  4310. , pb::IBufferMessage
  4311. #endif
  4312. {
  4313. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  4314. private pb::UnknownFieldSet _unknownFields;
  4315. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4316. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4317. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  4318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4319. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4320. public static pbr::MessageDescriptor Descriptor {
  4321. get { return global::Tensorflow.ConfigProto.Descriptor.NestedTypes[1]; }
  4322. }
  4323. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4324. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4325. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4326. get { return Descriptor; }
  4327. }
  4328. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4329. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4330. public Experimental() {
  4331. OnConstruction();
  4332. }
  4333. partial void OnConstruction();
  4334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4335. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4336. public Experimental(Experimental other) : this() {
  4337. collectiveGroupLeader_ = other.collectiveGroupLeader_;
  4338. executorType_ = other.executorType_;
  4339. recvBufMaxChunk_ = other.recvBufMaxChunk_;
  4340. useNumaAffinity_ = other.useNumaAffinity_;
  4341. collectiveDeterministicSequentialExecution_ = other.collectiveDeterministicSequentialExecution_;
  4342. collectiveNccl_ = other.collectiveNccl_;
  4343. shareSessionStateInClusterspecPropagation_ = other.shareSessionStateInClusterspecPropagation_;
  4344. disableThreadSpinning_ = other.disableThreadSpinning_;
  4345. shareClusterDevicesInSession_ = other.shareClusterDevicesInSession_;
  4346. sessionMetadata_ = other.sessionMetadata_ != null ? other.sessionMetadata_.Clone() : null;
  4347. optimizeForStaticGraph_ = other.optimizeForStaticGraph_;
  4348. enableMlirBridge_ = other.enableMlirBridge_;
  4349. mlirBridgeRollout_ = other.mlirBridgeRollout_;
  4350. enableMlirGraphOptimization_ = other.enableMlirGraphOptimization_;
  4351. disableOutputPartitionGraphs_ = other.disableOutputPartitionGraphs_;
  4352. xlaFusionAutotunerThresh_ = other.xlaFusionAutotunerThresh_;
  4353. useTfrt_ = other.useTfrt_;
  4354. disableFunctionalOpsLowering_ = other.disableFunctionalOpsLowering_;
  4355. xlaPreferSingleGraphCluster_ = other.xlaPreferSingleGraphCluster_;
  4356. coordinationConfig_ = other.coordinationConfig_ != null ? other.coordinationConfig_.Clone() : null;
  4357. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  4358. }
  4359. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4360. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4361. public Experimental Clone() {
  4362. return new Experimental(this);
  4363. }
  4364. /// <summary>Field number for the "collective_group_leader" field.</summary>
  4365. public const int CollectiveGroupLeaderFieldNumber = 1;
  4366. private string collectiveGroupLeader_ = "";
  4367. /// <summary>
  4368. /// Task name for group resolution.
  4369. /// </summary>
  4370. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4371. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4372. public string CollectiveGroupLeader {
  4373. get { return collectiveGroupLeader_; }
  4374. set {
  4375. collectiveGroupLeader_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  4376. }
  4377. }
  4378. /// <summary>Field number for the "executor_type" field.</summary>
  4379. public const int ExecutorTypeFieldNumber = 3;
  4380. private string executorType_ = "";
  4381. /// <summary>
  4382. /// Which executor to use, the default executor will be used
  4383. /// if it is an empty string or "DEFAULT"
  4384. /// </summary>
  4385. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4386. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4387. public string ExecutorType {
  4388. get { return executorType_; }
  4389. set {
  4390. executorType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  4391. }
  4392. }
  4393. /// <summary>Field number for the "recv_buf_max_chunk" field.</summary>
  4394. public const int RecvBufMaxChunkFieldNumber = 4;
  4395. private int recvBufMaxChunk_;
  4396. /// <summary>
  4397. /// Guidance to formatting of large RecvBuf fields for transfer.
  4398. /// Any positive value sets the max chunk size. 0 defaults to 4096.
  4399. /// Any negative value indicates no max, i.e. one chunk only.
  4400. /// </summary>
  4401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4402. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4403. public int RecvBufMaxChunk {
  4404. get { return recvBufMaxChunk_; }
  4405. set {
  4406. recvBufMaxChunk_ = value;
  4407. }
  4408. }
  4409. /// <summary>Field number for the "use_numa_affinity" field.</summary>
  4410. public const int UseNumaAffinityFieldNumber = 5;
  4411. private bool useNumaAffinity_;
  4412. /// <summary>
  4413. /// If true, and supported by the platform, the runtime will attempt to
  4414. /// use NUMA affinity where applicable. One consequence will be the
  4415. /// existence of as many CPU devices as there are available NUMA nodes.
  4416. /// </summary>
  4417. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4418. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4419. public bool UseNumaAffinity {
  4420. get { return useNumaAffinity_; }
  4421. set {
  4422. useNumaAffinity_ = value;
  4423. }
  4424. }
  4425. /// <summary>Field number for the "collective_deterministic_sequential_execution" field.</summary>
  4426. public const int CollectiveDeterministicSequentialExecutionFieldNumber = 6;
  4427. private bool collectiveDeterministicSequentialExecution_;
  4428. /// <summary>
  4429. /// If true, make collective op execution order sequential and deterministic
  4430. /// for potentially concurrent collective instances.
  4431. /// </summary>
  4432. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4433. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4434. public bool CollectiveDeterministicSequentialExecution {
  4435. get { return collectiveDeterministicSequentialExecution_; }
  4436. set {
  4437. collectiveDeterministicSequentialExecution_ = value;
  4438. }
  4439. }
  4440. /// <summary>Field number for the "collective_nccl" field.</summary>
  4441. public const int CollectiveNcclFieldNumber = 7;
  4442. private bool collectiveNccl_;
  4443. /// <summary>
  4444. /// If true, use NCCL for CollectiveOps. This feature is highly
  4445. /// experimental.
  4446. /// </summary>
  4447. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4448. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4449. public bool CollectiveNccl {
  4450. get { return collectiveNccl_; }
  4451. set {
  4452. collectiveNccl_ = value;
  4453. }
  4454. }
  4455. /// <summary>Field number for the "share_session_state_in_clusterspec_propagation" field.</summary>
  4456. public const int ShareSessionStateInClusterspecPropagationFieldNumber = 8;
  4457. private bool shareSessionStateInClusterspecPropagation_;
  4458. /// <summary>
  4459. /// In the following, session state means the value of a variable, elements
  4460. /// in a hash table, or any other resource, accessible by worker sessions
  4461. /// held by a TF server.
  4462. ///
  4463. /// When ClusterSpec propagation is enabled, the value of
  4464. /// isolate_session_state is ignored when deciding whether to share session
  4465. /// states in a TF server (for backwards compatibility reasons).
  4466. /// - If share_session_state_in_clusterspec_propagation is true, the session
  4467. /// states are shared.
  4468. /// - If share_session_state_in_clusterspec_propagation is false, session
  4469. /// states are isolated.
  4470. ///
  4471. /// When clusterspec propagation is not used, the value of
  4472. /// share_session_state_in_clusterspec_propagation is ignored when deciding
  4473. /// whether to share session states in a TF server.
  4474. /// - If isolate_session_state is true, session states are isolated.
  4475. /// - If isolate_session_state is false, session states are shared.
  4476. ///
  4477. /// TODO(b/129330037): Add a single API that consistently treats
  4478. /// isolate_session_state and ClusterSpec propagation.
  4479. /// </summary>
  4480. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4481. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4482. public bool ShareSessionStateInClusterspecPropagation {
  4483. get { return shareSessionStateInClusterspecPropagation_; }
  4484. set {
  4485. shareSessionStateInClusterspecPropagation_ = value;
  4486. }
  4487. }
  4488. /// <summary>Field number for the "disable_thread_spinning" field.</summary>
  4489. public const int DisableThreadSpinningFieldNumber = 9;
  4490. private bool disableThreadSpinning_;
  4491. /// <summary>
  4492. /// If using a direct session, disable spinning while waiting for work in
  4493. /// the thread pool. This may result in higher latency for completing ops,
  4494. /// but in the case where there is a lot of spinning may result in lower
  4495. /// CPU usage.
  4496. /// </summary>
  4497. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4498. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4499. public bool DisableThreadSpinning {
  4500. get { return disableThreadSpinning_; }
  4501. set {
  4502. disableThreadSpinning_ = value;
  4503. }
  4504. }
  4505. /// <summary>Field number for the "share_cluster_devices_in_session" field.</summary>
  4506. public const int ShareClusterDevicesInSessionFieldNumber = 10;
  4507. private bool shareClusterDevicesInSession_;
  4508. /// <summary>
  4509. /// This was promoted to a non-experimental API. Please use
  4510. /// ConfigProto.share_cluster_devices_in_session instead.
  4511. /// </summary>
  4512. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4513. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4514. public bool ShareClusterDevicesInSession {
  4515. get { return shareClusterDevicesInSession_; }
  4516. set {
  4517. shareClusterDevicesInSession_ = value;
  4518. }
  4519. }
  4520. /// <summary>Field number for the "session_metadata" field.</summary>
  4521. public const int SessionMetadataFieldNumber = 11;
  4522. private global::Tensorflow.SessionMetadata sessionMetadata_;
  4523. /// <summary>
  4524. /// Metadata about the session.
  4525. ///
  4526. /// If set, this can be used by the runtime and the Ops for debugging,
  4527. /// monitoring, etc.
  4528. ///
  4529. /// NOTE: This is currently used and propagated only by the direct session.
  4530. /// </summary>
  4531. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4532. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4533. public global::Tensorflow.SessionMetadata SessionMetadata {
  4534. get { return sessionMetadata_; }
  4535. set {
  4536. sessionMetadata_ = value;
  4537. }
  4538. }
  4539. /// <summary>Field number for the "optimize_for_static_graph" field.</summary>
  4540. public const int OptimizeForStaticGraphFieldNumber = 12;
  4541. private bool optimizeForStaticGraph_;
  4542. /// <summary>
  4543. /// If true, the session may treat the graph as being static for optimization
  4544. /// purposes.
  4545. ///
  4546. /// If this option is set to true when a session is created, the full
  4547. /// GraphDef must be passed in a single call to Session::Create(), and
  4548. /// Session::Extend() may not be supported.
  4549. /// </summary>
  4550. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4551. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4552. public bool OptimizeForStaticGraph {
  4553. get { return optimizeForStaticGraph_; }
  4554. set {
  4555. optimizeForStaticGraph_ = value;
  4556. }
  4557. }
  4558. /// <summary>Field number for the "enable_mlir_bridge" field.</summary>
  4559. public const int EnableMlirBridgeFieldNumber = 13;
  4560. private bool enableMlirBridge_;
  4561. /// <summary>
  4562. /// This field will eventually be deprecated and replaced by
  4563. /// mlir_bridge_rollout (b/166038521).
  4564. ///
  4565. /// Whether to enable the MLIR-based TF->XLA bridge.
  4566. ///
  4567. /// This is a replacement to the existing bridge, and not ready for
  4568. /// production usage yet.
  4569. /// If this option is set to true when a session is created, MLIR is used to
  4570. /// perform the set of graph transformations to put the graph in a form that
  4571. /// can be executed with delegation of some computations to an accelerator.
  4572. /// This builds on the model of XLA where a subset of the graph is
  4573. /// encapsulated and attached to a "compile" operation, whose result is fed
  4574. /// to an "execute" operation. The kernel for these operations is responsible
  4575. /// to lower the encapsulated graph to a particular device.
  4576. /// </summary>
  4577. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4578. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4579. public bool EnableMlirBridge {
  4580. get { return enableMlirBridge_; }
  4581. set {
  4582. enableMlirBridge_ = value;
  4583. }
  4584. }
  4585. /// <summary>Field number for the "mlir_bridge_rollout" field.</summary>
  4586. public const int MlirBridgeRolloutFieldNumber = 17;
  4587. private global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout mlirBridgeRollout_ = global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified;
  4588. /// <summary>
  4589. /// This field is underdevelopment, for now use enable_mlir_bridge
  4590. /// (b/166038521).
  4591. ///
  4592. /// Whether to enable the MLIR-based TF->XLA bridge.
  4593. /// </summary>
  4594. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4595. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4596. public global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout MlirBridgeRollout {
  4597. get { return mlirBridgeRollout_; }
  4598. set {
  4599. mlirBridgeRollout_ = value;
  4600. }
  4601. }
  4602. /// <summary>Field number for the "enable_mlir_graph_optimization" field.</summary>
  4603. public const int EnableMlirGraphOptimizationFieldNumber = 16;
  4604. private bool enableMlirGraphOptimization_;
  4605. /// <summary>
  4606. /// Whether to enable the MLIR-based Graph optimizations.
  4607. ///
  4608. /// This will become a part of standard Tensorflow graph optimization
  4609. /// pipeline, currently this is only used for gradual migration and testing
  4610. /// new passes that are replacing existing optimizations in Grappler.
  4611. /// </summary>
  4612. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4613. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4614. public bool EnableMlirGraphOptimization {
  4615. get { return enableMlirGraphOptimization_; }
  4616. set {
  4617. enableMlirGraphOptimization_ = value;
  4618. }
  4619. }
  4620. /// <summary>Field number for the "disable_output_partition_graphs" field.</summary>
  4621. public const int DisableOutputPartitionGraphsFieldNumber = 14;
  4622. private bool disableOutputPartitionGraphs_;
  4623. /// <summary>
  4624. /// If true, the session will not store an additional copy of the graph for
  4625. /// each subgraph.
  4626. ///
  4627. /// If this option is set to true when a session is created, the
  4628. /// `RunOptions.output_partition_graphs` options must not be set.
  4629. /// </summary>
  4630. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4631. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4632. public bool DisableOutputPartitionGraphs {
  4633. get { return disableOutputPartitionGraphs_; }
  4634. set {
  4635. disableOutputPartitionGraphs_ = value;
  4636. }
  4637. }
  4638. /// <summary>Field number for the "xla_fusion_autotuner_thresh" field.</summary>
  4639. public const int XlaFusionAutotunerThreshFieldNumber = 15;
  4640. private long xlaFusionAutotunerThresh_;
  4641. /// <summary>
  4642. /// Minimum number of batches run through the XLA graph before XLA fusion
  4643. /// autotuner is enabled. Default value of zero disables the autotuner.
  4644. ///
  4645. /// The XLA fusion autotuner can improve performance by executing a heuristic
  4646. /// search on the compiler parameters.
  4647. /// </summary>
  4648. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4649. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4650. public long XlaFusionAutotunerThresh {
  4651. get { return xlaFusionAutotunerThresh_; }
  4652. set {
  4653. xlaFusionAutotunerThresh_ = value;
  4654. }
  4655. }
  4656. /// <summary>Field number for the "use_tfrt" field.</summary>
  4657. public const int UseTfrtFieldNumber = 18;
  4658. private bool useTfrt_;
  4659. /// <summary>
  4660. /// Whether runtime execution uses TFRT.
  4661. /// </summary>
  4662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4663. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4664. public bool UseTfrt {
  4665. get { return useTfrt_; }
  4666. set {
  4667. useTfrt_ = value;
  4668. }
  4669. }
  4670. /// <summary>Field number for the "disable_functional_ops_lowering" field.</summary>
  4671. public const int DisableFunctionalOpsLoweringFieldNumber = 21;
  4672. private bool disableFunctionalOpsLowering_;
  4673. /// <summary>
  4674. /// Whether functional control flow op lowering should be disabled. This is
  4675. /// useful when executing within a portable runtime where control flow op
  4676. /// kernels may not be loaded due to selective registration.
  4677. /// </summary>
  4678. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4679. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4680. public bool DisableFunctionalOpsLowering {
  4681. get { return disableFunctionalOpsLowering_; }
  4682. set {
  4683. disableFunctionalOpsLowering_ = value;
  4684. }
  4685. }
  4686. /// <summary>Field number for the "xla_prefer_single_graph_cluster" field.</summary>
  4687. public const int XlaPreferSingleGraphClusterFieldNumber = 22;
  4688. private bool xlaPreferSingleGraphCluster_;
  4689. /// <summary>
  4690. /// Provides a hint to XLA auto clustering to prefer forming a single large
  4691. /// cluster that encompases most of the graph.
  4692. /// </summary>
  4693. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4694. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4695. public bool XlaPreferSingleGraphCluster {
  4696. get { return xlaPreferSingleGraphCluster_; }
  4697. set {
  4698. xlaPreferSingleGraphCluster_ = value;
  4699. }
  4700. }
  4701. /// <summary>Field number for the "coordination_config" field.</summary>
  4702. public const int CoordinationConfigFieldNumber = 23;
  4703. private global::Tensorflow.CoordinationServiceConfig coordinationConfig_;
  4704. /// <summary>
  4705. /// Distributed coordination service configurations.
  4706. /// </summary>
  4707. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4708. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4709. public global::Tensorflow.CoordinationServiceConfig CoordinationConfig {
  4710. get { return coordinationConfig_; }
  4711. set {
  4712. coordinationConfig_ = value;
  4713. }
  4714. }
  4715. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4716. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4717. public override bool Equals(object other) {
  4718. return Equals(other as Experimental);
  4719. }
  4720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4721. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4722. public bool Equals(Experimental other) {
  4723. if (ReferenceEquals(other, null)) {
  4724. return false;
  4725. }
  4726. if (ReferenceEquals(other, this)) {
  4727. return true;
  4728. }
  4729. if (CollectiveGroupLeader != other.CollectiveGroupLeader) return false;
  4730. if (ExecutorType != other.ExecutorType) return false;
  4731. if (RecvBufMaxChunk != other.RecvBufMaxChunk) return false;
  4732. if (UseNumaAffinity != other.UseNumaAffinity) return false;
  4733. if (CollectiveDeterministicSequentialExecution != other.CollectiveDeterministicSequentialExecution) return false;
  4734. if (CollectiveNccl != other.CollectiveNccl) return false;
  4735. if (ShareSessionStateInClusterspecPropagation != other.ShareSessionStateInClusterspecPropagation) return false;
  4736. if (DisableThreadSpinning != other.DisableThreadSpinning) return false;
  4737. if (ShareClusterDevicesInSession != other.ShareClusterDevicesInSession) return false;
  4738. if (!object.Equals(SessionMetadata, other.SessionMetadata)) return false;
  4739. if (OptimizeForStaticGraph != other.OptimizeForStaticGraph) return false;
  4740. if (EnableMlirBridge != other.EnableMlirBridge) return false;
  4741. if (MlirBridgeRollout != other.MlirBridgeRollout) return false;
  4742. if (EnableMlirGraphOptimization != other.EnableMlirGraphOptimization) return false;
  4743. if (DisableOutputPartitionGraphs != other.DisableOutputPartitionGraphs) return false;
  4744. if (XlaFusionAutotunerThresh != other.XlaFusionAutotunerThresh) return false;
  4745. if (UseTfrt != other.UseTfrt) return false;
  4746. if (DisableFunctionalOpsLowering != other.DisableFunctionalOpsLowering) return false;
  4747. if (XlaPreferSingleGraphCluster != other.XlaPreferSingleGraphCluster) return false;
  4748. if (!object.Equals(CoordinationConfig, other.CoordinationConfig)) return false;
  4749. return Equals(_unknownFields, other._unknownFields);
  4750. }
  4751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4752. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4753. public override int GetHashCode() {
  4754. int hash = 1;
  4755. if (CollectiveGroupLeader.Length != 0) hash ^= CollectiveGroupLeader.GetHashCode();
  4756. if (ExecutorType.Length != 0) hash ^= ExecutorType.GetHashCode();
  4757. if (RecvBufMaxChunk != 0) hash ^= RecvBufMaxChunk.GetHashCode();
  4758. if (UseNumaAffinity != false) hash ^= UseNumaAffinity.GetHashCode();
  4759. if (CollectiveDeterministicSequentialExecution != false) hash ^= CollectiveDeterministicSequentialExecution.GetHashCode();
  4760. if (CollectiveNccl != false) hash ^= CollectiveNccl.GetHashCode();
  4761. if (ShareSessionStateInClusterspecPropagation != false) hash ^= ShareSessionStateInClusterspecPropagation.GetHashCode();
  4762. if (DisableThreadSpinning != false) hash ^= DisableThreadSpinning.GetHashCode();
  4763. if (ShareClusterDevicesInSession != false) hash ^= ShareClusterDevicesInSession.GetHashCode();
  4764. if (sessionMetadata_ != null) hash ^= SessionMetadata.GetHashCode();
  4765. if (OptimizeForStaticGraph != false) hash ^= OptimizeForStaticGraph.GetHashCode();
  4766. if (EnableMlirBridge != false) hash ^= EnableMlirBridge.GetHashCode();
  4767. if (MlirBridgeRollout != global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified) hash ^= MlirBridgeRollout.GetHashCode();
  4768. if (EnableMlirGraphOptimization != false) hash ^= EnableMlirGraphOptimization.GetHashCode();
  4769. if (DisableOutputPartitionGraphs != false) hash ^= DisableOutputPartitionGraphs.GetHashCode();
  4770. if (XlaFusionAutotunerThresh != 0L) hash ^= XlaFusionAutotunerThresh.GetHashCode();
  4771. if (UseTfrt != false) hash ^= UseTfrt.GetHashCode();
  4772. if (DisableFunctionalOpsLowering != false) hash ^= DisableFunctionalOpsLowering.GetHashCode();
  4773. if (XlaPreferSingleGraphCluster != false) hash ^= XlaPreferSingleGraphCluster.GetHashCode();
  4774. if (coordinationConfig_ != null) hash ^= CoordinationConfig.GetHashCode();
  4775. if (_unknownFields != null) {
  4776. hash ^= _unknownFields.GetHashCode();
  4777. }
  4778. return hash;
  4779. }
  4780. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4781. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4782. public override string ToString() {
  4783. return pb::JsonFormatter.ToDiagnosticString(this);
  4784. }
  4785. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4786. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4787. public void WriteTo(pb::CodedOutputStream output) {
  4788. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  4789. output.WriteRawMessage(this);
  4790. #else
  4791. if (CollectiveGroupLeader.Length != 0) {
  4792. output.WriteRawTag(10);
  4793. output.WriteString(CollectiveGroupLeader);
  4794. }
  4795. if (ExecutorType.Length != 0) {
  4796. output.WriteRawTag(26);
  4797. output.WriteString(ExecutorType);
  4798. }
  4799. if (RecvBufMaxChunk != 0) {
  4800. output.WriteRawTag(32);
  4801. output.WriteInt32(RecvBufMaxChunk);
  4802. }
  4803. if (UseNumaAffinity != false) {
  4804. output.WriteRawTag(40);
  4805. output.WriteBool(UseNumaAffinity);
  4806. }
  4807. if (CollectiveDeterministicSequentialExecution != false) {
  4808. output.WriteRawTag(48);
  4809. output.WriteBool(CollectiveDeterministicSequentialExecution);
  4810. }
  4811. if (CollectiveNccl != false) {
  4812. output.WriteRawTag(56);
  4813. output.WriteBool(CollectiveNccl);
  4814. }
  4815. if (ShareSessionStateInClusterspecPropagation != false) {
  4816. output.WriteRawTag(64);
  4817. output.WriteBool(ShareSessionStateInClusterspecPropagation);
  4818. }
  4819. if (DisableThreadSpinning != false) {
  4820. output.WriteRawTag(72);
  4821. output.WriteBool(DisableThreadSpinning);
  4822. }
  4823. if (ShareClusterDevicesInSession != false) {
  4824. output.WriteRawTag(80);
  4825. output.WriteBool(ShareClusterDevicesInSession);
  4826. }
  4827. if (sessionMetadata_ != null) {
  4828. output.WriteRawTag(90);
  4829. output.WriteMessage(SessionMetadata);
  4830. }
  4831. if (OptimizeForStaticGraph != false) {
  4832. output.WriteRawTag(96);
  4833. output.WriteBool(OptimizeForStaticGraph);
  4834. }
  4835. if (EnableMlirBridge != false) {
  4836. output.WriteRawTag(104);
  4837. output.WriteBool(EnableMlirBridge);
  4838. }
  4839. if (DisableOutputPartitionGraphs != false) {
  4840. output.WriteRawTag(112);
  4841. output.WriteBool(DisableOutputPartitionGraphs);
  4842. }
  4843. if (XlaFusionAutotunerThresh != 0L) {
  4844. output.WriteRawTag(120);
  4845. output.WriteInt64(XlaFusionAutotunerThresh);
  4846. }
  4847. if (EnableMlirGraphOptimization != false) {
  4848. output.WriteRawTag(128, 1);
  4849. output.WriteBool(EnableMlirGraphOptimization);
  4850. }
  4851. if (MlirBridgeRollout != global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified) {
  4852. output.WriteRawTag(136, 1);
  4853. output.WriteEnum((int) MlirBridgeRollout);
  4854. }
  4855. if (UseTfrt != false) {
  4856. output.WriteRawTag(144, 1);
  4857. output.WriteBool(UseTfrt);
  4858. }
  4859. if (DisableFunctionalOpsLowering != false) {
  4860. output.WriteRawTag(168, 1);
  4861. output.WriteBool(DisableFunctionalOpsLowering);
  4862. }
  4863. if (XlaPreferSingleGraphCluster != false) {
  4864. output.WriteRawTag(176, 1);
  4865. output.WriteBool(XlaPreferSingleGraphCluster);
  4866. }
  4867. if (coordinationConfig_ != null) {
  4868. output.WriteRawTag(186, 1);
  4869. output.WriteMessage(CoordinationConfig);
  4870. }
  4871. if (_unknownFields != null) {
  4872. _unknownFields.WriteTo(output);
  4873. }
  4874. #endif
  4875. }
  4876. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  4877. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4878. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4879. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  4880. if (CollectiveGroupLeader.Length != 0) {
  4881. output.WriteRawTag(10);
  4882. output.WriteString(CollectiveGroupLeader);
  4883. }
  4884. if (ExecutorType.Length != 0) {
  4885. output.WriteRawTag(26);
  4886. output.WriteString(ExecutorType);
  4887. }
  4888. if (RecvBufMaxChunk != 0) {
  4889. output.WriteRawTag(32);
  4890. output.WriteInt32(RecvBufMaxChunk);
  4891. }
  4892. if (UseNumaAffinity != false) {
  4893. output.WriteRawTag(40);
  4894. output.WriteBool(UseNumaAffinity);
  4895. }
  4896. if (CollectiveDeterministicSequentialExecution != false) {
  4897. output.WriteRawTag(48);
  4898. output.WriteBool(CollectiveDeterministicSequentialExecution);
  4899. }
  4900. if (CollectiveNccl != false) {
  4901. output.WriteRawTag(56);
  4902. output.WriteBool(CollectiveNccl);
  4903. }
  4904. if (ShareSessionStateInClusterspecPropagation != false) {
  4905. output.WriteRawTag(64);
  4906. output.WriteBool(ShareSessionStateInClusterspecPropagation);
  4907. }
  4908. if (DisableThreadSpinning != false) {
  4909. output.WriteRawTag(72);
  4910. output.WriteBool(DisableThreadSpinning);
  4911. }
  4912. if (ShareClusterDevicesInSession != false) {
  4913. output.WriteRawTag(80);
  4914. output.WriteBool(ShareClusterDevicesInSession);
  4915. }
  4916. if (sessionMetadata_ != null) {
  4917. output.WriteRawTag(90);
  4918. output.WriteMessage(SessionMetadata);
  4919. }
  4920. if (OptimizeForStaticGraph != false) {
  4921. output.WriteRawTag(96);
  4922. output.WriteBool(OptimizeForStaticGraph);
  4923. }
  4924. if (EnableMlirBridge != false) {
  4925. output.WriteRawTag(104);
  4926. output.WriteBool(EnableMlirBridge);
  4927. }
  4928. if (DisableOutputPartitionGraphs != false) {
  4929. output.WriteRawTag(112);
  4930. output.WriteBool(DisableOutputPartitionGraphs);
  4931. }
  4932. if (XlaFusionAutotunerThresh != 0L) {
  4933. output.WriteRawTag(120);
  4934. output.WriteInt64(XlaFusionAutotunerThresh);
  4935. }
  4936. if (EnableMlirGraphOptimization != false) {
  4937. output.WriteRawTag(128, 1);
  4938. output.WriteBool(EnableMlirGraphOptimization);
  4939. }
  4940. if (MlirBridgeRollout != global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified) {
  4941. output.WriteRawTag(136, 1);
  4942. output.WriteEnum((int) MlirBridgeRollout);
  4943. }
  4944. if (UseTfrt != false) {
  4945. output.WriteRawTag(144, 1);
  4946. output.WriteBool(UseTfrt);
  4947. }
  4948. if (DisableFunctionalOpsLowering != false) {
  4949. output.WriteRawTag(168, 1);
  4950. output.WriteBool(DisableFunctionalOpsLowering);
  4951. }
  4952. if (XlaPreferSingleGraphCluster != false) {
  4953. output.WriteRawTag(176, 1);
  4954. output.WriteBool(XlaPreferSingleGraphCluster);
  4955. }
  4956. if (coordinationConfig_ != null) {
  4957. output.WriteRawTag(186, 1);
  4958. output.WriteMessage(CoordinationConfig);
  4959. }
  4960. if (_unknownFields != null) {
  4961. _unknownFields.WriteTo(ref output);
  4962. }
  4963. }
  4964. #endif
  4965. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4966. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  4967. public int CalculateSize() {
  4968. int size = 0;
  4969. if (CollectiveGroupLeader.Length != 0) {
  4970. size += 1 + pb::CodedOutputStream.ComputeStringSize(CollectiveGroupLeader);
  4971. }
  4972. if (ExecutorType.Length != 0) {
  4973. size += 1 + pb::CodedOutputStream.ComputeStringSize(ExecutorType);
  4974. }
  4975. if (RecvBufMaxChunk != 0) {
  4976. size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecvBufMaxChunk);
  4977. }
  4978. if (UseNumaAffinity != false) {
  4979. size += 1 + 1;
  4980. }
  4981. if (CollectiveDeterministicSequentialExecution != false) {
  4982. size += 1 + 1;
  4983. }
  4984. if (CollectiveNccl != false) {
  4985. size += 1 + 1;
  4986. }
  4987. if (ShareSessionStateInClusterspecPropagation != false) {
  4988. size += 1 + 1;
  4989. }
  4990. if (DisableThreadSpinning != false) {
  4991. size += 1 + 1;
  4992. }
  4993. if (ShareClusterDevicesInSession != false) {
  4994. size += 1 + 1;
  4995. }
  4996. if (sessionMetadata_ != null) {
  4997. size += 1 + pb::CodedOutputStream.ComputeMessageSize(SessionMetadata);
  4998. }
  4999. if (OptimizeForStaticGraph != false) {
  5000. size += 1 + 1;
  5001. }
  5002. if (EnableMlirBridge != false) {
  5003. size += 1 + 1;
  5004. }
  5005. if (MlirBridgeRollout != global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified) {
  5006. size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) MlirBridgeRollout);
  5007. }
  5008. if (EnableMlirGraphOptimization != false) {
  5009. size += 2 + 1;
  5010. }
  5011. if (DisableOutputPartitionGraphs != false) {
  5012. size += 1 + 1;
  5013. }
  5014. if (XlaFusionAutotunerThresh != 0L) {
  5015. size += 1 + pb::CodedOutputStream.ComputeInt64Size(XlaFusionAutotunerThresh);
  5016. }
  5017. if (UseTfrt != false) {
  5018. size += 2 + 1;
  5019. }
  5020. if (DisableFunctionalOpsLowering != false) {
  5021. size += 2 + 1;
  5022. }
  5023. if (XlaPreferSingleGraphCluster != false) {
  5024. size += 2 + 1;
  5025. }
  5026. if (coordinationConfig_ != null) {
  5027. size += 2 + pb::CodedOutputStream.ComputeMessageSize(CoordinationConfig);
  5028. }
  5029. if (_unknownFields != null) {
  5030. size += _unknownFields.CalculateSize();
  5031. }
  5032. return size;
  5033. }
  5034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5035. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5036. public void MergeFrom(Experimental other) {
  5037. if (other == null) {
  5038. return;
  5039. }
  5040. if (other.CollectiveGroupLeader.Length != 0) {
  5041. CollectiveGroupLeader = other.CollectiveGroupLeader;
  5042. }
  5043. if (other.ExecutorType.Length != 0) {
  5044. ExecutorType = other.ExecutorType;
  5045. }
  5046. if (other.RecvBufMaxChunk != 0) {
  5047. RecvBufMaxChunk = other.RecvBufMaxChunk;
  5048. }
  5049. if (other.UseNumaAffinity != false) {
  5050. UseNumaAffinity = other.UseNumaAffinity;
  5051. }
  5052. if (other.CollectiveDeterministicSequentialExecution != false) {
  5053. CollectiveDeterministicSequentialExecution = other.CollectiveDeterministicSequentialExecution;
  5054. }
  5055. if (other.CollectiveNccl != false) {
  5056. CollectiveNccl = other.CollectiveNccl;
  5057. }
  5058. if (other.ShareSessionStateInClusterspecPropagation != false) {
  5059. ShareSessionStateInClusterspecPropagation = other.ShareSessionStateInClusterspecPropagation;
  5060. }
  5061. if (other.DisableThreadSpinning != false) {
  5062. DisableThreadSpinning = other.DisableThreadSpinning;
  5063. }
  5064. if (other.ShareClusterDevicesInSession != false) {
  5065. ShareClusterDevicesInSession = other.ShareClusterDevicesInSession;
  5066. }
  5067. if (other.sessionMetadata_ != null) {
  5068. if (sessionMetadata_ == null) {
  5069. SessionMetadata = new global::Tensorflow.SessionMetadata();
  5070. }
  5071. SessionMetadata.MergeFrom(other.SessionMetadata);
  5072. }
  5073. if (other.OptimizeForStaticGraph != false) {
  5074. OptimizeForStaticGraph = other.OptimizeForStaticGraph;
  5075. }
  5076. if (other.EnableMlirBridge != false) {
  5077. EnableMlirBridge = other.EnableMlirBridge;
  5078. }
  5079. if (other.MlirBridgeRollout != global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout.Unspecified) {
  5080. MlirBridgeRollout = other.MlirBridgeRollout;
  5081. }
  5082. if (other.EnableMlirGraphOptimization != false) {
  5083. EnableMlirGraphOptimization = other.EnableMlirGraphOptimization;
  5084. }
  5085. if (other.DisableOutputPartitionGraphs != false) {
  5086. DisableOutputPartitionGraphs = other.DisableOutputPartitionGraphs;
  5087. }
  5088. if (other.XlaFusionAutotunerThresh != 0L) {
  5089. XlaFusionAutotunerThresh = other.XlaFusionAutotunerThresh;
  5090. }
  5091. if (other.UseTfrt != false) {
  5092. UseTfrt = other.UseTfrt;
  5093. }
  5094. if (other.DisableFunctionalOpsLowering != false) {
  5095. DisableFunctionalOpsLowering = other.DisableFunctionalOpsLowering;
  5096. }
  5097. if (other.XlaPreferSingleGraphCluster != false) {
  5098. XlaPreferSingleGraphCluster = other.XlaPreferSingleGraphCluster;
  5099. }
  5100. if (other.coordinationConfig_ != null) {
  5101. if (coordinationConfig_ == null) {
  5102. CoordinationConfig = new global::Tensorflow.CoordinationServiceConfig();
  5103. }
  5104. CoordinationConfig.MergeFrom(other.CoordinationConfig);
  5105. }
  5106. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  5107. }
  5108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5109. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5110. public void MergeFrom(pb::CodedInputStream input) {
  5111. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5112. input.ReadRawMessage(this);
  5113. #else
  5114. uint tag;
  5115. while ((tag = input.ReadTag()) != 0) {
  5116. switch(tag) {
  5117. default:
  5118. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  5119. break;
  5120. case 10: {
  5121. CollectiveGroupLeader = input.ReadString();
  5122. break;
  5123. }
  5124. case 26: {
  5125. ExecutorType = input.ReadString();
  5126. break;
  5127. }
  5128. case 32: {
  5129. RecvBufMaxChunk = input.ReadInt32();
  5130. break;
  5131. }
  5132. case 40: {
  5133. UseNumaAffinity = input.ReadBool();
  5134. break;
  5135. }
  5136. case 48: {
  5137. CollectiveDeterministicSequentialExecution = input.ReadBool();
  5138. break;
  5139. }
  5140. case 56: {
  5141. CollectiveNccl = input.ReadBool();
  5142. break;
  5143. }
  5144. case 64: {
  5145. ShareSessionStateInClusterspecPropagation = input.ReadBool();
  5146. break;
  5147. }
  5148. case 72: {
  5149. DisableThreadSpinning = input.ReadBool();
  5150. break;
  5151. }
  5152. case 80: {
  5153. ShareClusterDevicesInSession = input.ReadBool();
  5154. break;
  5155. }
  5156. case 90: {
  5157. if (sessionMetadata_ == null) {
  5158. SessionMetadata = new global::Tensorflow.SessionMetadata();
  5159. }
  5160. input.ReadMessage(SessionMetadata);
  5161. break;
  5162. }
  5163. case 96: {
  5164. OptimizeForStaticGraph = input.ReadBool();
  5165. break;
  5166. }
  5167. case 104: {
  5168. EnableMlirBridge = input.ReadBool();
  5169. break;
  5170. }
  5171. case 112: {
  5172. DisableOutputPartitionGraphs = input.ReadBool();
  5173. break;
  5174. }
  5175. case 120: {
  5176. XlaFusionAutotunerThresh = input.ReadInt64();
  5177. break;
  5178. }
  5179. case 128: {
  5180. EnableMlirGraphOptimization = input.ReadBool();
  5181. break;
  5182. }
  5183. case 136: {
  5184. MlirBridgeRollout = (global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout) input.ReadEnum();
  5185. break;
  5186. }
  5187. case 144: {
  5188. UseTfrt = input.ReadBool();
  5189. break;
  5190. }
  5191. case 168: {
  5192. DisableFunctionalOpsLowering = input.ReadBool();
  5193. break;
  5194. }
  5195. case 176: {
  5196. XlaPreferSingleGraphCluster = input.ReadBool();
  5197. break;
  5198. }
  5199. case 186: {
  5200. if (coordinationConfig_ == null) {
  5201. CoordinationConfig = new global::Tensorflow.CoordinationServiceConfig();
  5202. }
  5203. input.ReadMessage(CoordinationConfig);
  5204. break;
  5205. }
  5206. }
  5207. }
  5208. #endif
  5209. }
  5210. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5212. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5213. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  5214. uint tag;
  5215. while ((tag = input.ReadTag()) != 0) {
  5216. switch(tag) {
  5217. default:
  5218. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  5219. break;
  5220. case 10: {
  5221. CollectiveGroupLeader = input.ReadString();
  5222. break;
  5223. }
  5224. case 26: {
  5225. ExecutorType = input.ReadString();
  5226. break;
  5227. }
  5228. case 32: {
  5229. RecvBufMaxChunk = input.ReadInt32();
  5230. break;
  5231. }
  5232. case 40: {
  5233. UseNumaAffinity = input.ReadBool();
  5234. break;
  5235. }
  5236. case 48: {
  5237. CollectiveDeterministicSequentialExecution = input.ReadBool();
  5238. break;
  5239. }
  5240. case 56: {
  5241. CollectiveNccl = input.ReadBool();
  5242. break;
  5243. }
  5244. case 64: {
  5245. ShareSessionStateInClusterspecPropagation = input.ReadBool();
  5246. break;
  5247. }
  5248. case 72: {
  5249. DisableThreadSpinning = input.ReadBool();
  5250. break;
  5251. }
  5252. case 80: {
  5253. ShareClusterDevicesInSession = input.ReadBool();
  5254. break;
  5255. }
  5256. case 90: {
  5257. if (sessionMetadata_ == null) {
  5258. SessionMetadata = new global::Tensorflow.SessionMetadata();
  5259. }
  5260. input.ReadMessage(SessionMetadata);
  5261. break;
  5262. }
  5263. case 96: {
  5264. OptimizeForStaticGraph = input.ReadBool();
  5265. break;
  5266. }
  5267. case 104: {
  5268. EnableMlirBridge = input.ReadBool();
  5269. break;
  5270. }
  5271. case 112: {
  5272. DisableOutputPartitionGraphs = input.ReadBool();
  5273. break;
  5274. }
  5275. case 120: {
  5276. XlaFusionAutotunerThresh = input.ReadInt64();
  5277. break;
  5278. }
  5279. case 128: {
  5280. EnableMlirGraphOptimization = input.ReadBool();
  5281. break;
  5282. }
  5283. case 136: {
  5284. MlirBridgeRollout = (global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout) input.ReadEnum();
  5285. break;
  5286. }
  5287. case 144: {
  5288. UseTfrt = input.ReadBool();
  5289. break;
  5290. }
  5291. case 168: {
  5292. DisableFunctionalOpsLowering = input.ReadBool();
  5293. break;
  5294. }
  5295. case 176: {
  5296. XlaPreferSingleGraphCluster = input.ReadBool();
  5297. break;
  5298. }
  5299. case 186: {
  5300. if (coordinationConfig_ == null) {
  5301. CoordinationConfig = new global::Tensorflow.CoordinationServiceConfig();
  5302. }
  5303. input.ReadMessage(CoordinationConfig);
  5304. break;
  5305. }
  5306. }
  5307. }
  5308. }
  5309. #endif
  5310. #region Nested types
  5311. /// <summary>Container for nested types declared in the Experimental message type.</summary>
  5312. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5313. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5314. public static partial class Types {
  5315. /// <summary>
  5316. /// An enum that describes the state of the MLIR bridge rollout.
  5317. /// </summary>
  5318. public enum MlirBridgeRollout {
  5319. /// <summary>
  5320. /// If this field is left unspecified, the MLIR bridge may be selectively
  5321. /// enabled on a per graph basis.
  5322. /// </summary>
  5323. [pbr::OriginalName("MLIR_BRIDGE_ROLLOUT_UNSPECIFIED")] Unspecified = 0,
  5324. /// <summary>
  5325. /// Enabling the MLIR bridge enables it for all graphs in this session.
  5326. /// </summary>
  5327. [pbr::OriginalName("MLIR_BRIDGE_ROLLOUT_ENABLED")] Enabled = 1,
  5328. /// <summary>
  5329. /// Disabling the MLIR bridge disables it for all graphs in this session.
  5330. /// </summary>
  5331. [pbr::OriginalName("MLIR_BRIDGE_ROLLOUT_DISABLED")] Disabled = 2,
  5332. /// <summary>
  5333. /// Enable the MLIR bridge on a per graph basis based on an analysis of
  5334. /// the features used in the graph. If the features used by the graph are
  5335. /// supported by the MLIR bridge, the MLIR bridge will be used to run the
  5336. /// graph.
  5337. /// </summary>
  5338. [pbr::OriginalName("MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED")] SafeModeEnabled = 3,
  5339. /// <summary>
  5340. /// Enable the MLIR bridge in a fallback mode on a per graph basis based
  5341. /// on an analysis of the features used in the graph.
  5342. /// Running the MLIR bridge in the fallback mode means that it is
  5343. /// executed and it commits all the changes to the TF graph in case
  5344. /// of success. And it does not in case of failures and let the old bridge
  5345. /// to process the TF graph.
  5346. /// </summary>
  5347. [pbr::OriginalName("MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED")] SafeModeFallbackEnabled = 4,
  5348. }
  5349. }
  5350. #endregion
  5351. }
  5352. }
  5353. #endregion
  5354. }
  5355. /// <summary>
  5356. /// Options for a single Run() call.
  5357. /// </summary>
  5358. public sealed partial class RunOptions : pb::IMessage<RunOptions>
  5359. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5360. , pb::IBufferMessage
  5361. #endif
  5362. {
  5363. private static readonly pb::MessageParser<RunOptions> _parser = new pb::MessageParser<RunOptions>(() => new RunOptions());
  5364. private pb::UnknownFieldSet _unknownFields;
  5365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5366. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5367. public static pb::MessageParser<RunOptions> Parser { get { return _parser; } }
  5368. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5369. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5370. public static pbr::MessageDescriptor Descriptor {
  5371. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[7]; }
  5372. }
  5373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5374. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5375. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5376. get { return Descriptor; }
  5377. }
  5378. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5379. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5380. public RunOptions() {
  5381. OnConstruction();
  5382. }
  5383. partial void OnConstruction();
  5384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5385. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5386. public RunOptions(RunOptions other) : this() {
  5387. traceLevel_ = other.traceLevel_;
  5388. timeoutInMs_ = other.timeoutInMs_;
  5389. interOpThreadPool_ = other.interOpThreadPool_;
  5390. outputPartitionGraphs_ = other.outputPartitionGraphs_;
  5391. debugOptions_ = other.debugOptions_ != null ? other.debugOptions_.Clone() : null;
  5392. reportTensorAllocationsUponOom_ = other.reportTensorAllocationsUponOom_;
  5393. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  5394. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  5395. }
  5396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5397. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5398. public RunOptions Clone() {
  5399. return new RunOptions(this);
  5400. }
  5401. /// <summary>Field number for the "trace_level" field.</summary>
  5402. public const int TraceLevelFieldNumber = 1;
  5403. private global::Tensorflow.RunOptions.Types.TraceLevel traceLevel_ = global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace;
  5404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5405. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5406. public global::Tensorflow.RunOptions.Types.TraceLevel TraceLevel {
  5407. get { return traceLevel_; }
  5408. set {
  5409. traceLevel_ = value;
  5410. }
  5411. }
  5412. /// <summary>Field number for the "timeout_in_ms" field.</summary>
  5413. public const int TimeoutInMsFieldNumber = 2;
  5414. private long timeoutInMs_;
  5415. /// <summary>
  5416. /// Time to wait for operation to complete in milliseconds.
  5417. /// </summary>
  5418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5419. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5420. public long TimeoutInMs {
  5421. get { return timeoutInMs_; }
  5422. set {
  5423. timeoutInMs_ = value;
  5424. }
  5425. }
  5426. /// <summary>Field number for the "inter_op_thread_pool" field.</summary>
  5427. public const int InterOpThreadPoolFieldNumber = 3;
  5428. private int interOpThreadPool_;
  5429. /// <summary>
  5430. /// The thread pool to use, if session_inter_op_thread_pool is configured.
  5431. /// To use the caller thread set this to -1 - this uses the caller thread
  5432. /// to execute Session::Run() and thus avoids a context switch. Using the
  5433. /// caller thread to execute Session::Run() should be done ONLY for simple
  5434. /// graphs, where the overhead of an additional context switch is
  5435. /// comparable with the overhead of Session::Run().
  5436. /// </summary>
  5437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5438. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5439. public int InterOpThreadPool {
  5440. get { return interOpThreadPool_; }
  5441. set {
  5442. interOpThreadPool_ = value;
  5443. }
  5444. }
  5445. /// <summary>Field number for the "output_partition_graphs" field.</summary>
  5446. public const int OutputPartitionGraphsFieldNumber = 5;
  5447. private bool outputPartitionGraphs_;
  5448. /// <summary>
  5449. /// Whether the partition graph(s) executed by the executor(s) should be
  5450. /// outputted via RunMetadata.
  5451. /// </summary>
  5452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5453. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5454. public bool OutputPartitionGraphs {
  5455. get { return outputPartitionGraphs_; }
  5456. set {
  5457. outputPartitionGraphs_ = value;
  5458. }
  5459. }
  5460. /// <summary>Field number for the "debug_options" field.</summary>
  5461. public const int DebugOptionsFieldNumber = 6;
  5462. private global::Tensorflow.DebugOptions debugOptions_;
  5463. /// <summary>
  5464. /// EXPERIMENTAL. Options used to initialize DebuggerState, if enabled.
  5465. /// </summary>
  5466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5467. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5468. public global::Tensorflow.DebugOptions DebugOptions {
  5469. get { return debugOptions_; }
  5470. set {
  5471. debugOptions_ = value;
  5472. }
  5473. }
  5474. /// <summary>Field number for the "report_tensor_allocations_upon_oom" field.</summary>
  5475. public const int ReportTensorAllocationsUponOomFieldNumber = 7;
  5476. private bool reportTensorAllocationsUponOom_;
  5477. /// <summary>
  5478. /// When enabled, causes tensor allocation information to be included in
  5479. /// the error message when the Run() call fails because the allocator ran
  5480. /// out of memory (OOM).
  5481. ///
  5482. /// Enabling this option can slow down the Run() call.
  5483. /// </summary>
  5484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5485. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5486. public bool ReportTensorAllocationsUponOom {
  5487. get { return reportTensorAllocationsUponOom_; }
  5488. set {
  5489. reportTensorAllocationsUponOom_ = value;
  5490. }
  5491. }
  5492. /// <summary>Field number for the "experimental" field.</summary>
  5493. public const int ExperimentalFieldNumber = 8;
  5494. private global::Tensorflow.RunOptions.Types.Experimental experimental_;
  5495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5496. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5497. public global::Tensorflow.RunOptions.Types.Experimental Experimental {
  5498. get { return experimental_; }
  5499. set {
  5500. experimental_ = value;
  5501. }
  5502. }
  5503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5504. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5505. public override bool Equals(object other) {
  5506. return Equals(other as RunOptions);
  5507. }
  5508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5509. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5510. public bool Equals(RunOptions other) {
  5511. if (ReferenceEquals(other, null)) {
  5512. return false;
  5513. }
  5514. if (ReferenceEquals(other, this)) {
  5515. return true;
  5516. }
  5517. if (TraceLevel != other.TraceLevel) return false;
  5518. if (TimeoutInMs != other.TimeoutInMs) return false;
  5519. if (InterOpThreadPool != other.InterOpThreadPool) return false;
  5520. if (OutputPartitionGraphs != other.OutputPartitionGraphs) return false;
  5521. if (!object.Equals(DebugOptions, other.DebugOptions)) return false;
  5522. if (ReportTensorAllocationsUponOom != other.ReportTensorAllocationsUponOom) return false;
  5523. if (!object.Equals(Experimental, other.Experimental)) return false;
  5524. return Equals(_unknownFields, other._unknownFields);
  5525. }
  5526. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5527. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5528. public override int GetHashCode() {
  5529. int hash = 1;
  5530. if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) hash ^= TraceLevel.GetHashCode();
  5531. if (TimeoutInMs != 0L) hash ^= TimeoutInMs.GetHashCode();
  5532. if (InterOpThreadPool != 0) hash ^= InterOpThreadPool.GetHashCode();
  5533. if (OutputPartitionGraphs != false) hash ^= OutputPartitionGraphs.GetHashCode();
  5534. if (debugOptions_ != null) hash ^= DebugOptions.GetHashCode();
  5535. if (ReportTensorAllocationsUponOom != false) hash ^= ReportTensorAllocationsUponOom.GetHashCode();
  5536. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  5537. if (_unknownFields != null) {
  5538. hash ^= _unknownFields.GetHashCode();
  5539. }
  5540. return hash;
  5541. }
  5542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5543. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5544. public override string ToString() {
  5545. return pb::JsonFormatter.ToDiagnosticString(this);
  5546. }
  5547. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5548. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5549. public void WriteTo(pb::CodedOutputStream output) {
  5550. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5551. output.WriteRawMessage(this);
  5552. #else
  5553. if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) {
  5554. output.WriteRawTag(8);
  5555. output.WriteEnum((int) TraceLevel);
  5556. }
  5557. if (TimeoutInMs != 0L) {
  5558. output.WriteRawTag(16);
  5559. output.WriteInt64(TimeoutInMs);
  5560. }
  5561. if (InterOpThreadPool != 0) {
  5562. output.WriteRawTag(24);
  5563. output.WriteInt32(InterOpThreadPool);
  5564. }
  5565. if (OutputPartitionGraphs != false) {
  5566. output.WriteRawTag(40);
  5567. output.WriteBool(OutputPartitionGraphs);
  5568. }
  5569. if (debugOptions_ != null) {
  5570. output.WriteRawTag(50);
  5571. output.WriteMessage(DebugOptions);
  5572. }
  5573. if (ReportTensorAllocationsUponOom != false) {
  5574. output.WriteRawTag(56);
  5575. output.WriteBool(ReportTensorAllocationsUponOom);
  5576. }
  5577. if (experimental_ != null) {
  5578. output.WriteRawTag(66);
  5579. output.WriteMessage(Experimental);
  5580. }
  5581. if (_unknownFields != null) {
  5582. _unknownFields.WriteTo(output);
  5583. }
  5584. #endif
  5585. }
  5586. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5588. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5589. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  5590. if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) {
  5591. output.WriteRawTag(8);
  5592. output.WriteEnum((int) TraceLevel);
  5593. }
  5594. if (TimeoutInMs != 0L) {
  5595. output.WriteRawTag(16);
  5596. output.WriteInt64(TimeoutInMs);
  5597. }
  5598. if (InterOpThreadPool != 0) {
  5599. output.WriteRawTag(24);
  5600. output.WriteInt32(InterOpThreadPool);
  5601. }
  5602. if (OutputPartitionGraphs != false) {
  5603. output.WriteRawTag(40);
  5604. output.WriteBool(OutputPartitionGraphs);
  5605. }
  5606. if (debugOptions_ != null) {
  5607. output.WriteRawTag(50);
  5608. output.WriteMessage(DebugOptions);
  5609. }
  5610. if (ReportTensorAllocationsUponOom != false) {
  5611. output.WriteRawTag(56);
  5612. output.WriteBool(ReportTensorAllocationsUponOom);
  5613. }
  5614. if (experimental_ != null) {
  5615. output.WriteRawTag(66);
  5616. output.WriteMessage(Experimental);
  5617. }
  5618. if (_unknownFields != null) {
  5619. _unknownFields.WriteTo(ref output);
  5620. }
  5621. }
  5622. #endif
  5623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5624. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5625. public int CalculateSize() {
  5626. int size = 0;
  5627. if (TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) {
  5628. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TraceLevel);
  5629. }
  5630. if (TimeoutInMs != 0L) {
  5631. size += 1 + pb::CodedOutputStream.ComputeInt64Size(TimeoutInMs);
  5632. }
  5633. if (InterOpThreadPool != 0) {
  5634. size += 1 + pb::CodedOutputStream.ComputeInt32Size(InterOpThreadPool);
  5635. }
  5636. if (OutputPartitionGraphs != false) {
  5637. size += 1 + 1;
  5638. }
  5639. if (debugOptions_ != null) {
  5640. size += 1 + pb::CodedOutputStream.ComputeMessageSize(DebugOptions);
  5641. }
  5642. if (ReportTensorAllocationsUponOom != false) {
  5643. size += 1 + 1;
  5644. }
  5645. if (experimental_ != null) {
  5646. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  5647. }
  5648. if (_unknownFields != null) {
  5649. size += _unknownFields.CalculateSize();
  5650. }
  5651. return size;
  5652. }
  5653. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5654. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5655. public void MergeFrom(RunOptions other) {
  5656. if (other == null) {
  5657. return;
  5658. }
  5659. if (other.TraceLevel != global::Tensorflow.RunOptions.Types.TraceLevel.NoTrace) {
  5660. TraceLevel = other.TraceLevel;
  5661. }
  5662. if (other.TimeoutInMs != 0L) {
  5663. TimeoutInMs = other.TimeoutInMs;
  5664. }
  5665. if (other.InterOpThreadPool != 0) {
  5666. InterOpThreadPool = other.InterOpThreadPool;
  5667. }
  5668. if (other.OutputPartitionGraphs != false) {
  5669. OutputPartitionGraphs = other.OutputPartitionGraphs;
  5670. }
  5671. if (other.debugOptions_ != null) {
  5672. if (debugOptions_ == null) {
  5673. DebugOptions = new global::Tensorflow.DebugOptions();
  5674. }
  5675. DebugOptions.MergeFrom(other.DebugOptions);
  5676. }
  5677. if (other.ReportTensorAllocationsUponOom != false) {
  5678. ReportTensorAllocationsUponOom = other.ReportTensorAllocationsUponOom;
  5679. }
  5680. if (other.experimental_ != null) {
  5681. if (experimental_ == null) {
  5682. Experimental = new global::Tensorflow.RunOptions.Types.Experimental();
  5683. }
  5684. Experimental.MergeFrom(other.Experimental);
  5685. }
  5686. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  5687. }
  5688. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5689. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5690. public void MergeFrom(pb::CodedInputStream input) {
  5691. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5692. input.ReadRawMessage(this);
  5693. #else
  5694. uint tag;
  5695. while ((tag = input.ReadTag()) != 0) {
  5696. switch(tag) {
  5697. default:
  5698. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  5699. break;
  5700. case 8: {
  5701. TraceLevel = (global::Tensorflow.RunOptions.Types.TraceLevel) input.ReadEnum();
  5702. break;
  5703. }
  5704. case 16: {
  5705. TimeoutInMs = input.ReadInt64();
  5706. break;
  5707. }
  5708. case 24: {
  5709. InterOpThreadPool = input.ReadInt32();
  5710. break;
  5711. }
  5712. case 40: {
  5713. OutputPartitionGraphs = input.ReadBool();
  5714. break;
  5715. }
  5716. case 50: {
  5717. if (debugOptions_ == null) {
  5718. DebugOptions = new global::Tensorflow.DebugOptions();
  5719. }
  5720. input.ReadMessage(DebugOptions);
  5721. break;
  5722. }
  5723. case 56: {
  5724. ReportTensorAllocationsUponOom = input.ReadBool();
  5725. break;
  5726. }
  5727. case 66: {
  5728. if (experimental_ == null) {
  5729. Experimental = new global::Tensorflow.RunOptions.Types.Experimental();
  5730. }
  5731. input.ReadMessage(Experimental);
  5732. break;
  5733. }
  5734. }
  5735. }
  5736. #endif
  5737. }
  5738. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5739. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5740. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5741. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  5742. uint tag;
  5743. while ((tag = input.ReadTag()) != 0) {
  5744. switch(tag) {
  5745. default:
  5746. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  5747. break;
  5748. case 8: {
  5749. TraceLevel = (global::Tensorflow.RunOptions.Types.TraceLevel) input.ReadEnum();
  5750. break;
  5751. }
  5752. case 16: {
  5753. TimeoutInMs = input.ReadInt64();
  5754. break;
  5755. }
  5756. case 24: {
  5757. InterOpThreadPool = input.ReadInt32();
  5758. break;
  5759. }
  5760. case 40: {
  5761. OutputPartitionGraphs = input.ReadBool();
  5762. break;
  5763. }
  5764. case 50: {
  5765. if (debugOptions_ == null) {
  5766. DebugOptions = new global::Tensorflow.DebugOptions();
  5767. }
  5768. input.ReadMessage(DebugOptions);
  5769. break;
  5770. }
  5771. case 56: {
  5772. ReportTensorAllocationsUponOom = input.ReadBool();
  5773. break;
  5774. }
  5775. case 66: {
  5776. if (experimental_ == null) {
  5777. Experimental = new global::Tensorflow.RunOptions.Types.Experimental();
  5778. }
  5779. input.ReadMessage(Experimental);
  5780. break;
  5781. }
  5782. }
  5783. }
  5784. }
  5785. #endif
  5786. #region Nested types
  5787. /// <summary>Container for nested types declared in the RunOptions message type.</summary>
  5788. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5789. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5790. public static partial class Types {
  5791. /// <summary>
  5792. /// TODO(pbar) Turn this into a TraceOptions proto which allows
  5793. /// tracing to be controlled in a more orthogonal manner?
  5794. /// </summary>
  5795. public enum TraceLevel {
  5796. [pbr::OriginalName("NO_TRACE")] NoTrace = 0,
  5797. [pbr::OriginalName("SOFTWARE_TRACE")] SoftwareTrace = 1,
  5798. [pbr::OriginalName("HARDWARE_TRACE")] HardwareTrace = 2,
  5799. [pbr::OriginalName("FULL_TRACE")] FullTrace = 3,
  5800. }
  5801. /// <summary>
  5802. /// Everything inside Experimental is subject to change and is not subject
  5803. /// to API stability guarantees in
  5804. /// https://www.tensorflow.org/guide/version_compat.
  5805. /// </summary>
  5806. public sealed partial class Experimental : pb::IMessage<Experimental>
  5807. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5808. , pb::IBufferMessage
  5809. #endif
  5810. {
  5811. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  5812. private pb::UnknownFieldSet _unknownFields;
  5813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5814. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5815. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  5816. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5817. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5818. public static pbr::MessageDescriptor Descriptor {
  5819. get { return global::Tensorflow.RunOptions.Descriptor.NestedTypes[0]; }
  5820. }
  5821. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5822. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5823. pbr::MessageDescriptor pb::IMessage.Descriptor {
  5824. get { return Descriptor; }
  5825. }
  5826. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5827. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5828. public Experimental() {
  5829. OnConstruction();
  5830. }
  5831. partial void OnConstruction();
  5832. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5833. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5834. public Experimental(Experimental other) : this() {
  5835. collectiveGraphKey_ = other.collectiveGraphKey_;
  5836. useRunHandlerPool_ = other.useRunHandlerPool_;
  5837. runHandlerPoolOptions_ = other.runHandlerPoolOptions_ != null ? other.runHandlerPoolOptions_.Clone() : null;
  5838. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  5839. }
  5840. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5841. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5842. public Experimental Clone() {
  5843. return new Experimental(this);
  5844. }
  5845. /// <summary>Field number for the "collective_graph_key" field.</summary>
  5846. public const int CollectiveGraphKeyFieldNumber = 1;
  5847. private long collectiveGraphKey_;
  5848. /// <summary>
  5849. /// If non-zero, declares that this graph is going to use collective
  5850. /// ops and must synchronize step_ids with any other graph with this
  5851. /// same group_key value (in a distributed computation where tasks
  5852. /// run disjoint graphs).
  5853. /// </summary>
  5854. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5855. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5856. public long CollectiveGraphKey {
  5857. get { return collectiveGraphKey_; }
  5858. set {
  5859. collectiveGraphKey_ = value;
  5860. }
  5861. }
  5862. /// <summary>Field number for the "use_run_handler_pool" field.</summary>
  5863. public const int UseRunHandlerPoolFieldNumber = 2;
  5864. private bool useRunHandlerPool_;
  5865. /// <summary>
  5866. /// If true, then operations (using the inter-op pool) across all
  5867. /// session::run() calls will be centrally scheduled, optimizing for (median
  5868. /// and tail) latency.
  5869. /// Consider using this option for CPU-bound workloads like inference.
  5870. /// </summary>
  5871. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5872. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5873. public bool UseRunHandlerPool {
  5874. get { return useRunHandlerPool_; }
  5875. set {
  5876. useRunHandlerPool_ = value;
  5877. }
  5878. }
  5879. /// <summary>Field number for the "run_handler_pool_options" field.</summary>
  5880. public const int RunHandlerPoolOptionsFieldNumber = 3;
  5881. private global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions runHandlerPoolOptions_;
  5882. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5883. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5884. public global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions RunHandlerPoolOptions {
  5885. get { return runHandlerPoolOptions_; }
  5886. set {
  5887. runHandlerPoolOptions_ = value;
  5888. }
  5889. }
  5890. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5891. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5892. public override bool Equals(object other) {
  5893. return Equals(other as Experimental);
  5894. }
  5895. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5896. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5897. public bool Equals(Experimental other) {
  5898. if (ReferenceEquals(other, null)) {
  5899. return false;
  5900. }
  5901. if (ReferenceEquals(other, this)) {
  5902. return true;
  5903. }
  5904. if (CollectiveGraphKey != other.CollectiveGraphKey) return false;
  5905. if (UseRunHandlerPool != other.UseRunHandlerPool) return false;
  5906. if (!object.Equals(RunHandlerPoolOptions, other.RunHandlerPoolOptions)) return false;
  5907. return Equals(_unknownFields, other._unknownFields);
  5908. }
  5909. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5910. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5911. public override int GetHashCode() {
  5912. int hash = 1;
  5913. if (CollectiveGraphKey != 0L) hash ^= CollectiveGraphKey.GetHashCode();
  5914. if (UseRunHandlerPool != false) hash ^= UseRunHandlerPool.GetHashCode();
  5915. if (runHandlerPoolOptions_ != null) hash ^= RunHandlerPoolOptions.GetHashCode();
  5916. if (_unknownFields != null) {
  5917. hash ^= _unknownFields.GetHashCode();
  5918. }
  5919. return hash;
  5920. }
  5921. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5922. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5923. public override string ToString() {
  5924. return pb::JsonFormatter.ToDiagnosticString(this);
  5925. }
  5926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5927. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5928. public void WriteTo(pb::CodedOutputStream output) {
  5929. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5930. output.WriteRawMessage(this);
  5931. #else
  5932. if (CollectiveGraphKey != 0L) {
  5933. output.WriteRawTag(8);
  5934. output.WriteInt64(CollectiveGraphKey);
  5935. }
  5936. if (UseRunHandlerPool != false) {
  5937. output.WriteRawTag(16);
  5938. output.WriteBool(UseRunHandlerPool);
  5939. }
  5940. if (runHandlerPoolOptions_ != null) {
  5941. output.WriteRawTag(26);
  5942. output.WriteMessage(RunHandlerPoolOptions);
  5943. }
  5944. if (_unknownFields != null) {
  5945. _unknownFields.WriteTo(output);
  5946. }
  5947. #endif
  5948. }
  5949. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  5950. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5951. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5952. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  5953. if (CollectiveGraphKey != 0L) {
  5954. output.WriteRawTag(8);
  5955. output.WriteInt64(CollectiveGraphKey);
  5956. }
  5957. if (UseRunHandlerPool != false) {
  5958. output.WriteRawTag(16);
  5959. output.WriteBool(UseRunHandlerPool);
  5960. }
  5961. if (runHandlerPoolOptions_ != null) {
  5962. output.WriteRawTag(26);
  5963. output.WriteMessage(RunHandlerPoolOptions);
  5964. }
  5965. if (_unknownFields != null) {
  5966. _unknownFields.WriteTo(ref output);
  5967. }
  5968. }
  5969. #endif
  5970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5971. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5972. public int CalculateSize() {
  5973. int size = 0;
  5974. if (CollectiveGraphKey != 0L) {
  5975. size += 1 + pb::CodedOutputStream.ComputeInt64Size(CollectiveGraphKey);
  5976. }
  5977. if (UseRunHandlerPool != false) {
  5978. size += 1 + 1;
  5979. }
  5980. if (runHandlerPoolOptions_ != null) {
  5981. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RunHandlerPoolOptions);
  5982. }
  5983. if (_unknownFields != null) {
  5984. size += _unknownFields.CalculateSize();
  5985. }
  5986. return size;
  5987. }
  5988. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  5989. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  5990. public void MergeFrom(Experimental other) {
  5991. if (other == null) {
  5992. return;
  5993. }
  5994. if (other.CollectiveGraphKey != 0L) {
  5995. CollectiveGraphKey = other.CollectiveGraphKey;
  5996. }
  5997. if (other.UseRunHandlerPool != false) {
  5998. UseRunHandlerPool = other.UseRunHandlerPool;
  5999. }
  6000. if (other.runHandlerPoolOptions_ != null) {
  6001. if (runHandlerPoolOptions_ == null) {
  6002. RunHandlerPoolOptions = new global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions();
  6003. }
  6004. RunHandlerPoolOptions.MergeFrom(other.RunHandlerPoolOptions);
  6005. }
  6006. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  6007. }
  6008. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6009. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6010. public void MergeFrom(pb::CodedInputStream input) {
  6011. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6012. input.ReadRawMessage(this);
  6013. #else
  6014. uint tag;
  6015. while ((tag = input.ReadTag()) != 0) {
  6016. switch(tag) {
  6017. default:
  6018. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  6019. break;
  6020. case 8: {
  6021. CollectiveGraphKey = input.ReadInt64();
  6022. break;
  6023. }
  6024. case 16: {
  6025. UseRunHandlerPool = input.ReadBool();
  6026. break;
  6027. }
  6028. case 26: {
  6029. if (runHandlerPoolOptions_ == null) {
  6030. RunHandlerPoolOptions = new global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions();
  6031. }
  6032. input.ReadMessage(RunHandlerPoolOptions);
  6033. break;
  6034. }
  6035. }
  6036. }
  6037. #endif
  6038. }
  6039. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6040. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6041. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6042. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  6043. uint tag;
  6044. while ((tag = input.ReadTag()) != 0) {
  6045. switch(tag) {
  6046. default:
  6047. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  6048. break;
  6049. case 8: {
  6050. CollectiveGraphKey = input.ReadInt64();
  6051. break;
  6052. }
  6053. case 16: {
  6054. UseRunHandlerPool = input.ReadBool();
  6055. break;
  6056. }
  6057. case 26: {
  6058. if (runHandlerPoolOptions_ == null) {
  6059. RunHandlerPoolOptions = new global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions();
  6060. }
  6061. input.ReadMessage(RunHandlerPoolOptions);
  6062. break;
  6063. }
  6064. }
  6065. }
  6066. }
  6067. #endif
  6068. #region Nested types
  6069. /// <summary>Container for nested types declared in the Experimental message type.</summary>
  6070. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6071. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6072. public static partial class Types {
  6073. /// <summary>
  6074. /// Options for run handler thread pool.
  6075. /// </summary>
  6076. public sealed partial class RunHandlerPoolOptions : pb::IMessage<RunHandlerPoolOptions>
  6077. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6078. , pb::IBufferMessage
  6079. #endif
  6080. {
  6081. private static readonly pb::MessageParser<RunHandlerPoolOptions> _parser = new pb::MessageParser<RunHandlerPoolOptions>(() => new RunHandlerPoolOptions());
  6082. private pb::UnknownFieldSet _unknownFields;
  6083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6084. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6085. public static pb::MessageParser<RunHandlerPoolOptions> Parser { get { return _parser; } }
  6086. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6087. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6088. public static pbr::MessageDescriptor Descriptor {
  6089. get { return global::Tensorflow.RunOptions.Types.Experimental.Descriptor.NestedTypes[0]; }
  6090. }
  6091. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6092. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6093. pbr::MessageDescriptor pb::IMessage.Descriptor {
  6094. get { return Descriptor; }
  6095. }
  6096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6097. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6098. public RunHandlerPoolOptions() {
  6099. OnConstruction();
  6100. }
  6101. partial void OnConstruction();
  6102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6103. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6104. public RunHandlerPoolOptions(RunHandlerPoolOptions other) : this() {
  6105. priority_ = other.priority_;
  6106. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  6107. }
  6108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6109. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6110. public RunHandlerPoolOptions Clone() {
  6111. return new RunHandlerPoolOptions(this);
  6112. }
  6113. /// <summary>Field number for the "priority" field.</summary>
  6114. public const int PriorityFieldNumber = 1;
  6115. private long priority_;
  6116. /// <summary>
  6117. /// Priority of the request. The run handler thread pool will schedule ops
  6118. /// based on the priority number. The larger number means higher priority.
  6119. /// </summary>
  6120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6121. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6122. public long Priority {
  6123. get { return priority_; }
  6124. set {
  6125. priority_ = value;
  6126. }
  6127. }
  6128. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6129. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6130. public override bool Equals(object other) {
  6131. return Equals(other as RunHandlerPoolOptions);
  6132. }
  6133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6134. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6135. public bool Equals(RunHandlerPoolOptions other) {
  6136. if (ReferenceEquals(other, null)) {
  6137. return false;
  6138. }
  6139. if (ReferenceEquals(other, this)) {
  6140. return true;
  6141. }
  6142. if (Priority != other.Priority) return false;
  6143. return Equals(_unknownFields, other._unknownFields);
  6144. }
  6145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6146. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6147. public override int GetHashCode() {
  6148. int hash = 1;
  6149. if (Priority != 0L) hash ^= Priority.GetHashCode();
  6150. if (_unknownFields != null) {
  6151. hash ^= _unknownFields.GetHashCode();
  6152. }
  6153. return hash;
  6154. }
  6155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6156. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6157. public override string ToString() {
  6158. return pb::JsonFormatter.ToDiagnosticString(this);
  6159. }
  6160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6161. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6162. public void WriteTo(pb::CodedOutputStream output) {
  6163. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6164. output.WriteRawMessage(this);
  6165. #else
  6166. if (Priority != 0L) {
  6167. output.WriteRawTag(8);
  6168. output.WriteInt64(Priority);
  6169. }
  6170. if (_unknownFields != null) {
  6171. _unknownFields.WriteTo(output);
  6172. }
  6173. #endif
  6174. }
  6175. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6176. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6177. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6178. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  6179. if (Priority != 0L) {
  6180. output.WriteRawTag(8);
  6181. output.WriteInt64(Priority);
  6182. }
  6183. if (_unknownFields != null) {
  6184. _unknownFields.WriteTo(ref output);
  6185. }
  6186. }
  6187. #endif
  6188. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6189. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6190. public int CalculateSize() {
  6191. int size = 0;
  6192. if (Priority != 0L) {
  6193. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Priority);
  6194. }
  6195. if (_unknownFields != null) {
  6196. size += _unknownFields.CalculateSize();
  6197. }
  6198. return size;
  6199. }
  6200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6201. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6202. public void MergeFrom(RunHandlerPoolOptions other) {
  6203. if (other == null) {
  6204. return;
  6205. }
  6206. if (other.Priority != 0L) {
  6207. Priority = other.Priority;
  6208. }
  6209. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  6210. }
  6211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6212. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6213. public void MergeFrom(pb::CodedInputStream input) {
  6214. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6215. input.ReadRawMessage(this);
  6216. #else
  6217. uint tag;
  6218. while ((tag = input.ReadTag()) != 0) {
  6219. switch(tag) {
  6220. default:
  6221. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  6222. break;
  6223. case 8: {
  6224. Priority = input.ReadInt64();
  6225. break;
  6226. }
  6227. }
  6228. }
  6229. #endif
  6230. }
  6231. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6233. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6234. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  6235. uint tag;
  6236. while ((tag = input.ReadTag()) != 0) {
  6237. switch(tag) {
  6238. default:
  6239. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  6240. break;
  6241. case 8: {
  6242. Priority = input.ReadInt64();
  6243. break;
  6244. }
  6245. }
  6246. }
  6247. }
  6248. #endif
  6249. }
  6250. }
  6251. #endregion
  6252. }
  6253. }
  6254. #endregion
  6255. }
  6256. /// <summary>
  6257. /// Metadata output (i.e., non-Tensor) for a single Run() call.
  6258. /// </summary>
  6259. public sealed partial class RunMetadata : pb::IMessage<RunMetadata>
  6260. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6261. , pb::IBufferMessage
  6262. #endif
  6263. {
  6264. private static readonly pb::MessageParser<RunMetadata> _parser = new pb::MessageParser<RunMetadata>(() => new RunMetadata());
  6265. private pb::UnknownFieldSet _unknownFields;
  6266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6267. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6268. public static pb::MessageParser<RunMetadata> Parser { get { return _parser; } }
  6269. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6270. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6271. public static pbr::MessageDescriptor Descriptor {
  6272. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[8]; }
  6273. }
  6274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6275. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6276. pbr::MessageDescriptor pb::IMessage.Descriptor {
  6277. get { return Descriptor; }
  6278. }
  6279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6280. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6281. public RunMetadata() {
  6282. OnConstruction();
  6283. }
  6284. partial void OnConstruction();
  6285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6286. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6287. public RunMetadata(RunMetadata other) : this() {
  6288. stepStats_ = other.stepStats_ != null ? other.stepStats_.Clone() : null;
  6289. costGraph_ = other.costGraph_ != null ? other.costGraph_.Clone() : null;
  6290. partitionGraphs_ = other.partitionGraphs_.Clone();
  6291. functionGraphs_ = other.functionGraphs_.Clone();
  6292. sessionMetadata_ = other.sessionMetadata_ != null ? other.sessionMetadata_.Clone() : null;
  6293. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  6294. }
  6295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6296. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6297. public RunMetadata Clone() {
  6298. return new RunMetadata(this);
  6299. }
  6300. /// <summary>Field number for the "step_stats" field.</summary>
  6301. public const int StepStatsFieldNumber = 1;
  6302. private global::Tensorflow.StepStats stepStats_;
  6303. /// <summary>
  6304. /// Statistics traced for this step. Populated if tracing is turned on via the
  6305. /// "RunOptions" proto.
  6306. /// EXPERIMENTAL: The format and set of events may change in future versions.
  6307. /// </summary>
  6308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6309. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6310. public global::Tensorflow.StepStats StepStats {
  6311. get { return stepStats_; }
  6312. set {
  6313. stepStats_ = value;
  6314. }
  6315. }
  6316. /// <summary>Field number for the "cost_graph" field.</summary>
  6317. public const int CostGraphFieldNumber = 2;
  6318. private global::Tensorflow.CostGraphDef costGraph_;
  6319. /// <summary>
  6320. /// The cost graph for the computation defined by the run call.
  6321. /// </summary>
  6322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6323. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6324. public global::Tensorflow.CostGraphDef CostGraph {
  6325. get { return costGraph_; }
  6326. set {
  6327. costGraph_ = value;
  6328. }
  6329. }
  6330. /// <summary>Field number for the "partition_graphs" field.</summary>
  6331. public const int PartitionGraphsFieldNumber = 3;
  6332. private static readonly pb::FieldCodec<global::Tensorflow.GraphDef> _repeated_partitionGraphs_codec
  6333. = pb::FieldCodec.ForMessage(26, global::Tensorflow.GraphDef.Parser);
  6334. private readonly pbc::RepeatedField<global::Tensorflow.GraphDef> partitionGraphs_ = new pbc::RepeatedField<global::Tensorflow.GraphDef>();
  6335. /// <summary>
  6336. /// Graphs of the partitions executed by executors.
  6337. /// </summary>
  6338. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6339. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6340. public pbc::RepeatedField<global::Tensorflow.GraphDef> PartitionGraphs {
  6341. get { return partitionGraphs_; }
  6342. }
  6343. /// <summary>Field number for the "function_graphs" field.</summary>
  6344. public const int FunctionGraphsFieldNumber = 4;
  6345. private static readonly pb::FieldCodec<global::Tensorflow.RunMetadata.Types.FunctionGraphs> _repeated_functionGraphs_codec
  6346. = pb::FieldCodec.ForMessage(34, global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser);
  6347. private readonly pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs> functionGraphs_ = new pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs>();
  6348. /// <summary>
  6349. /// This is only populated for graphs that are run as functions in TensorFlow
  6350. /// V2. There will be an entry below for each function that is traced.
  6351. /// The main use cases of the post_optimization_graph and the partition_graphs
  6352. /// is to give the caller insight into the graphs that were actually run by the
  6353. /// runtime. Additional information (such as those in step_stats) will match
  6354. /// these graphs.
  6355. /// We also include the pre_optimization_graph since it is usually easier to
  6356. /// read, and is helpful in situations where the caller wants to get a high
  6357. /// level idea of what the built graph looks like (since the various graph
  6358. /// optimization passes might change the structure of the graph significantly).
  6359. /// </summary>
  6360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6361. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6362. public pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs> FunctionGraphs {
  6363. get { return functionGraphs_; }
  6364. }
  6365. /// <summary>Field number for the "session_metadata" field.</summary>
  6366. public const int SessionMetadataFieldNumber = 5;
  6367. private global::Tensorflow.SessionMetadata sessionMetadata_;
  6368. /// <summary>
  6369. /// Metadata about the session.
  6370. /// </summary>
  6371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6372. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6373. public global::Tensorflow.SessionMetadata SessionMetadata {
  6374. get { return sessionMetadata_; }
  6375. set {
  6376. sessionMetadata_ = value;
  6377. }
  6378. }
  6379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6380. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6381. public override bool Equals(object other) {
  6382. return Equals(other as RunMetadata);
  6383. }
  6384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6385. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6386. public bool Equals(RunMetadata other) {
  6387. if (ReferenceEquals(other, null)) {
  6388. return false;
  6389. }
  6390. if (ReferenceEquals(other, this)) {
  6391. return true;
  6392. }
  6393. if (!object.Equals(StepStats, other.StepStats)) return false;
  6394. if (!object.Equals(CostGraph, other.CostGraph)) return false;
  6395. if(!partitionGraphs_.Equals(other.partitionGraphs_)) return false;
  6396. if(!functionGraphs_.Equals(other.functionGraphs_)) return false;
  6397. if (!object.Equals(SessionMetadata, other.SessionMetadata)) return false;
  6398. return Equals(_unknownFields, other._unknownFields);
  6399. }
  6400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6401. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6402. public override int GetHashCode() {
  6403. int hash = 1;
  6404. if (stepStats_ != null) hash ^= StepStats.GetHashCode();
  6405. if (costGraph_ != null) hash ^= CostGraph.GetHashCode();
  6406. hash ^= partitionGraphs_.GetHashCode();
  6407. hash ^= functionGraphs_.GetHashCode();
  6408. if (sessionMetadata_ != null) hash ^= SessionMetadata.GetHashCode();
  6409. if (_unknownFields != null) {
  6410. hash ^= _unknownFields.GetHashCode();
  6411. }
  6412. return hash;
  6413. }
  6414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6415. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6416. public override string ToString() {
  6417. return pb::JsonFormatter.ToDiagnosticString(this);
  6418. }
  6419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6420. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6421. public void WriteTo(pb::CodedOutputStream output) {
  6422. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6423. output.WriteRawMessage(this);
  6424. #else
  6425. if (stepStats_ != null) {
  6426. output.WriteRawTag(10);
  6427. output.WriteMessage(StepStats);
  6428. }
  6429. if (costGraph_ != null) {
  6430. output.WriteRawTag(18);
  6431. output.WriteMessage(CostGraph);
  6432. }
  6433. partitionGraphs_.WriteTo(output, _repeated_partitionGraphs_codec);
  6434. functionGraphs_.WriteTo(output, _repeated_functionGraphs_codec);
  6435. if (sessionMetadata_ != null) {
  6436. output.WriteRawTag(42);
  6437. output.WriteMessage(SessionMetadata);
  6438. }
  6439. if (_unknownFields != null) {
  6440. _unknownFields.WriteTo(output);
  6441. }
  6442. #endif
  6443. }
  6444. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6445. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6446. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6447. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  6448. if (stepStats_ != null) {
  6449. output.WriteRawTag(10);
  6450. output.WriteMessage(StepStats);
  6451. }
  6452. if (costGraph_ != null) {
  6453. output.WriteRawTag(18);
  6454. output.WriteMessage(CostGraph);
  6455. }
  6456. partitionGraphs_.WriteTo(ref output, _repeated_partitionGraphs_codec);
  6457. functionGraphs_.WriteTo(ref output, _repeated_functionGraphs_codec);
  6458. if (sessionMetadata_ != null) {
  6459. output.WriteRawTag(42);
  6460. output.WriteMessage(SessionMetadata);
  6461. }
  6462. if (_unknownFields != null) {
  6463. _unknownFields.WriteTo(ref output);
  6464. }
  6465. }
  6466. #endif
  6467. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6468. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6469. public int CalculateSize() {
  6470. int size = 0;
  6471. if (stepStats_ != null) {
  6472. size += 1 + pb::CodedOutputStream.ComputeMessageSize(StepStats);
  6473. }
  6474. if (costGraph_ != null) {
  6475. size += 1 + pb::CodedOutputStream.ComputeMessageSize(CostGraph);
  6476. }
  6477. size += partitionGraphs_.CalculateSize(_repeated_partitionGraphs_codec);
  6478. size += functionGraphs_.CalculateSize(_repeated_functionGraphs_codec);
  6479. if (sessionMetadata_ != null) {
  6480. size += 1 + pb::CodedOutputStream.ComputeMessageSize(SessionMetadata);
  6481. }
  6482. if (_unknownFields != null) {
  6483. size += _unknownFields.CalculateSize();
  6484. }
  6485. return size;
  6486. }
  6487. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6488. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6489. public void MergeFrom(RunMetadata other) {
  6490. if (other == null) {
  6491. return;
  6492. }
  6493. if (other.stepStats_ != null) {
  6494. if (stepStats_ == null) {
  6495. StepStats = new global::Tensorflow.StepStats();
  6496. }
  6497. StepStats.MergeFrom(other.StepStats);
  6498. }
  6499. if (other.costGraph_ != null) {
  6500. if (costGraph_ == null) {
  6501. CostGraph = new global::Tensorflow.CostGraphDef();
  6502. }
  6503. CostGraph.MergeFrom(other.CostGraph);
  6504. }
  6505. partitionGraphs_.Add(other.partitionGraphs_);
  6506. functionGraphs_.Add(other.functionGraphs_);
  6507. if (other.sessionMetadata_ != null) {
  6508. if (sessionMetadata_ == null) {
  6509. SessionMetadata = new global::Tensorflow.SessionMetadata();
  6510. }
  6511. SessionMetadata.MergeFrom(other.SessionMetadata);
  6512. }
  6513. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  6514. }
  6515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6516. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6517. public void MergeFrom(pb::CodedInputStream input) {
  6518. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6519. input.ReadRawMessage(this);
  6520. #else
  6521. uint tag;
  6522. while ((tag = input.ReadTag()) != 0) {
  6523. switch(tag) {
  6524. default:
  6525. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  6526. break;
  6527. case 10: {
  6528. if (stepStats_ == null) {
  6529. StepStats = new global::Tensorflow.StepStats();
  6530. }
  6531. input.ReadMessage(StepStats);
  6532. break;
  6533. }
  6534. case 18: {
  6535. if (costGraph_ == null) {
  6536. CostGraph = new global::Tensorflow.CostGraphDef();
  6537. }
  6538. input.ReadMessage(CostGraph);
  6539. break;
  6540. }
  6541. case 26: {
  6542. partitionGraphs_.AddEntriesFrom(input, _repeated_partitionGraphs_codec);
  6543. break;
  6544. }
  6545. case 34: {
  6546. functionGraphs_.AddEntriesFrom(input, _repeated_functionGraphs_codec);
  6547. break;
  6548. }
  6549. case 42: {
  6550. if (sessionMetadata_ == null) {
  6551. SessionMetadata = new global::Tensorflow.SessionMetadata();
  6552. }
  6553. input.ReadMessage(SessionMetadata);
  6554. break;
  6555. }
  6556. }
  6557. }
  6558. #endif
  6559. }
  6560. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6562. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6563. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  6564. uint tag;
  6565. while ((tag = input.ReadTag()) != 0) {
  6566. switch(tag) {
  6567. default:
  6568. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  6569. break;
  6570. case 10: {
  6571. if (stepStats_ == null) {
  6572. StepStats = new global::Tensorflow.StepStats();
  6573. }
  6574. input.ReadMessage(StepStats);
  6575. break;
  6576. }
  6577. case 18: {
  6578. if (costGraph_ == null) {
  6579. CostGraph = new global::Tensorflow.CostGraphDef();
  6580. }
  6581. input.ReadMessage(CostGraph);
  6582. break;
  6583. }
  6584. case 26: {
  6585. partitionGraphs_.AddEntriesFrom(ref input, _repeated_partitionGraphs_codec);
  6586. break;
  6587. }
  6588. case 34: {
  6589. functionGraphs_.AddEntriesFrom(ref input, _repeated_functionGraphs_codec);
  6590. break;
  6591. }
  6592. case 42: {
  6593. if (sessionMetadata_ == null) {
  6594. SessionMetadata = new global::Tensorflow.SessionMetadata();
  6595. }
  6596. input.ReadMessage(SessionMetadata);
  6597. break;
  6598. }
  6599. }
  6600. }
  6601. }
  6602. #endif
  6603. #region Nested types
  6604. /// <summary>Container for nested types declared in the RunMetadata message type.</summary>
  6605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6606. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6607. public static partial class Types {
  6608. public sealed partial class FunctionGraphs : pb::IMessage<FunctionGraphs>
  6609. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6610. , pb::IBufferMessage
  6611. #endif
  6612. {
  6613. private static readonly pb::MessageParser<FunctionGraphs> _parser = new pb::MessageParser<FunctionGraphs>(() => new FunctionGraphs());
  6614. private pb::UnknownFieldSet _unknownFields;
  6615. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6616. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6617. public static pb::MessageParser<FunctionGraphs> Parser { get { return _parser; } }
  6618. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6619. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6620. public static pbr::MessageDescriptor Descriptor {
  6621. get { return global::Tensorflow.RunMetadata.Descriptor.NestedTypes[0]; }
  6622. }
  6623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6624. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6625. pbr::MessageDescriptor pb::IMessage.Descriptor {
  6626. get { return Descriptor; }
  6627. }
  6628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6629. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6630. public FunctionGraphs() {
  6631. OnConstruction();
  6632. }
  6633. partial void OnConstruction();
  6634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6635. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6636. public FunctionGraphs(FunctionGraphs other) : this() {
  6637. partitionGraphs_ = other.partitionGraphs_.Clone();
  6638. preOptimizationGraph_ = other.preOptimizationGraph_ != null ? other.preOptimizationGraph_.Clone() : null;
  6639. postOptimizationGraph_ = other.postOptimizationGraph_ != null ? other.postOptimizationGraph_.Clone() : null;
  6640. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  6641. }
  6642. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6643. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6644. public FunctionGraphs Clone() {
  6645. return new FunctionGraphs(this);
  6646. }
  6647. /// <summary>Field number for the "partition_graphs" field.</summary>
  6648. public const int PartitionGraphsFieldNumber = 1;
  6649. private static readonly pb::FieldCodec<global::Tensorflow.GraphDef> _repeated_partitionGraphs_codec
  6650. = pb::FieldCodec.ForMessage(10, global::Tensorflow.GraphDef.Parser);
  6651. private readonly pbc::RepeatedField<global::Tensorflow.GraphDef> partitionGraphs_ = new pbc::RepeatedField<global::Tensorflow.GraphDef>();
  6652. /// <summary>
  6653. /// TODO(nareshmodi): Include some sort of function/cache-key identifier?
  6654. /// </summary>
  6655. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6656. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6657. public pbc::RepeatedField<global::Tensorflow.GraphDef> PartitionGraphs {
  6658. get { return partitionGraphs_; }
  6659. }
  6660. /// <summary>Field number for the "pre_optimization_graph" field.</summary>
  6661. public const int PreOptimizationGraphFieldNumber = 2;
  6662. private global::Tensorflow.GraphDef preOptimizationGraph_;
  6663. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6664. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6665. public global::Tensorflow.GraphDef PreOptimizationGraph {
  6666. get { return preOptimizationGraph_; }
  6667. set {
  6668. preOptimizationGraph_ = value;
  6669. }
  6670. }
  6671. /// <summary>Field number for the "post_optimization_graph" field.</summary>
  6672. public const int PostOptimizationGraphFieldNumber = 3;
  6673. private global::Tensorflow.GraphDef postOptimizationGraph_;
  6674. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6675. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6676. public global::Tensorflow.GraphDef PostOptimizationGraph {
  6677. get { return postOptimizationGraph_; }
  6678. set {
  6679. postOptimizationGraph_ = value;
  6680. }
  6681. }
  6682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6683. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6684. public override bool Equals(object other) {
  6685. return Equals(other as FunctionGraphs);
  6686. }
  6687. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6688. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6689. public bool Equals(FunctionGraphs other) {
  6690. if (ReferenceEquals(other, null)) {
  6691. return false;
  6692. }
  6693. if (ReferenceEquals(other, this)) {
  6694. return true;
  6695. }
  6696. if(!partitionGraphs_.Equals(other.partitionGraphs_)) return false;
  6697. if (!object.Equals(PreOptimizationGraph, other.PreOptimizationGraph)) return false;
  6698. if (!object.Equals(PostOptimizationGraph, other.PostOptimizationGraph)) return false;
  6699. return Equals(_unknownFields, other._unknownFields);
  6700. }
  6701. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6702. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6703. public override int GetHashCode() {
  6704. int hash = 1;
  6705. hash ^= partitionGraphs_.GetHashCode();
  6706. if (preOptimizationGraph_ != null) hash ^= PreOptimizationGraph.GetHashCode();
  6707. if (postOptimizationGraph_ != null) hash ^= PostOptimizationGraph.GetHashCode();
  6708. if (_unknownFields != null) {
  6709. hash ^= _unknownFields.GetHashCode();
  6710. }
  6711. return hash;
  6712. }
  6713. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6714. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6715. public override string ToString() {
  6716. return pb::JsonFormatter.ToDiagnosticString(this);
  6717. }
  6718. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6719. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6720. public void WriteTo(pb::CodedOutputStream output) {
  6721. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6722. output.WriteRawMessage(this);
  6723. #else
  6724. partitionGraphs_.WriteTo(output, _repeated_partitionGraphs_codec);
  6725. if (preOptimizationGraph_ != null) {
  6726. output.WriteRawTag(18);
  6727. output.WriteMessage(PreOptimizationGraph);
  6728. }
  6729. if (postOptimizationGraph_ != null) {
  6730. output.WriteRawTag(26);
  6731. output.WriteMessage(PostOptimizationGraph);
  6732. }
  6733. if (_unknownFields != null) {
  6734. _unknownFields.WriteTo(output);
  6735. }
  6736. #endif
  6737. }
  6738. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6739. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6740. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6741. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  6742. partitionGraphs_.WriteTo(ref output, _repeated_partitionGraphs_codec);
  6743. if (preOptimizationGraph_ != null) {
  6744. output.WriteRawTag(18);
  6745. output.WriteMessage(PreOptimizationGraph);
  6746. }
  6747. if (postOptimizationGraph_ != null) {
  6748. output.WriteRawTag(26);
  6749. output.WriteMessage(PostOptimizationGraph);
  6750. }
  6751. if (_unknownFields != null) {
  6752. _unknownFields.WriteTo(ref output);
  6753. }
  6754. }
  6755. #endif
  6756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6757. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6758. public int CalculateSize() {
  6759. int size = 0;
  6760. size += partitionGraphs_.CalculateSize(_repeated_partitionGraphs_codec);
  6761. if (preOptimizationGraph_ != null) {
  6762. size += 1 + pb::CodedOutputStream.ComputeMessageSize(PreOptimizationGraph);
  6763. }
  6764. if (postOptimizationGraph_ != null) {
  6765. size += 1 + pb::CodedOutputStream.ComputeMessageSize(PostOptimizationGraph);
  6766. }
  6767. if (_unknownFields != null) {
  6768. size += _unknownFields.CalculateSize();
  6769. }
  6770. return size;
  6771. }
  6772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6773. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6774. public void MergeFrom(FunctionGraphs other) {
  6775. if (other == null) {
  6776. return;
  6777. }
  6778. partitionGraphs_.Add(other.partitionGraphs_);
  6779. if (other.preOptimizationGraph_ != null) {
  6780. if (preOptimizationGraph_ == null) {
  6781. PreOptimizationGraph = new global::Tensorflow.GraphDef();
  6782. }
  6783. PreOptimizationGraph.MergeFrom(other.PreOptimizationGraph);
  6784. }
  6785. if (other.postOptimizationGraph_ != null) {
  6786. if (postOptimizationGraph_ == null) {
  6787. PostOptimizationGraph = new global::Tensorflow.GraphDef();
  6788. }
  6789. PostOptimizationGraph.MergeFrom(other.PostOptimizationGraph);
  6790. }
  6791. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  6792. }
  6793. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6794. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6795. public void MergeFrom(pb::CodedInputStream input) {
  6796. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6797. input.ReadRawMessage(this);
  6798. #else
  6799. uint tag;
  6800. while ((tag = input.ReadTag()) != 0) {
  6801. switch(tag) {
  6802. default:
  6803. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  6804. break;
  6805. case 10: {
  6806. partitionGraphs_.AddEntriesFrom(input, _repeated_partitionGraphs_codec);
  6807. break;
  6808. }
  6809. case 18: {
  6810. if (preOptimizationGraph_ == null) {
  6811. PreOptimizationGraph = new global::Tensorflow.GraphDef();
  6812. }
  6813. input.ReadMessage(PreOptimizationGraph);
  6814. break;
  6815. }
  6816. case 26: {
  6817. if (postOptimizationGraph_ == null) {
  6818. PostOptimizationGraph = new global::Tensorflow.GraphDef();
  6819. }
  6820. input.ReadMessage(PostOptimizationGraph);
  6821. break;
  6822. }
  6823. }
  6824. }
  6825. #endif
  6826. }
  6827. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6828. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6829. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6830. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  6831. uint tag;
  6832. while ((tag = input.ReadTag()) != 0) {
  6833. switch(tag) {
  6834. default:
  6835. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  6836. break;
  6837. case 10: {
  6838. partitionGraphs_.AddEntriesFrom(ref input, _repeated_partitionGraphs_codec);
  6839. break;
  6840. }
  6841. case 18: {
  6842. if (preOptimizationGraph_ == null) {
  6843. PreOptimizationGraph = new global::Tensorflow.GraphDef();
  6844. }
  6845. input.ReadMessage(PreOptimizationGraph);
  6846. break;
  6847. }
  6848. case 26: {
  6849. if (postOptimizationGraph_ == null) {
  6850. PostOptimizationGraph = new global::Tensorflow.GraphDef();
  6851. }
  6852. input.ReadMessage(PostOptimizationGraph);
  6853. break;
  6854. }
  6855. }
  6856. }
  6857. }
  6858. #endif
  6859. }
  6860. }
  6861. #endregion
  6862. }
  6863. /// <summary>
  6864. /// Defines a connection between two tensors in a `GraphDef`.
  6865. /// </summary>
  6866. public sealed partial class TensorConnection : pb::IMessage<TensorConnection>
  6867. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6868. , pb::IBufferMessage
  6869. #endif
  6870. {
  6871. private static readonly pb::MessageParser<TensorConnection> _parser = new pb::MessageParser<TensorConnection>(() => new TensorConnection());
  6872. private pb::UnknownFieldSet _unknownFields;
  6873. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6874. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6875. public static pb::MessageParser<TensorConnection> Parser { get { return _parser; } }
  6876. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6877. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6878. public static pbr::MessageDescriptor Descriptor {
  6879. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[9]; }
  6880. }
  6881. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6882. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6883. pbr::MessageDescriptor pb::IMessage.Descriptor {
  6884. get { return Descriptor; }
  6885. }
  6886. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6887. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6888. public TensorConnection() {
  6889. OnConstruction();
  6890. }
  6891. partial void OnConstruction();
  6892. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6893. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6894. public TensorConnection(TensorConnection other) : this() {
  6895. fromTensor_ = other.fromTensor_;
  6896. toTensor_ = other.toTensor_;
  6897. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  6898. }
  6899. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6900. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6901. public TensorConnection Clone() {
  6902. return new TensorConnection(this);
  6903. }
  6904. /// <summary>Field number for the "from_tensor" field.</summary>
  6905. public const int FromTensorFieldNumber = 1;
  6906. private string fromTensor_ = "";
  6907. /// <summary>
  6908. /// A tensor name. The value of this tensor will be substituted for
  6909. /// the tensor named in `to_tensor`.
  6910. /// </summary>
  6911. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6912. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6913. public string FromTensor {
  6914. get { return fromTensor_; }
  6915. set {
  6916. fromTensor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  6917. }
  6918. }
  6919. /// <summary>Field number for the "to_tensor" field.</summary>
  6920. public const int ToTensorFieldNumber = 2;
  6921. private string toTensor_ = "";
  6922. /// <summary>
  6923. /// A tensor name. The value of this tensor will be bound to the
  6924. /// value of the tensor named in `from_tensor`.
  6925. /// </summary>
  6926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6927. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6928. public string ToTensor {
  6929. get { return toTensor_; }
  6930. set {
  6931. toTensor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  6932. }
  6933. }
  6934. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6935. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6936. public override bool Equals(object other) {
  6937. return Equals(other as TensorConnection);
  6938. }
  6939. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6940. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6941. public bool Equals(TensorConnection other) {
  6942. if (ReferenceEquals(other, null)) {
  6943. return false;
  6944. }
  6945. if (ReferenceEquals(other, this)) {
  6946. return true;
  6947. }
  6948. if (FromTensor != other.FromTensor) return false;
  6949. if (ToTensor != other.ToTensor) return false;
  6950. return Equals(_unknownFields, other._unknownFields);
  6951. }
  6952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6953. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6954. public override int GetHashCode() {
  6955. int hash = 1;
  6956. if (FromTensor.Length != 0) hash ^= FromTensor.GetHashCode();
  6957. if (ToTensor.Length != 0) hash ^= ToTensor.GetHashCode();
  6958. if (_unknownFields != null) {
  6959. hash ^= _unknownFields.GetHashCode();
  6960. }
  6961. return hash;
  6962. }
  6963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6964. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6965. public override string ToString() {
  6966. return pb::JsonFormatter.ToDiagnosticString(this);
  6967. }
  6968. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6969. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6970. public void WriteTo(pb::CodedOutputStream output) {
  6971. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6972. output.WriteRawMessage(this);
  6973. #else
  6974. if (FromTensor.Length != 0) {
  6975. output.WriteRawTag(10);
  6976. output.WriteString(FromTensor);
  6977. }
  6978. if (ToTensor.Length != 0) {
  6979. output.WriteRawTag(18);
  6980. output.WriteString(ToTensor);
  6981. }
  6982. if (_unknownFields != null) {
  6983. _unknownFields.WriteTo(output);
  6984. }
  6985. #endif
  6986. }
  6987. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  6988. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  6989. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  6990. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  6991. if (FromTensor.Length != 0) {
  6992. output.WriteRawTag(10);
  6993. output.WriteString(FromTensor);
  6994. }
  6995. if (ToTensor.Length != 0) {
  6996. output.WriteRawTag(18);
  6997. output.WriteString(ToTensor);
  6998. }
  6999. if (_unknownFields != null) {
  7000. _unknownFields.WriteTo(ref output);
  7001. }
  7002. }
  7003. #endif
  7004. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7005. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7006. public int CalculateSize() {
  7007. int size = 0;
  7008. if (FromTensor.Length != 0) {
  7009. size += 1 + pb::CodedOutputStream.ComputeStringSize(FromTensor);
  7010. }
  7011. if (ToTensor.Length != 0) {
  7012. size += 1 + pb::CodedOutputStream.ComputeStringSize(ToTensor);
  7013. }
  7014. if (_unknownFields != null) {
  7015. size += _unknownFields.CalculateSize();
  7016. }
  7017. return size;
  7018. }
  7019. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7020. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7021. public void MergeFrom(TensorConnection other) {
  7022. if (other == null) {
  7023. return;
  7024. }
  7025. if (other.FromTensor.Length != 0) {
  7026. FromTensor = other.FromTensor;
  7027. }
  7028. if (other.ToTensor.Length != 0) {
  7029. ToTensor = other.ToTensor;
  7030. }
  7031. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  7032. }
  7033. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7034. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7035. public void MergeFrom(pb::CodedInputStream input) {
  7036. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7037. input.ReadRawMessage(this);
  7038. #else
  7039. uint tag;
  7040. while ((tag = input.ReadTag()) != 0) {
  7041. switch(tag) {
  7042. default:
  7043. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  7044. break;
  7045. case 10: {
  7046. FromTensor = input.ReadString();
  7047. break;
  7048. }
  7049. case 18: {
  7050. ToTensor = input.ReadString();
  7051. break;
  7052. }
  7053. }
  7054. }
  7055. #endif
  7056. }
  7057. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7058. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7059. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7060. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  7061. uint tag;
  7062. while ((tag = input.ReadTag()) != 0) {
  7063. switch(tag) {
  7064. default:
  7065. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  7066. break;
  7067. case 10: {
  7068. FromTensor = input.ReadString();
  7069. break;
  7070. }
  7071. case 18: {
  7072. ToTensor = input.ReadString();
  7073. break;
  7074. }
  7075. }
  7076. }
  7077. }
  7078. #endif
  7079. }
  7080. /// <summary>
  7081. /// Defines a subgraph in another `GraphDef` as a set of feed points and nodes
  7082. /// to be fetched or executed.
  7083. ///
  7084. /// Compare with the arguments to `Session::Run()`.
  7085. /// </summary>
  7086. public sealed partial class CallableOptions : pb::IMessage<CallableOptions>
  7087. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7088. , pb::IBufferMessage
  7089. #endif
  7090. {
  7091. private static readonly pb::MessageParser<CallableOptions> _parser = new pb::MessageParser<CallableOptions>(() => new CallableOptions());
  7092. private pb::UnknownFieldSet _unknownFields;
  7093. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7094. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7095. public static pb::MessageParser<CallableOptions> Parser { get { return _parser; } }
  7096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7097. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7098. public static pbr::MessageDescriptor Descriptor {
  7099. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[10]; }
  7100. }
  7101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7102. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7103. pbr::MessageDescriptor pb::IMessage.Descriptor {
  7104. get { return Descriptor; }
  7105. }
  7106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7107. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7108. public CallableOptions() {
  7109. OnConstruction();
  7110. }
  7111. partial void OnConstruction();
  7112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7113. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7114. public CallableOptions(CallableOptions other) : this() {
  7115. feed_ = other.feed_.Clone();
  7116. fetch_ = other.fetch_.Clone();
  7117. target_ = other.target_.Clone();
  7118. runOptions_ = other.runOptions_ != null ? other.runOptions_.Clone() : null;
  7119. tensorConnection_ = other.tensorConnection_.Clone();
  7120. feedDevices_ = other.feedDevices_.Clone();
  7121. fetchDevices_ = other.fetchDevices_.Clone();
  7122. fetchSkipSync_ = other.fetchSkipSync_;
  7123. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  7124. }
  7125. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7126. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7127. public CallableOptions Clone() {
  7128. return new CallableOptions(this);
  7129. }
  7130. /// <summary>Field number for the "feed" field.</summary>
  7131. public const int FeedFieldNumber = 1;
  7132. private static readonly pb::FieldCodec<string> _repeated_feed_codec
  7133. = pb::FieldCodec.ForString(10);
  7134. private readonly pbc::RepeatedField<string> feed_ = new pbc::RepeatedField<string>();
  7135. /// <summary>
  7136. /// Tensors to be fed in the callable. Each feed is the name of a tensor.
  7137. /// </summary>
  7138. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7139. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7140. public pbc::RepeatedField<string> Feed {
  7141. get { return feed_; }
  7142. }
  7143. /// <summary>Field number for the "fetch" field.</summary>
  7144. public const int FetchFieldNumber = 2;
  7145. private static readonly pb::FieldCodec<string> _repeated_fetch_codec
  7146. = pb::FieldCodec.ForString(18);
  7147. private readonly pbc::RepeatedField<string> fetch_ = new pbc::RepeatedField<string>();
  7148. /// <summary>
  7149. /// Fetches. A list of tensor names. The caller of the callable expects a
  7150. /// tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
  7151. /// order of specified fetches does not change the execution order.
  7152. /// </summary>
  7153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7154. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7155. public pbc::RepeatedField<string> Fetch {
  7156. get { return fetch_; }
  7157. }
  7158. /// <summary>Field number for the "target" field.</summary>
  7159. public const int TargetFieldNumber = 3;
  7160. private static readonly pb::FieldCodec<string> _repeated_target_codec
  7161. = pb::FieldCodec.ForString(26);
  7162. private readonly pbc::RepeatedField<string> target_ = new pbc::RepeatedField<string>();
  7163. /// <summary>
  7164. /// Target Nodes. A list of node names. The named nodes will be run by the
  7165. /// callable but their outputs will not be returned.
  7166. /// </summary>
  7167. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7168. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7169. public pbc::RepeatedField<string> Target {
  7170. get { return target_; }
  7171. }
  7172. /// <summary>Field number for the "run_options" field.</summary>
  7173. public const int RunOptionsFieldNumber = 4;
  7174. private global::Tensorflow.RunOptions runOptions_;
  7175. /// <summary>
  7176. /// Options that will be applied to each run.
  7177. /// </summary>
  7178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7179. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7180. public global::Tensorflow.RunOptions RunOptions {
  7181. get { return runOptions_; }
  7182. set {
  7183. runOptions_ = value;
  7184. }
  7185. }
  7186. /// <summary>Field number for the "tensor_connection" field.</summary>
  7187. public const int TensorConnectionFieldNumber = 5;
  7188. private static readonly pb::FieldCodec<global::Tensorflow.TensorConnection> _repeated_tensorConnection_codec
  7189. = pb::FieldCodec.ForMessage(42, global::Tensorflow.TensorConnection.Parser);
  7190. private readonly pbc::RepeatedField<global::Tensorflow.TensorConnection> tensorConnection_ = new pbc::RepeatedField<global::Tensorflow.TensorConnection>();
  7191. /// <summary>
  7192. /// Tensors to be connected in the callable. Each TensorConnection denotes
  7193. /// a pair of tensors in the graph, between which an edge will be created
  7194. /// in the callable.
  7195. /// </summary>
  7196. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7197. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7198. public pbc::RepeatedField<global::Tensorflow.TensorConnection> TensorConnection {
  7199. get { return tensorConnection_; }
  7200. }
  7201. /// <summary>Field number for the "feed_devices" field.</summary>
  7202. public const int FeedDevicesFieldNumber = 6;
  7203. private static readonly pbc::MapField<string, string>.Codec _map_feedDevices_codec
  7204. = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 50);
  7205. private readonly pbc::MapField<string, string> feedDevices_ = new pbc::MapField<string, string>();
  7206. /// <summary>
  7207. /// The Tensor objects fed in the callable and fetched from the callable
  7208. /// are expected to be backed by host (CPU) memory by default.
  7209. ///
  7210. /// The options below allow changing that - feeding tensors backed by
  7211. /// device memory, or returning tensors that are backed by device memory.
  7212. ///
  7213. /// The maps below map the name of a feed/fetch tensor (which appears in
  7214. /// 'feed' or 'fetch' fields above), to the fully qualified name of the device
  7215. /// owning the memory backing the contents of the tensor.
  7216. ///
  7217. /// For example, creating a callable with the following options:
  7218. ///
  7219. /// CallableOptions {
  7220. /// feed: "a:0"
  7221. /// feed: "b:0"
  7222. ///
  7223. /// fetch: "x:0"
  7224. /// fetch: "y:0"
  7225. ///
  7226. /// feed_devices: {
  7227. /// "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
  7228. /// }
  7229. ///
  7230. /// fetch_devices: {
  7231. /// "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
  7232. /// }
  7233. /// }
  7234. ///
  7235. /// means that the Callable expects:
  7236. /// - The first argument ("a:0") is a Tensor backed by GPU memory.
  7237. /// - The second argument ("b:0") is a Tensor backed by host memory.
  7238. /// and of its return values:
  7239. /// - The first output ("x:0") will be backed by host memory.
  7240. /// - The second output ("y:0") will be backed by GPU memory.
  7241. ///
  7242. /// FEEDS:
  7243. /// It is the responsibility of the caller to ensure that the memory of the fed
  7244. /// tensors will be correctly initialized and synchronized before it is
  7245. /// accessed by operations executed during the call to Session::RunCallable().
  7246. ///
  7247. /// This is typically ensured by using the TensorFlow memory allocators
  7248. /// (Device::GetAllocator()) to create the Tensor to be fed.
  7249. ///
  7250. /// Alternatively, for CUDA-enabled GPU devices, this typically means that the
  7251. /// operation that produced the contents of the tensor has completed, i.e., the
  7252. /// CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
  7253. /// cuStreamSynchronize()).
  7254. /// </summary>
  7255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7256. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7257. public pbc::MapField<string, string> FeedDevices {
  7258. get { return feedDevices_; }
  7259. }
  7260. /// <summary>Field number for the "fetch_devices" field.</summary>
  7261. public const int FetchDevicesFieldNumber = 7;
  7262. private static readonly pbc::MapField<string, string>.Codec _map_fetchDevices_codec
  7263. = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 58);
  7264. private readonly pbc::MapField<string, string> fetchDevices_ = new pbc::MapField<string, string>();
  7265. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7266. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7267. public pbc::MapField<string, string> FetchDevices {
  7268. get { return fetchDevices_; }
  7269. }
  7270. /// <summary>Field number for the "fetch_skip_sync" field.</summary>
  7271. public const int FetchSkipSyncFieldNumber = 8;
  7272. private bool fetchSkipSync_;
  7273. /// <summary>
  7274. /// By default, RunCallable() will synchronize the GPU stream before returning
  7275. /// fetched tensors on a GPU device, to ensure that the values in those tensors
  7276. /// have been produced. This simplifies interacting with the tensors, but
  7277. /// potentially incurs a performance hit.
  7278. ///
  7279. /// If this options is set to true, the caller is responsible for ensuring
  7280. /// that the values in the fetched tensors have been produced before they are
  7281. /// used. The caller can do this by invoking `Device::Sync()` on the underlying
  7282. /// device(s), or by feeding the tensors back to the same Session using
  7283. /// `feed_devices` with the same corresponding device name.
  7284. /// </summary>
  7285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7286. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7287. public bool FetchSkipSync {
  7288. get { return fetchSkipSync_; }
  7289. set {
  7290. fetchSkipSync_ = value;
  7291. }
  7292. }
  7293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7294. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7295. public override bool Equals(object other) {
  7296. return Equals(other as CallableOptions);
  7297. }
  7298. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7299. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7300. public bool Equals(CallableOptions other) {
  7301. if (ReferenceEquals(other, null)) {
  7302. return false;
  7303. }
  7304. if (ReferenceEquals(other, this)) {
  7305. return true;
  7306. }
  7307. if(!feed_.Equals(other.feed_)) return false;
  7308. if(!fetch_.Equals(other.fetch_)) return false;
  7309. if(!target_.Equals(other.target_)) return false;
  7310. if (!object.Equals(RunOptions, other.RunOptions)) return false;
  7311. if(!tensorConnection_.Equals(other.tensorConnection_)) return false;
  7312. if (!FeedDevices.Equals(other.FeedDevices)) return false;
  7313. if (!FetchDevices.Equals(other.FetchDevices)) return false;
  7314. if (FetchSkipSync != other.FetchSkipSync) return false;
  7315. return Equals(_unknownFields, other._unknownFields);
  7316. }
  7317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7318. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7319. public override int GetHashCode() {
  7320. int hash = 1;
  7321. hash ^= feed_.GetHashCode();
  7322. hash ^= fetch_.GetHashCode();
  7323. hash ^= target_.GetHashCode();
  7324. if (runOptions_ != null) hash ^= RunOptions.GetHashCode();
  7325. hash ^= tensorConnection_.GetHashCode();
  7326. hash ^= FeedDevices.GetHashCode();
  7327. hash ^= FetchDevices.GetHashCode();
  7328. if (FetchSkipSync != false) hash ^= FetchSkipSync.GetHashCode();
  7329. if (_unknownFields != null) {
  7330. hash ^= _unknownFields.GetHashCode();
  7331. }
  7332. return hash;
  7333. }
  7334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7335. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7336. public override string ToString() {
  7337. return pb::JsonFormatter.ToDiagnosticString(this);
  7338. }
  7339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7340. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7341. public void WriteTo(pb::CodedOutputStream output) {
  7342. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7343. output.WriteRawMessage(this);
  7344. #else
  7345. feed_.WriteTo(output, _repeated_feed_codec);
  7346. fetch_.WriteTo(output, _repeated_fetch_codec);
  7347. target_.WriteTo(output, _repeated_target_codec);
  7348. if (runOptions_ != null) {
  7349. output.WriteRawTag(34);
  7350. output.WriteMessage(RunOptions);
  7351. }
  7352. tensorConnection_.WriteTo(output, _repeated_tensorConnection_codec);
  7353. feedDevices_.WriteTo(output, _map_feedDevices_codec);
  7354. fetchDevices_.WriteTo(output, _map_fetchDevices_codec);
  7355. if (FetchSkipSync != false) {
  7356. output.WriteRawTag(64);
  7357. output.WriteBool(FetchSkipSync);
  7358. }
  7359. if (_unknownFields != null) {
  7360. _unknownFields.WriteTo(output);
  7361. }
  7362. #endif
  7363. }
  7364. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7366. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7367. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  7368. feed_.WriteTo(ref output, _repeated_feed_codec);
  7369. fetch_.WriteTo(ref output, _repeated_fetch_codec);
  7370. target_.WriteTo(ref output, _repeated_target_codec);
  7371. if (runOptions_ != null) {
  7372. output.WriteRawTag(34);
  7373. output.WriteMessage(RunOptions);
  7374. }
  7375. tensorConnection_.WriteTo(ref output, _repeated_tensorConnection_codec);
  7376. feedDevices_.WriteTo(ref output, _map_feedDevices_codec);
  7377. fetchDevices_.WriteTo(ref output, _map_fetchDevices_codec);
  7378. if (FetchSkipSync != false) {
  7379. output.WriteRawTag(64);
  7380. output.WriteBool(FetchSkipSync);
  7381. }
  7382. if (_unknownFields != null) {
  7383. _unknownFields.WriteTo(ref output);
  7384. }
  7385. }
  7386. #endif
  7387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7388. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7389. public int CalculateSize() {
  7390. int size = 0;
  7391. size += feed_.CalculateSize(_repeated_feed_codec);
  7392. size += fetch_.CalculateSize(_repeated_fetch_codec);
  7393. size += target_.CalculateSize(_repeated_target_codec);
  7394. if (runOptions_ != null) {
  7395. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RunOptions);
  7396. }
  7397. size += tensorConnection_.CalculateSize(_repeated_tensorConnection_codec);
  7398. size += feedDevices_.CalculateSize(_map_feedDevices_codec);
  7399. size += fetchDevices_.CalculateSize(_map_fetchDevices_codec);
  7400. if (FetchSkipSync != false) {
  7401. size += 1 + 1;
  7402. }
  7403. if (_unknownFields != null) {
  7404. size += _unknownFields.CalculateSize();
  7405. }
  7406. return size;
  7407. }
  7408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7409. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7410. public void MergeFrom(CallableOptions other) {
  7411. if (other == null) {
  7412. return;
  7413. }
  7414. feed_.Add(other.feed_);
  7415. fetch_.Add(other.fetch_);
  7416. target_.Add(other.target_);
  7417. if (other.runOptions_ != null) {
  7418. if (runOptions_ == null) {
  7419. RunOptions = new global::Tensorflow.RunOptions();
  7420. }
  7421. RunOptions.MergeFrom(other.RunOptions);
  7422. }
  7423. tensorConnection_.Add(other.tensorConnection_);
  7424. feedDevices_.Add(other.feedDevices_);
  7425. fetchDevices_.Add(other.fetchDevices_);
  7426. if (other.FetchSkipSync != false) {
  7427. FetchSkipSync = other.FetchSkipSync;
  7428. }
  7429. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  7430. }
  7431. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7432. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7433. public void MergeFrom(pb::CodedInputStream input) {
  7434. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7435. input.ReadRawMessage(this);
  7436. #else
  7437. uint tag;
  7438. while ((tag = input.ReadTag()) != 0) {
  7439. switch(tag) {
  7440. default:
  7441. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  7442. break;
  7443. case 10: {
  7444. feed_.AddEntriesFrom(input, _repeated_feed_codec);
  7445. break;
  7446. }
  7447. case 18: {
  7448. fetch_.AddEntriesFrom(input, _repeated_fetch_codec);
  7449. break;
  7450. }
  7451. case 26: {
  7452. target_.AddEntriesFrom(input, _repeated_target_codec);
  7453. break;
  7454. }
  7455. case 34: {
  7456. if (runOptions_ == null) {
  7457. RunOptions = new global::Tensorflow.RunOptions();
  7458. }
  7459. input.ReadMessage(RunOptions);
  7460. break;
  7461. }
  7462. case 42: {
  7463. tensorConnection_.AddEntriesFrom(input, _repeated_tensorConnection_codec);
  7464. break;
  7465. }
  7466. case 50: {
  7467. feedDevices_.AddEntriesFrom(input, _map_feedDevices_codec);
  7468. break;
  7469. }
  7470. case 58: {
  7471. fetchDevices_.AddEntriesFrom(input, _map_fetchDevices_codec);
  7472. break;
  7473. }
  7474. case 64: {
  7475. FetchSkipSync = input.ReadBool();
  7476. break;
  7477. }
  7478. }
  7479. }
  7480. #endif
  7481. }
  7482. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  7483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  7484. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  7485. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  7486. uint tag;
  7487. while ((tag = input.ReadTag()) != 0) {
  7488. switch(tag) {
  7489. default:
  7490. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  7491. break;
  7492. case 10: {
  7493. feed_.AddEntriesFrom(ref input, _repeated_feed_codec);
  7494. break;
  7495. }
  7496. case 18: {
  7497. fetch_.AddEntriesFrom(ref input, _repeated_fetch_codec);
  7498. break;
  7499. }
  7500. case 26: {
  7501. target_.AddEntriesFrom(ref input, _repeated_target_codec);
  7502. break;
  7503. }
  7504. case 34: {
  7505. if (runOptions_ == null) {
  7506. RunOptions = new global::Tensorflow.RunOptions();
  7507. }
  7508. input.ReadMessage(RunOptions);
  7509. break;
  7510. }
  7511. case 42: {
  7512. tensorConnection_.AddEntriesFrom(ref input, _repeated_tensorConnection_codec);
  7513. break;
  7514. }
  7515. case 50: {
  7516. feedDevices_.AddEntriesFrom(ref input, _map_feedDevices_codec);
  7517. break;
  7518. }
  7519. case 58: {
  7520. fetchDevices_.AddEntriesFrom(ref input, _map_fetchDevices_codec);
  7521. break;
  7522. }
  7523. case 64: {
  7524. FetchSkipSync = input.ReadBool();
  7525. break;
  7526. }
  7527. }
  7528. }
  7529. }
  7530. #endif
  7531. }
  7532. #endregion
  7533. }
  7534. #endregion Designer generated code