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 198 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837
  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
  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. "dGVuc29yZmxvdy9jb3JlL3Byb3RvYnVmL2NsdXN0ZXIucHJvdG8aJHRlbnNv",
  28. "cmZsb3cvY29yZS9wcm90b2J1Zi9kZWJ1Zy5wcm90bxoudGVuc29yZmxvdy9j",
  29. "b3JlL3Byb3RvYnVmL3Jld3JpdGVyX2NvbmZpZy5wcm90byK3BQoKR1BVT3B0",
  30. "aW9ucxInCh9wZXJfcHJvY2Vzc19ncHVfbWVtb3J5X2ZyYWN0aW9uGAEgASgB",
  31. "EhQKDGFsbG93X2dyb3d0aBgEIAEoCBIWCg5hbGxvY2F0b3JfdHlwZRgCIAEo",
  32. "CRIfChdkZWZlcnJlZF9kZWxldGlvbl9ieXRlcxgDIAEoAxIbChN2aXNpYmxl",
  33. "X2RldmljZV9saXN0GAUgASgJEiIKGnBvbGxpbmdfYWN0aXZlX2RlbGF5X3Vz",
  34. "ZWNzGAYgASgFEiQKHHBvbGxpbmdfaW5hY3RpdmVfZGVsYXlfbXNlY3MYByAB",
  35. "KAUSHAoUZm9yY2VfZ3B1X2NvbXBhdGlibGUYCCABKAgSOQoMZXhwZXJpbWVu",
  36. "dGFsGAkgASgLMiMudGVuc29yZmxvdy5HUFVPcHRpb25zLkV4cGVyaW1lbnRh",
  37. "bBrwAgoMRXhwZXJpbWVudGFsEksKD3ZpcnR1YWxfZGV2aWNlcxgBIAMoCzIy",
  38. "LnRlbnNvcmZsb3cuR1BVT3B0aW9ucy5FeHBlcmltZW50YWwuVmlydHVhbERl",
  39. "dmljZXMSGgoSdXNlX3VuaWZpZWRfbWVtb3J5GAIgASgIEiMKG251bV9kZXZf",
  40. "dG9fZGV2X2NvcHlfc3RyZWFtcxgDIAEoBRIdChVjb2xsZWN0aXZlX3Jpbmdf",
  41. "b3JkZXIYBCABKAkSHQoVdGltZXN0YW1wZWRfYWxsb2NhdG9yGAUgASgIEiMK",
  42. "G2tlcm5lbF90cmFja2VyX21heF9pbnRlcnZhbBgHIAEoBRIgChhrZXJuZWxf",
  43. "dHJhY2tlcl9tYXhfYnl0ZXMYCCABKAUSIgoaa2VybmVsX3RyYWNrZXJfbWF4",
  44. "X3BlbmRpbmcYCSABKAUaKQoOVmlydHVhbERldmljZXMSFwoPbWVtb3J5X2xp",
  45. "bWl0X21iGAEgAygCIoUDChBPcHRpbWl6ZXJPcHRpb25zEisKI2RvX2NvbW1v",
  46. "bl9zdWJleHByZXNzaW9uX2VsaW1pbmF0aW9uGAEgASgIEhsKE2RvX2NvbnN0",
  47. "YW50X2ZvbGRpbmcYAiABKAgSJAocbWF4X2ZvbGRlZF9jb25zdGFudF9pbl9i",
  48. "eXRlcxgGIAEoAxIcChRkb19mdW5jdGlvbl9pbmxpbmluZxgEIAEoCBI1Cglv",
  49. "cHRfbGV2ZWwYAyABKA4yIi50ZW5zb3JmbG93Lk9wdGltaXplck9wdGlvbnMu",
  50. "TGV2ZWwSRQoQZ2xvYmFsX2ppdF9sZXZlbBgFIAEoDjIrLnRlbnNvcmZsb3cu",
  51. "T3B0aW1pemVyT3B0aW9ucy5HbG9iYWxKaXRMZXZlbCIgCgVMZXZlbBIGCgJM",
  52. "MRAAEg8KAkwwEP///////////wEiQwoOR2xvYmFsSml0TGV2ZWwSCwoHREVG",
  53. "QVVMVBAAEhAKA09GRhD///////////8BEggKBE9OXzEQARIICgRPTl8yEAIi",
  54. "7gIKDEdyYXBoT3B0aW9ucxIeChZlbmFibGVfcmVjdl9zY2hlZHVsaW5nGAIg",
  55. "ASgIEjcKEW9wdGltaXplcl9vcHRpb25zGAMgASgLMhwudGVuc29yZmxvdy5P",
  56. "cHRpbWl6ZXJPcHRpb25zEhgKEGJ1aWxkX2Nvc3RfbW9kZWwYBCABKAMSHgoW",
  57. "YnVpbGRfY29zdF9tb2RlbF9hZnRlchgJIAEoAxIUCgxpbmZlcl9zaGFwZXMY",
  58. "BSABKAgSGgoScGxhY2VfcHJ1bmVkX2dyYXBoGAYgASgIEiAKGGVuYWJsZV9i",
  59. "ZmxvYXQxNl9zZW5kcmVjdhgHIAEoCBIVCg10aW1lbGluZV9zdGVwGAggASgF",
  60. "EjMKD3Jld3JpdGVfb3B0aW9ucxgKIAEoCzIaLnRlbnNvcmZsb3cuUmV3cml0",
  61. "ZXJDb25maWdKBAgBEAJSJXNraXBfY29tbW9uX3N1YmV4cHJlc3Npb25fZWxp",
  62. "bWluYXRpb24iQQoVVGhyZWFkUG9vbE9wdGlvblByb3RvEhMKC251bV90aHJl",
  63. "YWRzGAEgASgFEhMKC2dsb2JhbF9uYW1lGAIgASgJImwKClJQQ09wdGlvbnMS",
  64. "JAocdXNlX3JwY19mb3JfaW5wcm9jZXNzX21hc3RlchgBIAEoCBIdChVjb21w",
  65. "cmVzc2lvbl9hbGdvcml0aG0YAiABKAkSGQoRY29tcHJlc3Npb25fbGV2ZWwY",
  66. "AyABKAUisggKC0NvbmZpZ1Byb3RvEj4KDGRldmljZV9jb3VudBgBIAMoCzIo",
  67. "LnRlbnNvcmZsb3cuQ29uZmlnUHJvdG8uRGV2aWNlQ291bnRFbnRyeRIkChxp",
  68. "bnRyYV9vcF9wYXJhbGxlbGlzbV90aHJlYWRzGAIgASgFEiQKHGludGVyX29w",
  69. "X3BhcmFsbGVsaXNtX3RocmVhZHMYBSABKAUSHwoXdXNlX3Blcl9zZXNzaW9u",
  70. "X3RocmVhZHMYCSABKAgSRwocc2Vzc2lvbl9pbnRlcl9vcF90aHJlYWRfcG9v",
  71. "bBgMIAMoCzIhLnRlbnNvcmZsb3cuVGhyZWFkUG9vbE9wdGlvblByb3RvEhgK",
  72. "EHBsYWNlbWVudF9wZXJpb2QYAyABKAUSFgoOZGV2aWNlX2ZpbHRlcnMYBCAD",
  73. "KAkSKwoLZ3B1X29wdGlvbnMYBiABKAsyFi50ZW5zb3JmbG93LkdQVU9wdGlv",
  74. "bnMSHAoUYWxsb3dfc29mdF9wbGFjZW1lbnQYByABKAgSHAoUbG9nX2Rldmlj",
  75. "ZV9wbGFjZW1lbnQYCCABKAgSLwoNZ3JhcGhfb3B0aW9ucxgKIAEoCzIYLnRl",
  76. "bnNvcmZsb3cuR3JhcGhPcHRpb25zEh8KF29wZXJhdGlvbl90aW1lb3V0X2lu",
  77. "X21zGAsgASgDEisKC3JwY19vcHRpb25zGA0gASgLMhYudGVuc29yZmxvdy5S",
  78. "UENPcHRpb25zEisKC2NsdXN0ZXJfZGVmGA4gASgLMhYudGVuc29yZmxvdy5D",
  79. "bHVzdGVyRGVmEh0KFWlzb2xhdGVfc2Vzc2lvbl9zdGF0ZRgPIAEoCBI6Cgxl",
  80. "eHBlcmltZW50YWwYECABKAsyJC50ZW5zb3JmbG93LkNvbmZpZ1Byb3RvLkV4",
  81. "cGVyaW1lbnRhbBoyChBEZXZpY2VDb3VudEVudHJ5EgsKA2tleRgBIAEoCRIN",
  82. "CgV2YWx1ZRgCIAEoBToCOAEa1gIKDEV4cGVyaW1lbnRhbBIfChdjb2xsZWN0",
  83. "aXZlX2dyb3VwX2xlYWRlchgBIAEoCRIVCg1leGVjdXRvcl90eXBlGAMgASgJ",
  84. "EhoKEnJlY3ZfYnVmX21heF9jaHVuaxgEIAEoBRIZChF1c2VfbnVtYV9hZmZp",
  85. "bml0eRgFIAEoCBI1Ci1jb2xsZWN0aXZlX2RldGVybWluaXN0aWNfc2VxdWVu",
  86. "dGlhbF9leGVjdXRpb24YBiABKAgSFwoPY29sbGVjdGl2ZV9uY2NsGAcgASgI",
  87. "EjYKLnNoYXJlX3Nlc3Npb25fc3RhdGVfaW5fY2x1c3RlcnNwZWNfcHJvcGFn",
  88. "YXRpb24YCCABKAgSHwoXZGlzYWJsZV90aHJlYWRfc3Bpbm5pbmcYCSABKAgS",
  89. "KAogc2hhcmVfY2x1c3Rlcl9kZXZpY2VzX2luX3Nlc3Npb24YCiABKAhKBAgC",
  90. "EAMi2AMKClJ1bk9wdGlvbnMSNgoLdHJhY2VfbGV2ZWwYASABKA4yIS50ZW5z",
  91. "b3JmbG93LlJ1bk9wdGlvbnMuVHJhY2VMZXZlbBIVCg10aW1lb3V0X2luX21z",
  92. "GAIgASgDEhwKFGludGVyX29wX3RocmVhZF9wb29sGAMgASgFEh8KF291dHB1",
  93. "dF9wYXJ0aXRpb25fZ3JhcGhzGAUgASgIEi8KDWRlYnVnX29wdGlvbnMYBiAB",
  94. "KAsyGC50ZW5zb3JmbG93LkRlYnVnT3B0aW9ucxIqCiJyZXBvcnRfdGVuc29y",
  95. "X2FsbG9jYXRpb25zX3Vwb25fb29tGAcgASgIEjkKDGV4cGVyaW1lbnRhbBgI",
  96. "IAEoCzIjLnRlbnNvcmZsb3cuUnVuT3B0aW9ucy5FeHBlcmltZW50YWwaSgoM",
  97. "RXhwZXJpbWVudGFsEhwKFGNvbGxlY3RpdmVfZ3JhcGhfa2V5GAEgASgDEhwK",
  98. "FHVzZV9ydW5faGFuZGxlcl9wb29sGAIgASgIIlIKClRyYWNlTGV2ZWwSDAoI",
  99. "Tk9fVFJBQ0UQABISCg5TT0ZUV0FSRV9UUkFDRRABEhIKDkhBUkRXQVJFX1RS",
  100. "QUNFEAISDgoKRlVMTF9UUkFDRRADSgQIBBAFIocDCgtSdW5NZXRhZGF0YRIp",
  101. "CgpzdGVwX3N0YXRzGAEgASgLMhUudGVuc29yZmxvdy5TdGVwU3RhdHMSLAoK",
  102. "Y29zdF9ncmFwaBgCIAEoCzIYLnRlbnNvcmZsb3cuQ29zdEdyYXBoRGVmEi4K",
  103. "EHBhcnRpdGlvbl9ncmFwaHMYAyADKAsyFC50ZW5zb3JmbG93LkdyYXBoRGVm",
  104. "Ej8KD2Z1bmN0aW9uX2dyYXBocxgEIAMoCzImLnRlbnNvcmZsb3cuUnVuTWV0",
  105. "YWRhdGEuRnVuY3Rpb25HcmFwaHMarQEKDkZ1bmN0aW9uR3JhcGhzEi4KEHBh",
  106. "cnRpdGlvbl9ncmFwaHMYASADKAsyFC50ZW5zb3JmbG93LkdyYXBoRGVmEjQK",
  107. "FnByZV9vcHRpbWl6YXRpb25fZ3JhcGgYAiABKAsyFC50ZW5zb3JmbG93Lkdy",
  108. "YXBoRGVmEjUKF3Bvc3Rfb3B0aW1pemF0aW9uX2dyYXBoGAMgASgLMhQudGVu",
  109. "c29yZmxvdy5HcmFwaERlZiI6ChBUZW5zb3JDb25uZWN0aW9uEhMKC2Zyb21f",
  110. "dGVuc29yGAEgASgJEhEKCXRvX3RlbnNvchgCIAEoCSKwAwoPQ2FsbGFibGVP",
  111. "cHRpb25zEgwKBGZlZWQYASADKAkSDQoFZmV0Y2gYAiADKAkSDgoGdGFyZ2V0",
  112. "GAMgAygJEisKC3J1bl9vcHRpb25zGAQgASgLMhYudGVuc29yZmxvdy5SdW5P",
  113. "cHRpb25zEjcKEXRlbnNvcl9jb25uZWN0aW9uGAUgAygLMhwudGVuc29yZmxv",
  114. "dy5UZW5zb3JDb25uZWN0aW9uEkIKDGZlZWRfZGV2aWNlcxgGIAMoCzIsLnRl",
  115. "bnNvcmZsb3cuQ2FsbGFibGVPcHRpb25zLkZlZWREZXZpY2VzRW50cnkSRAoN",
  116. "ZmV0Y2hfZGV2aWNlcxgHIAMoCzItLnRlbnNvcmZsb3cuQ2FsbGFibGVPcHRp",
  117. "b25zLkZldGNoRGV2aWNlc0VudHJ5EhcKD2ZldGNoX3NraXBfc3luYxgIIAEo",
  118. "CBoyChBGZWVkRGV2aWNlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgC",
  119. "IAEoCToCOAEaMwoRRmV0Y2hEZXZpY2VzRW50cnkSCwoDa2V5GAEgASgJEg0K",
  120. "BXZhbHVlGAIgASgJOgI4AUItChhvcmcudGVuc29yZmxvdy5mcmFtZXdvcmtC",
  121. "DENvbmZpZ1Byb3Rvc1AB+AEBYgZwcm90bzM="));
  122. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  123. new pbr::FileDescriptor[] { global::Tensorflow.CostGraphReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.StepStatsReflection.Descriptor, global::Tensorflow.ClusterReflection.Descriptor, global::Tensorflow.DebugReflection.Descriptor, global::Tensorflow.RewriterConfigReflection.Descriptor, },
  124. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  125. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, 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" }, 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" }, null, null, null)})}),
  126. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OptimizerOptions), global::Tensorflow.OptimizerOptions.Parser, new[]{ "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel" }, null, new[]{ typeof(global::Tensorflow.OptimizerOptions.Types.Level), typeof(global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) }, null),
  127. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphOptions), global::Tensorflow.GraphOptions.Parser, new[]{ "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, null, null, null),
  128. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ThreadPoolOptionProto), global::Tensorflow.ThreadPoolOptionProto.Parser, new[]{ "NumThreads", "GlobalName" }, null, null, null),
  129. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel" }, null, null, null),
  130. 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", "Experimental" }, 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" }, null, null, null)}),
  131. 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) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental), global::Tensorflow.RunOptions.Types.Experimental.Parser, new[]{ "CollectiveGraphKey", "UseRunHandlerPool" }, null, null, null)}),
  132. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata), global::Tensorflow.RunMetadata.Parser, new[]{ "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs" }, 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)}),
  133. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorConnection), global::Tensorflow.TensorConnection.Parser, new[]{ "FromTensor", "ToTensor" }, null, null, null),
  134. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CallableOptions), global::Tensorflow.CallableOptions.Parser, new[]{ "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, })
  135. }));
  136. }
  137. #endregion
  138. }
  139. #region Messages
  140. public sealed partial class GPUOptions : pb::IMessage<GPUOptions> {
  141. private static readonly pb::MessageParser<GPUOptions> _parser = new pb::MessageParser<GPUOptions>(() => new GPUOptions());
  142. private pb::UnknownFieldSet _unknownFields;
  143. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  144. public static pb::MessageParser<GPUOptions> Parser { get { return _parser; } }
  145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  146. public static pbr::MessageDescriptor Descriptor {
  147. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[0]; }
  148. }
  149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  150. pbr::MessageDescriptor pb::IMessage.Descriptor {
  151. get { return Descriptor; }
  152. }
  153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  154. public GPUOptions() {
  155. OnConstruction();
  156. }
  157. partial void OnConstruction();
  158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  159. public GPUOptions(GPUOptions other) : this() {
  160. perProcessGpuMemoryFraction_ = other.perProcessGpuMemoryFraction_;
  161. allowGrowth_ = other.allowGrowth_;
  162. allocatorType_ = other.allocatorType_;
  163. deferredDeletionBytes_ = other.deferredDeletionBytes_;
  164. visibleDeviceList_ = other.visibleDeviceList_;
  165. pollingActiveDelayUsecs_ = other.pollingActiveDelayUsecs_;
  166. pollingInactiveDelayMsecs_ = other.pollingInactiveDelayMsecs_;
  167. forceGpuCompatible_ = other.forceGpuCompatible_;
  168. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  169. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  170. }
  171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  172. public GPUOptions Clone() {
  173. return new GPUOptions(this);
  174. }
  175. /// <summary>Field number for the "per_process_gpu_memory_fraction" field.</summary>
  176. public const int PerProcessGpuMemoryFractionFieldNumber = 1;
  177. private double perProcessGpuMemoryFraction_;
  178. /// <summary>
  179. /// Fraction of the available GPU memory to allocate for each process.
  180. /// 1 means to allocate all of the GPU memory, 0.5 means the process
  181. /// allocates up to ~50% of the available GPU memory.
  182. ///
  183. /// GPU memory is pre-allocated unless the allow_growth option is enabled.
  184. ///
  185. /// If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
  186. /// the amount of memory available on the GPU device by using host memory as a
  187. /// swap space. Accessing memory not available on the device will be
  188. /// significantly slower as that would require memory transfer between the host
  189. /// and the device. Options to reduce the memory requirement should be
  190. /// considered before enabling this option as this may come with a negative
  191. /// performance impact. Oversubscription using the unified memory requires
  192. /// Pascal class or newer GPUs and it is currently only supported on the Linux
  193. /// operating system. See
  194. /// https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements
  195. /// for the detailed requirements.
  196. /// </summary>
  197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  198. public double PerProcessGpuMemoryFraction {
  199. get { return perProcessGpuMemoryFraction_; }
  200. set {
  201. perProcessGpuMemoryFraction_ = value;
  202. }
  203. }
  204. /// <summary>Field number for the "allow_growth" field.</summary>
  205. public const int AllowGrowthFieldNumber = 4;
  206. private bool allowGrowth_;
  207. /// <summary>
  208. /// If true, the allocator does not pre-allocate the entire specified
  209. /// GPU memory region, instead starting small and growing as needed.
  210. /// </summary>
  211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  212. public bool AllowGrowth {
  213. get { return allowGrowth_; }
  214. set {
  215. allowGrowth_ = value;
  216. }
  217. }
  218. /// <summary>Field number for the "allocator_type" field.</summary>
  219. public const int AllocatorTypeFieldNumber = 2;
  220. private string allocatorType_ = "";
  221. /// <summary>
  222. /// The type of GPU allocation strategy to use.
  223. ///
  224. /// Allowed values:
  225. /// "": The empty string (default) uses a system-chosen default
  226. /// which may change over time.
  227. ///
  228. /// "BFC": A "Best-fit with coalescing" algorithm, simplified from a
  229. /// version of dlmalloc.
  230. /// </summary>
  231. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  232. public string AllocatorType {
  233. get { return allocatorType_; }
  234. set {
  235. allocatorType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  236. }
  237. }
  238. /// <summary>Field number for the "deferred_deletion_bytes" field.</summary>
  239. public const int DeferredDeletionBytesFieldNumber = 3;
  240. private long deferredDeletionBytes_;
  241. /// <summary>
  242. /// Delay deletion of up to this many bytes to reduce the number of
  243. /// interactions with gpu driver code. If 0, the system chooses
  244. /// a reasonable default (several MBs).
  245. /// </summary>
  246. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  247. public long DeferredDeletionBytes {
  248. get { return deferredDeletionBytes_; }
  249. set {
  250. deferredDeletionBytes_ = value;
  251. }
  252. }
  253. /// <summary>Field number for the "visible_device_list" field.</summary>
  254. public const int VisibleDeviceListFieldNumber = 5;
  255. private string visibleDeviceList_ = "";
  256. /// <summary>
  257. /// A comma-separated list of GPU ids that determines the 'visible'
  258. /// to 'virtual' mapping of GPU devices. For example, if TensorFlow
  259. /// can see 8 GPU devices in the process, and one wanted to map
  260. /// visible GPU devices 5 and 3 as "/device:GPU:0", and "/device:GPU:1",
  261. /// then one would specify this field as "5,3". This field is similar in
  262. /// spirit to the CUDA_VISIBLE_DEVICES environment variable, except
  263. /// it applies to the visible GPU devices in the process.
  264. ///
  265. /// NOTE:
  266. /// 1. The GPU driver provides the process with the visible GPUs
  267. /// in an order which is not guaranteed to have any correlation to
  268. /// the *physical* GPU id in the machine. This field is used for
  269. /// remapping "visible" to "virtual", which means this operates only
  270. /// after the process starts. Users are required to use vendor
  271. /// specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
  272. /// physical to visible device mapping prior to invoking TensorFlow.
  273. /// 2. In the code, the ids in this list are also called "platform GPU id"s,
  274. /// and the 'virtual' ids of GPU devices (i.e. the ids in the device
  275. /// name "/device:GPU:&lt;id>") are also called "TF GPU id"s. Please
  276. /// refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
  277. /// for more information.
  278. /// </summary>
  279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  280. public string VisibleDeviceList {
  281. get { return visibleDeviceList_; }
  282. set {
  283. visibleDeviceList_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  284. }
  285. }
  286. /// <summary>Field number for the "polling_active_delay_usecs" field.</summary>
  287. public const int PollingActiveDelayUsecsFieldNumber = 6;
  288. private int pollingActiveDelayUsecs_;
  289. /// <summary>
  290. /// In the event polling loop sleep this many microseconds between
  291. /// PollEvents calls, when the queue is not empty. If value is not
  292. /// set or set to 0, gets set to a non-zero default.
  293. /// </summary>
  294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  295. public int PollingActiveDelayUsecs {
  296. get { return pollingActiveDelayUsecs_; }
  297. set {
  298. pollingActiveDelayUsecs_ = value;
  299. }
  300. }
  301. /// <summary>Field number for the "polling_inactive_delay_msecs" field.</summary>
  302. public const int PollingInactiveDelayMsecsFieldNumber = 7;
  303. private int pollingInactiveDelayMsecs_;
  304. /// <summary>
  305. /// This field is deprecated and ignored.
  306. /// </summary>
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. public int PollingInactiveDelayMsecs {
  309. get { return pollingInactiveDelayMsecs_; }
  310. set {
  311. pollingInactiveDelayMsecs_ = value;
  312. }
  313. }
  314. /// <summary>Field number for the "force_gpu_compatible" field.</summary>
  315. public const int ForceGpuCompatibleFieldNumber = 8;
  316. private bool forceGpuCompatible_;
  317. /// <summary>
  318. /// Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
  319. /// enabling this option forces all CPU tensors to be allocated with Cuda
  320. /// pinned memory. Normally, TensorFlow will infer which tensors should be
  321. /// allocated as the pinned memory. But in case where the inference is
  322. /// incomplete, this option can significantly speed up the cross-device memory
  323. /// copy performance as long as it fits the memory.
  324. /// Note that this option is not something that should be
  325. /// enabled by default for unknown or very large models, since all Cuda pinned
  326. /// memory is unpageable, having too much pinned memory might negatively impact
  327. /// the overall host system performance.
  328. /// </summary>
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  330. public bool ForceGpuCompatible {
  331. get { return forceGpuCompatible_; }
  332. set {
  333. forceGpuCompatible_ = value;
  334. }
  335. }
  336. /// <summary>Field number for the "experimental" field.</summary>
  337. public const int ExperimentalFieldNumber = 9;
  338. private global::Tensorflow.GPUOptions.Types.Experimental experimental_;
  339. /// <summary>
  340. /// Everything inside experimental is subject to change and is not subject
  341. /// to API stability guarantees in
  342. /// https://www.tensorflow.org/guide/version_compat.
  343. /// </summary>
  344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  345. public global::Tensorflow.GPUOptions.Types.Experimental Experimental {
  346. get { return experimental_; }
  347. set {
  348. experimental_ = value;
  349. }
  350. }
  351. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  352. public override bool Equals(object other) {
  353. return Equals(other as GPUOptions);
  354. }
  355. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  356. public bool Equals(GPUOptions other) {
  357. if (ReferenceEquals(other, null)) {
  358. return false;
  359. }
  360. if (ReferenceEquals(other, this)) {
  361. return true;
  362. }
  363. if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(PerProcessGpuMemoryFraction, other.PerProcessGpuMemoryFraction)) return false;
  364. if (AllowGrowth != other.AllowGrowth) return false;
  365. if (AllocatorType != other.AllocatorType) return false;
  366. if (DeferredDeletionBytes != other.DeferredDeletionBytes) return false;
  367. if (VisibleDeviceList != other.VisibleDeviceList) return false;
  368. if (PollingActiveDelayUsecs != other.PollingActiveDelayUsecs) return false;
  369. if (PollingInactiveDelayMsecs != other.PollingInactiveDelayMsecs) return false;
  370. if (ForceGpuCompatible != other.ForceGpuCompatible) return false;
  371. if (!object.Equals(Experimental, other.Experimental)) return false;
  372. return Equals(_unknownFields, other._unknownFields);
  373. }
  374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  375. public override int GetHashCode() {
  376. int hash = 1;
  377. if (PerProcessGpuMemoryFraction != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PerProcessGpuMemoryFraction);
  378. if (AllowGrowth != false) hash ^= AllowGrowth.GetHashCode();
  379. if (AllocatorType.Length != 0) hash ^= AllocatorType.GetHashCode();
  380. if (DeferredDeletionBytes != 0L) hash ^= DeferredDeletionBytes.GetHashCode();
  381. if (VisibleDeviceList.Length != 0) hash ^= VisibleDeviceList.GetHashCode();
  382. if (PollingActiveDelayUsecs != 0) hash ^= PollingActiveDelayUsecs.GetHashCode();
  383. if (PollingInactiveDelayMsecs != 0) hash ^= PollingInactiveDelayMsecs.GetHashCode();
  384. if (ForceGpuCompatible != false) hash ^= ForceGpuCompatible.GetHashCode();
  385. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  386. if (_unknownFields != null) {
  387. hash ^= _unknownFields.GetHashCode();
  388. }
  389. return hash;
  390. }
  391. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  392. public override string ToString() {
  393. return pb::JsonFormatter.ToDiagnosticString(this);
  394. }
  395. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  396. public void WriteTo(pb::CodedOutputStream output) {
  397. if (PerProcessGpuMemoryFraction != 0D) {
  398. output.WriteRawTag(9);
  399. output.WriteDouble(PerProcessGpuMemoryFraction);
  400. }
  401. if (AllocatorType.Length != 0) {
  402. output.WriteRawTag(18);
  403. output.WriteString(AllocatorType);
  404. }
  405. if (DeferredDeletionBytes != 0L) {
  406. output.WriteRawTag(24);
  407. output.WriteInt64(DeferredDeletionBytes);
  408. }
  409. if (AllowGrowth != false) {
  410. output.WriteRawTag(32);
  411. output.WriteBool(AllowGrowth);
  412. }
  413. if (VisibleDeviceList.Length != 0) {
  414. output.WriteRawTag(42);
  415. output.WriteString(VisibleDeviceList);
  416. }
  417. if (PollingActiveDelayUsecs != 0) {
  418. output.WriteRawTag(48);
  419. output.WriteInt32(PollingActiveDelayUsecs);
  420. }
  421. if (PollingInactiveDelayMsecs != 0) {
  422. output.WriteRawTag(56);
  423. output.WriteInt32(PollingInactiveDelayMsecs);
  424. }
  425. if (ForceGpuCompatible != false) {
  426. output.WriteRawTag(64);
  427. output.WriteBool(ForceGpuCompatible);
  428. }
  429. if (experimental_ != null) {
  430. output.WriteRawTag(74);
  431. output.WriteMessage(Experimental);
  432. }
  433. if (_unknownFields != null) {
  434. _unknownFields.WriteTo(output);
  435. }
  436. }
  437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  438. public int CalculateSize() {
  439. int size = 0;
  440. if (PerProcessGpuMemoryFraction != 0D) {
  441. size += 1 + 8;
  442. }
  443. if (AllowGrowth != false) {
  444. size += 1 + 1;
  445. }
  446. if (AllocatorType.Length != 0) {
  447. size += 1 + pb::CodedOutputStream.ComputeStringSize(AllocatorType);
  448. }
  449. if (DeferredDeletionBytes != 0L) {
  450. size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeferredDeletionBytes);
  451. }
  452. if (VisibleDeviceList.Length != 0) {
  453. size += 1 + pb::CodedOutputStream.ComputeStringSize(VisibleDeviceList);
  454. }
  455. if (PollingActiveDelayUsecs != 0) {
  456. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PollingActiveDelayUsecs);
  457. }
  458. if (PollingInactiveDelayMsecs != 0) {
  459. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PollingInactiveDelayMsecs);
  460. }
  461. if (ForceGpuCompatible != false) {
  462. size += 1 + 1;
  463. }
  464. if (experimental_ != null) {
  465. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  466. }
  467. if (_unknownFields != null) {
  468. size += _unknownFields.CalculateSize();
  469. }
  470. return size;
  471. }
  472. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  473. public void MergeFrom(GPUOptions other) {
  474. if (other == null) {
  475. return;
  476. }
  477. if (other.PerProcessGpuMemoryFraction != 0D) {
  478. PerProcessGpuMemoryFraction = other.PerProcessGpuMemoryFraction;
  479. }
  480. if (other.AllowGrowth != false) {
  481. AllowGrowth = other.AllowGrowth;
  482. }
  483. if (other.AllocatorType.Length != 0) {
  484. AllocatorType = other.AllocatorType;
  485. }
  486. if (other.DeferredDeletionBytes != 0L) {
  487. DeferredDeletionBytes = other.DeferredDeletionBytes;
  488. }
  489. if (other.VisibleDeviceList.Length != 0) {
  490. VisibleDeviceList = other.VisibleDeviceList;
  491. }
  492. if (other.PollingActiveDelayUsecs != 0) {
  493. PollingActiveDelayUsecs = other.PollingActiveDelayUsecs;
  494. }
  495. if (other.PollingInactiveDelayMsecs != 0) {
  496. PollingInactiveDelayMsecs = other.PollingInactiveDelayMsecs;
  497. }
  498. if (other.ForceGpuCompatible != false) {
  499. ForceGpuCompatible = other.ForceGpuCompatible;
  500. }
  501. if (other.experimental_ != null) {
  502. if (experimental_ == null) {
  503. experimental_ = new global::Tensorflow.GPUOptions.Types.Experimental();
  504. }
  505. Experimental.MergeFrom(other.Experimental);
  506. }
  507. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  508. }
  509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  510. public void MergeFrom(pb::CodedInputStream input) {
  511. uint tag;
  512. while ((tag = input.ReadTag()) != 0) {
  513. switch(tag) {
  514. default:
  515. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  516. break;
  517. case 9: {
  518. PerProcessGpuMemoryFraction = input.ReadDouble();
  519. break;
  520. }
  521. case 18: {
  522. AllocatorType = input.ReadString();
  523. break;
  524. }
  525. case 24: {
  526. DeferredDeletionBytes = input.ReadInt64();
  527. break;
  528. }
  529. case 32: {
  530. AllowGrowth = input.ReadBool();
  531. break;
  532. }
  533. case 42: {
  534. VisibleDeviceList = input.ReadString();
  535. break;
  536. }
  537. case 48: {
  538. PollingActiveDelayUsecs = input.ReadInt32();
  539. break;
  540. }
  541. case 56: {
  542. PollingInactiveDelayMsecs = input.ReadInt32();
  543. break;
  544. }
  545. case 64: {
  546. ForceGpuCompatible = input.ReadBool();
  547. break;
  548. }
  549. case 74: {
  550. if (experimental_ == null) {
  551. experimental_ = new global::Tensorflow.GPUOptions.Types.Experimental();
  552. }
  553. input.ReadMessage(experimental_);
  554. break;
  555. }
  556. }
  557. }
  558. }
  559. #region Nested types
  560. /// <summary>Container for nested types declared in the GPUOptions message type.</summary>
  561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  562. public static partial class Types {
  563. public sealed partial class Experimental : pb::IMessage<Experimental> {
  564. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  565. private pb::UnknownFieldSet _unknownFields;
  566. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  567. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  568. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  569. public static pbr::MessageDescriptor Descriptor {
  570. get { return global::Tensorflow.GPUOptions.Descriptor.NestedTypes[0]; }
  571. }
  572. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  573. pbr::MessageDescriptor pb::IMessage.Descriptor {
  574. get { return Descriptor; }
  575. }
  576. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  577. public Experimental() {
  578. OnConstruction();
  579. }
  580. partial void OnConstruction();
  581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  582. public Experimental(Experimental other) : this() {
  583. virtualDevices_ = other.virtualDevices_.Clone();
  584. useUnifiedMemory_ = other.useUnifiedMemory_;
  585. numDevToDevCopyStreams_ = other.numDevToDevCopyStreams_;
  586. collectiveRingOrder_ = other.collectiveRingOrder_;
  587. timestampedAllocator_ = other.timestampedAllocator_;
  588. kernelTrackerMaxInterval_ = other.kernelTrackerMaxInterval_;
  589. kernelTrackerMaxBytes_ = other.kernelTrackerMaxBytes_;
  590. kernelTrackerMaxPending_ = other.kernelTrackerMaxPending_;
  591. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  592. }
  593. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  594. public Experimental Clone() {
  595. return new Experimental(this);
  596. }
  597. /// <summary>Field number for the "virtual_devices" field.</summary>
  598. public const int VirtualDevicesFieldNumber = 1;
  599. private static readonly pb::FieldCodec<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> _repeated_virtualDevices_codec
  600. = pb::FieldCodec.ForMessage(10, global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser);
  601. private readonly pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> virtualDevices_ = new pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices>();
  602. /// <summary>
  603. /// The multi virtual device settings. If empty (not set), it will create
  604. /// single virtual device on each visible GPU, according to the settings
  605. /// in "visible_device_list" above. Otherwise, the number of elements in the
  606. /// list must be the same as the number of visible GPUs (after
  607. /// "visible_device_list" filtering if it is set), and the string represented
  608. /// device names (e.g. /device:GPU:&lt;id>) will refer to the virtual
  609. /// devices and have the &lt;id> field assigned sequentially starting from 0,
  610. /// according to the order they appear in this list and the "memory_limit"
  611. /// list inside each element. For example,
  612. /// visible_device_list = "1,0"
  613. /// virtual_devices { memory_limit: 1GB memory_limit: 2GB }
  614. /// virtual_devices {}
  615. /// will create three virtual devices as:
  616. /// /device:GPU:0 -> visible GPU 1 with 1GB memory
  617. /// /device:GPU:1 -> visible GPU 1 with 2GB memory
  618. /// /device:GPU:2 -> visible GPU 0 with all available memory
  619. ///
  620. /// NOTE:
  621. /// 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
  622. /// at the same time.
  623. /// 2. Currently this setting is per-process, not per-session. Using
  624. /// different settings in different sessions within same process will
  625. /// result in undefined behavior.
  626. /// </summary>
  627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  628. public pbc::RepeatedField<global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices> VirtualDevices {
  629. get { return virtualDevices_; }
  630. }
  631. /// <summary>Field number for the "use_unified_memory" field.</summary>
  632. public const int UseUnifiedMemoryFieldNumber = 2;
  633. private bool useUnifiedMemory_;
  634. /// <summary>
  635. /// If true, uses CUDA unified memory for memory allocations. If
  636. /// per_process_gpu_memory_fraction option is greater than 1.0, then unified
  637. /// memory is used regardless of the value for this field. See comments for
  638. /// per_process_gpu_memory_fraction field for more details and requirements
  639. /// of the unified memory. This option is useful to oversubscribe memory if
  640. /// multiple processes are sharing a single GPU while individually using less
  641. /// than 1.0 per process memory fraction.
  642. /// </summary>
  643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  644. public bool UseUnifiedMemory {
  645. get { return useUnifiedMemory_; }
  646. set {
  647. useUnifiedMemory_ = value;
  648. }
  649. }
  650. /// <summary>Field number for the "num_dev_to_dev_copy_streams" field.</summary>
  651. public const int NumDevToDevCopyStreamsFieldNumber = 3;
  652. private int numDevToDevCopyStreams_;
  653. /// <summary>
  654. /// If > 1, the number of device-to-device copy streams to create
  655. /// for each GPUDevice. Default value is 0, which is automatically
  656. /// converted to 1.
  657. /// </summary>
  658. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  659. public int NumDevToDevCopyStreams {
  660. get { return numDevToDevCopyStreams_; }
  661. set {
  662. numDevToDevCopyStreams_ = value;
  663. }
  664. }
  665. /// <summary>Field number for the "collective_ring_order" field.</summary>
  666. public const int CollectiveRingOrderFieldNumber = 4;
  667. private string collectiveRingOrder_ = "";
  668. /// <summary>
  669. /// If non-empty, defines a good GPU ring order on a single worker based on
  670. /// device interconnect. This assumes that all workers have the same GPU
  671. /// topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4".
  672. /// This ring order is used by the RingReducer implementation of
  673. /// CollectiveReduce, and serves as an override to automatic ring order
  674. /// generation in OrderTaskDeviceMap() during CollectiveParam resolution.
  675. /// </summary>
  676. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  677. public string CollectiveRingOrder {
  678. get { return collectiveRingOrder_; }
  679. set {
  680. collectiveRingOrder_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  681. }
  682. }
  683. /// <summary>Field number for the "timestamped_allocator" field.</summary>
  684. public const int TimestampedAllocatorFieldNumber = 5;
  685. private bool timestampedAllocator_;
  686. /// <summary>
  687. /// If true then extra work is done by GPUDevice and GPUBFCAllocator to
  688. /// keep track of when GPU memory is freed and when kernels actually
  689. /// complete so that we can know when a nominally free memory chunk
  690. /// is really not subject to pending use.
  691. /// </summary>
  692. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  693. public bool TimestampedAllocator {
  694. get { return timestampedAllocator_; }
  695. set {
  696. timestampedAllocator_ = value;
  697. }
  698. }
  699. /// <summary>Field number for the "kernel_tracker_max_interval" field.</summary>
  700. public const int KernelTrackerMaxIntervalFieldNumber = 7;
  701. private int kernelTrackerMaxInterval_;
  702. /// <summary>
  703. /// Parameters for GPUKernelTracker. By default no kernel tracking is done.
  704. /// Note that timestamped_allocator is only effective if some tracking is
  705. /// specified.
  706. ///
  707. /// If kernel_tracker_max_interval = n > 0, then a tracking event
  708. /// is inserted after every n kernels without an event.
  709. /// </summary>
  710. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  711. public int KernelTrackerMaxInterval {
  712. get { return kernelTrackerMaxInterval_; }
  713. set {
  714. kernelTrackerMaxInterval_ = value;
  715. }
  716. }
  717. /// <summary>Field number for the "kernel_tracker_max_bytes" field.</summary>
  718. public const int KernelTrackerMaxBytesFieldNumber = 8;
  719. private int kernelTrackerMaxBytes_;
  720. /// <summary>
  721. /// If kernel_tracker_max_bytes = n > 0, then a tracking event is
  722. /// inserted after every series of kernels allocating a sum of
  723. /// memory >= n. If one kernel allocates b * n bytes, then one
  724. /// event will be inserted after it, but it will count as b against
  725. /// the pending limit.
  726. /// </summary>
  727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  728. public int KernelTrackerMaxBytes {
  729. get { return kernelTrackerMaxBytes_; }
  730. set {
  731. kernelTrackerMaxBytes_ = value;
  732. }
  733. }
  734. /// <summary>Field number for the "kernel_tracker_max_pending" field.</summary>
  735. public const int KernelTrackerMaxPendingFieldNumber = 9;
  736. private int kernelTrackerMaxPending_;
  737. /// <summary>
  738. /// If kernel_tracker_max_pending > 0 then no more than this many
  739. /// tracking events can be outstanding at a time. An attempt to
  740. /// launch an additional kernel will stall until an event
  741. /// completes.
  742. /// </summary>
  743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  744. public int KernelTrackerMaxPending {
  745. get { return kernelTrackerMaxPending_; }
  746. set {
  747. kernelTrackerMaxPending_ = value;
  748. }
  749. }
  750. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  751. public override bool Equals(object other) {
  752. return Equals(other as Experimental);
  753. }
  754. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  755. public bool Equals(Experimental other) {
  756. if (ReferenceEquals(other, null)) {
  757. return false;
  758. }
  759. if (ReferenceEquals(other, this)) {
  760. return true;
  761. }
  762. if(!virtualDevices_.Equals(other.virtualDevices_)) return false;
  763. if (UseUnifiedMemory != other.UseUnifiedMemory) return false;
  764. if (NumDevToDevCopyStreams != other.NumDevToDevCopyStreams) return false;
  765. if (CollectiveRingOrder != other.CollectiveRingOrder) return false;
  766. if (TimestampedAllocator != other.TimestampedAllocator) return false;
  767. if (KernelTrackerMaxInterval != other.KernelTrackerMaxInterval) return false;
  768. if (KernelTrackerMaxBytes != other.KernelTrackerMaxBytes) return false;
  769. if (KernelTrackerMaxPending != other.KernelTrackerMaxPending) return false;
  770. return Equals(_unknownFields, other._unknownFields);
  771. }
  772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  773. public override int GetHashCode() {
  774. int hash = 1;
  775. hash ^= virtualDevices_.GetHashCode();
  776. if (UseUnifiedMemory != false) hash ^= UseUnifiedMemory.GetHashCode();
  777. if (NumDevToDevCopyStreams != 0) hash ^= NumDevToDevCopyStreams.GetHashCode();
  778. if (CollectiveRingOrder.Length != 0) hash ^= CollectiveRingOrder.GetHashCode();
  779. if (TimestampedAllocator != false) hash ^= TimestampedAllocator.GetHashCode();
  780. if (KernelTrackerMaxInterval != 0) hash ^= KernelTrackerMaxInterval.GetHashCode();
  781. if (KernelTrackerMaxBytes != 0) hash ^= KernelTrackerMaxBytes.GetHashCode();
  782. if (KernelTrackerMaxPending != 0) hash ^= KernelTrackerMaxPending.GetHashCode();
  783. if (_unknownFields != null) {
  784. hash ^= _unknownFields.GetHashCode();
  785. }
  786. return hash;
  787. }
  788. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  789. public override string ToString() {
  790. return pb::JsonFormatter.ToDiagnosticString(this);
  791. }
  792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  793. public void WriteTo(pb::CodedOutputStream output) {
  794. virtualDevices_.WriteTo(output, _repeated_virtualDevices_codec);
  795. if (UseUnifiedMemory != false) {
  796. output.WriteRawTag(16);
  797. output.WriteBool(UseUnifiedMemory);
  798. }
  799. if (NumDevToDevCopyStreams != 0) {
  800. output.WriteRawTag(24);
  801. output.WriteInt32(NumDevToDevCopyStreams);
  802. }
  803. if (CollectiveRingOrder.Length != 0) {
  804. output.WriteRawTag(34);
  805. output.WriteString(CollectiveRingOrder);
  806. }
  807. if (TimestampedAllocator != false) {
  808. output.WriteRawTag(40);
  809. output.WriteBool(TimestampedAllocator);
  810. }
  811. if (KernelTrackerMaxInterval != 0) {
  812. output.WriteRawTag(56);
  813. output.WriteInt32(KernelTrackerMaxInterval);
  814. }
  815. if (KernelTrackerMaxBytes != 0) {
  816. output.WriteRawTag(64);
  817. output.WriteInt32(KernelTrackerMaxBytes);
  818. }
  819. if (KernelTrackerMaxPending != 0) {
  820. output.WriteRawTag(72);
  821. output.WriteInt32(KernelTrackerMaxPending);
  822. }
  823. if (_unknownFields != null) {
  824. _unknownFields.WriteTo(output);
  825. }
  826. }
  827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  828. public int CalculateSize() {
  829. int size = 0;
  830. size += virtualDevices_.CalculateSize(_repeated_virtualDevices_codec);
  831. if (UseUnifiedMemory != false) {
  832. size += 1 + 1;
  833. }
  834. if (NumDevToDevCopyStreams != 0) {
  835. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumDevToDevCopyStreams);
  836. }
  837. if (CollectiveRingOrder.Length != 0) {
  838. size += 1 + pb::CodedOutputStream.ComputeStringSize(CollectiveRingOrder);
  839. }
  840. if (TimestampedAllocator != false) {
  841. size += 1 + 1;
  842. }
  843. if (KernelTrackerMaxInterval != 0) {
  844. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxInterval);
  845. }
  846. if (KernelTrackerMaxBytes != 0) {
  847. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxBytes);
  848. }
  849. if (KernelTrackerMaxPending != 0) {
  850. size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxPending);
  851. }
  852. if (_unknownFields != null) {
  853. size += _unknownFields.CalculateSize();
  854. }
  855. return size;
  856. }
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  858. public void MergeFrom(Experimental other) {
  859. if (other == null) {
  860. return;
  861. }
  862. virtualDevices_.Add(other.virtualDevices_);
  863. if (other.UseUnifiedMemory != false) {
  864. UseUnifiedMemory = other.UseUnifiedMemory;
  865. }
  866. if (other.NumDevToDevCopyStreams != 0) {
  867. NumDevToDevCopyStreams = other.NumDevToDevCopyStreams;
  868. }
  869. if (other.CollectiveRingOrder.Length != 0) {
  870. CollectiveRingOrder = other.CollectiveRingOrder;
  871. }
  872. if (other.TimestampedAllocator != false) {
  873. TimestampedAllocator = other.TimestampedAllocator;
  874. }
  875. if (other.KernelTrackerMaxInterval != 0) {
  876. KernelTrackerMaxInterval = other.KernelTrackerMaxInterval;
  877. }
  878. if (other.KernelTrackerMaxBytes != 0) {
  879. KernelTrackerMaxBytes = other.KernelTrackerMaxBytes;
  880. }
  881. if (other.KernelTrackerMaxPending != 0) {
  882. KernelTrackerMaxPending = other.KernelTrackerMaxPending;
  883. }
  884. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  885. }
  886. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  887. public void MergeFrom(pb::CodedInputStream input) {
  888. uint tag;
  889. while ((tag = input.ReadTag()) != 0) {
  890. switch(tag) {
  891. default:
  892. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  893. break;
  894. case 10: {
  895. virtualDevices_.AddEntriesFrom(input, _repeated_virtualDevices_codec);
  896. break;
  897. }
  898. case 16: {
  899. UseUnifiedMemory = input.ReadBool();
  900. break;
  901. }
  902. case 24: {
  903. NumDevToDevCopyStreams = input.ReadInt32();
  904. break;
  905. }
  906. case 34: {
  907. CollectiveRingOrder = input.ReadString();
  908. break;
  909. }
  910. case 40: {
  911. TimestampedAllocator = input.ReadBool();
  912. break;
  913. }
  914. case 56: {
  915. KernelTrackerMaxInterval = input.ReadInt32();
  916. break;
  917. }
  918. case 64: {
  919. KernelTrackerMaxBytes = input.ReadInt32();
  920. break;
  921. }
  922. case 72: {
  923. KernelTrackerMaxPending = input.ReadInt32();
  924. break;
  925. }
  926. }
  927. }
  928. }
  929. #region Nested types
  930. /// <summary>Container for nested types declared in the Experimental message type.</summary>
  931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  932. public static partial class Types {
  933. /// <summary>
  934. /// Configuration for breaking down a visible GPU into multiple "virtual"
  935. /// devices.
  936. /// </summary>
  937. public sealed partial class VirtualDevices : pb::IMessage<VirtualDevices> {
  938. private static readonly pb::MessageParser<VirtualDevices> _parser = new pb::MessageParser<VirtualDevices>(() => new VirtualDevices());
  939. private pb::UnknownFieldSet _unknownFields;
  940. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  941. public static pb::MessageParser<VirtualDevices> Parser { get { return _parser; } }
  942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  943. public static pbr::MessageDescriptor Descriptor {
  944. get { return global::Tensorflow.GPUOptions.Types.Experimental.Descriptor.NestedTypes[0]; }
  945. }
  946. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  947. pbr::MessageDescriptor pb::IMessage.Descriptor {
  948. get { return Descriptor; }
  949. }
  950. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  951. public VirtualDevices() {
  952. OnConstruction();
  953. }
  954. partial void OnConstruction();
  955. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  956. public VirtualDevices(VirtualDevices other) : this() {
  957. memoryLimitMb_ = other.memoryLimitMb_.Clone();
  958. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  959. }
  960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  961. public VirtualDevices Clone() {
  962. return new VirtualDevices(this);
  963. }
  964. /// <summary>Field number for the "memory_limit_mb" field.</summary>
  965. public const int MemoryLimitMbFieldNumber = 1;
  966. private static readonly pb::FieldCodec<float> _repeated_memoryLimitMb_codec
  967. = pb::FieldCodec.ForFloat(10);
  968. private readonly pbc::RepeatedField<float> memoryLimitMb_ = new pbc::RepeatedField<float>();
  969. /// <summary>
  970. /// Per "virtual" device memory limit, in MB. The number of elements in
  971. /// the list is the number of virtual devices to create on the
  972. /// corresponding visible GPU (see "virtual_devices" below).
  973. /// If empty, it will create single virtual device taking all available
  974. /// memory from the device.
  975. ///
  976. /// For the concept of "visible" and "virtual" GPU, see the comments for
  977. /// "visible_device_list" above for more information.
  978. /// </summary>
  979. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  980. public pbc::RepeatedField<float> MemoryLimitMb {
  981. get { return memoryLimitMb_; }
  982. }
  983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  984. public override bool Equals(object other) {
  985. return Equals(other as VirtualDevices);
  986. }
  987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  988. public bool Equals(VirtualDevices other) {
  989. if (ReferenceEquals(other, null)) {
  990. return false;
  991. }
  992. if (ReferenceEquals(other, this)) {
  993. return true;
  994. }
  995. if(!memoryLimitMb_.Equals(other.memoryLimitMb_)) return false;
  996. return Equals(_unknownFields, other._unknownFields);
  997. }
  998. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  999. public override int GetHashCode() {
  1000. int hash = 1;
  1001. hash ^= memoryLimitMb_.GetHashCode();
  1002. if (_unknownFields != null) {
  1003. hash ^= _unknownFields.GetHashCode();
  1004. }
  1005. return hash;
  1006. }
  1007. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1008. public override string ToString() {
  1009. return pb::JsonFormatter.ToDiagnosticString(this);
  1010. }
  1011. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1012. public void WriteTo(pb::CodedOutputStream output) {
  1013. memoryLimitMb_.WriteTo(output, _repeated_memoryLimitMb_codec);
  1014. if (_unknownFields != null) {
  1015. _unknownFields.WriteTo(output);
  1016. }
  1017. }
  1018. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1019. public int CalculateSize() {
  1020. int size = 0;
  1021. size += memoryLimitMb_.CalculateSize(_repeated_memoryLimitMb_codec);
  1022. if (_unknownFields != null) {
  1023. size += _unknownFields.CalculateSize();
  1024. }
  1025. return size;
  1026. }
  1027. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1028. public void MergeFrom(VirtualDevices other) {
  1029. if (other == null) {
  1030. return;
  1031. }
  1032. memoryLimitMb_.Add(other.memoryLimitMb_);
  1033. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1034. }
  1035. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1036. public void MergeFrom(pb::CodedInputStream input) {
  1037. uint tag;
  1038. while ((tag = input.ReadTag()) != 0) {
  1039. switch(tag) {
  1040. default:
  1041. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1042. break;
  1043. case 10:
  1044. case 13: {
  1045. memoryLimitMb_.AddEntriesFrom(input, _repeated_memoryLimitMb_codec);
  1046. break;
  1047. }
  1048. }
  1049. }
  1050. }
  1051. }
  1052. }
  1053. #endregion
  1054. }
  1055. }
  1056. #endregion
  1057. }
  1058. /// <summary>
  1059. /// Options passed to the graph optimizer
  1060. /// </summary>
  1061. public sealed partial class OptimizerOptions : pb::IMessage<OptimizerOptions> {
  1062. private static readonly pb::MessageParser<OptimizerOptions> _parser = new pb::MessageParser<OptimizerOptions>(() => new OptimizerOptions());
  1063. private pb::UnknownFieldSet _unknownFields;
  1064. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1065. public static pb::MessageParser<OptimizerOptions> Parser { get { return _parser; } }
  1066. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1067. public static pbr::MessageDescriptor Descriptor {
  1068. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[1]; }
  1069. }
  1070. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1071. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1072. get { return Descriptor; }
  1073. }
  1074. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1075. public OptimizerOptions() {
  1076. OnConstruction();
  1077. }
  1078. partial void OnConstruction();
  1079. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1080. public OptimizerOptions(OptimizerOptions other) : this() {
  1081. doCommonSubexpressionElimination_ = other.doCommonSubexpressionElimination_;
  1082. doConstantFolding_ = other.doConstantFolding_;
  1083. maxFoldedConstantInBytes_ = other.maxFoldedConstantInBytes_;
  1084. doFunctionInlining_ = other.doFunctionInlining_;
  1085. optLevel_ = other.optLevel_;
  1086. globalJitLevel_ = other.globalJitLevel_;
  1087. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1088. }
  1089. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1090. public OptimizerOptions Clone() {
  1091. return new OptimizerOptions(this);
  1092. }
  1093. /// <summary>Field number for the "do_common_subexpression_elimination" field.</summary>
  1094. public const int DoCommonSubexpressionEliminationFieldNumber = 1;
  1095. private bool doCommonSubexpressionElimination_;
  1096. /// <summary>
  1097. /// If true, optimize the graph using common subexpression elimination.
  1098. /// </summary>
  1099. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1100. public bool DoCommonSubexpressionElimination {
  1101. get { return doCommonSubexpressionElimination_; }
  1102. set {
  1103. doCommonSubexpressionElimination_ = value;
  1104. }
  1105. }
  1106. /// <summary>Field number for the "do_constant_folding" field.</summary>
  1107. public const int DoConstantFoldingFieldNumber = 2;
  1108. private bool doConstantFolding_;
  1109. /// <summary>
  1110. /// If true, perform constant folding optimization on the graph.
  1111. /// </summary>
  1112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1113. public bool DoConstantFolding {
  1114. get { return doConstantFolding_; }
  1115. set {
  1116. doConstantFolding_ = value;
  1117. }
  1118. }
  1119. /// <summary>Field number for the "max_folded_constant_in_bytes" field.</summary>
  1120. public const int MaxFoldedConstantInBytesFieldNumber = 6;
  1121. private long maxFoldedConstantInBytes_;
  1122. /// <summary>
  1123. /// Constant folding optimization replaces tensors whose values can be
  1124. /// predetermined, with constant nodes. To avoid inserting too large constants,
  1125. /// the size of each constant created can be limited. If this value is zero, a
  1126. /// default limit of 10 MiB will be applied. If constant folding optimization
  1127. /// is disabled, this value is ignored.
  1128. /// </summary>
  1129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1130. public long MaxFoldedConstantInBytes {
  1131. get { return maxFoldedConstantInBytes_; }
  1132. set {
  1133. maxFoldedConstantInBytes_ = value;
  1134. }
  1135. }
  1136. /// <summary>Field number for the "do_function_inlining" field.</summary>
  1137. public const int DoFunctionInliningFieldNumber = 4;
  1138. private bool doFunctionInlining_;
  1139. /// <summary>
  1140. /// If true, perform function inlining on the graph.
  1141. /// </summary>
  1142. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1143. public bool DoFunctionInlining {
  1144. get { return doFunctionInlining_; }
  1145. set {
  1146. doFunctionInlining_ = value;
  1147. }
  1148. }
  1149. /// <summary>Field number for the "opt_level" field.</summary>
  1150. public const int OptLevelFieldNumber = 3;
  1151. private global::Tensorflow.OptimizerOptions.Types.Level optLevel_ = 0;
  1152. /// <summary>
  1153. /// Overall optimization level. The actual optimizations applied will be the
  1154. /// logical OR of the flags that this level implies and any flags already set.
  1155. /// </summary>
  1156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1157. public global::Tensorflow.OptimizerOptions.Types.Level OptLevel {
  1158. get { return optLevel_; }
  1159. set {
  1160. optLevel_ = value;
  1161. }
  1162. }
  1163. /// <summary>Field number for the "global_jit_level" field.</summary>
  1164. public const int GlobalJitLevelFieldNumber = 5;
  1165. private global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel globalJitLevel_ = 0;
  1166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1167. public global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel GlobalJitLevel {
  1168. get { return globalJitLevel_; }
  1169. set {
  1170. globalJitLevel_ = value;
  1171. }
  1172. }
  1173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1174. public override bool Equals(object other) {
  1175. return Equals(other as OptimizerOptions);
  1176. }
  1177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1178. public bool Equals(OptimizerOptions other) {
  1179. if (ReferenceEquals(other, null)) {
  1180. return false;
  1181. }
  1182. if (ReferenceEquals(other, this)) {
  1183. return true;
  1184. }
  1185. if (DoCommonSubexpressionElimination != other.DoCommonSubexpressionElimination) return false;
  1186. if (DoConstantFolding != other.DoConstantFolding) return false;
  1187. if (MaxFoldedConstantInBytes != other.MaxFoldedConstantInBytes) return false;
  1188. if (DoFunctionInlining != other.DoFunctionInlining) return false;
  1189. if (OptLevel != other.OptLevel) return false;
  1190. if (GlobalJitLevel != other.GlobalJitLevel) return false;
  1191. return Equals(_unknownFields, other._unknownFields);
  1192. }
  1193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1194. public override int GetHashCode() {
  1195. int hash = 1;
  1196. if (DoCommonSubexpressionElimination != false) hash ^= DoCommonSubexpressionElimination.GetHashCode();
  1197. if (DoConstantFolding != false) hash ^= DoConstantFolding.GetHashCode();
  1198. if (MaxFoldedConstantInBytes != 0L) hash ^= MaxFoldedConstantInBytes.GetHashCode();
  1199. if (DoFunctionInlining != false) hash ^= DoFunctionInlining.GetHashCode();
  1200. if (OptLevel != 0) hash ^= OptLevel.GetHashCode();
  1201. if (GlobalJitLevel != 0) hash ^= GlobalJitLevel.GetHashCode();
  1202. if (_unknownFields != null) {
  1203. hash ^= _unknownFields.GetHashCode();
  1204. }
  1205. return hash;
  1206. }
  1207. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1208. public override string ToString() {
  1209. return pb::JsonFormatter.ToDiagnosticString(this);
  1210. }
  1211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1212. public void WriteTo(pb::CodedOutputStream output) {
  1213. if (DoCommonSubexpressionElimination != false) {
  1214. output.WriteRawTag(8);
  1215. output.WriteBool(DoCommonSubexpressionElimination);
  1216. }
  1217. if (DoConstantFolding != false) {
  1218. output.WriteRawTag(16);
  1219. output.WriteBool(DoConstantFolding);
  1220. }
  1221. if (OptLevel != 0) {
  1222. output.WriteRawTag(24);
  1223. output.WriteEnum((int) OptLevel);
  1224. }
  1225. if (DoFunctionInlining != false) {
  1226. output.WriteRawTag(32);
  1227. output.WriteBool(DoFunctionInlining);
  1228. }
  1229. if (GlobalJitLevel != 0) {
  1230. output.WriteRawTag(40);
  1231. output.WriteEnum((int) GlobalJitLevel);
  1232. }
  1233. if (MaxFoldedConstantInBytes != 0L) {
  1234. output.WriteRawTag(48);
  1235. output.WriteInt64(MaxFoldedConstantInBytes);
  1236. }
  1237. if (_unknownFields != null) {
  1238. _unknownFields.WriteTo(output);
  1239. }
  1240. }
  1241. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1242. public int CalculateSize() {
  1243. int size = 0;
  1244. if (DoCommonSubexpressionElimination != false) {
  1245. size += 1 + 1;
  1246. }
  1247. if (DoConstantFolding != false) {
  1248. size += 1 + 1;
  1249. }
  1250. if (MaxFoldedConstantInBytes != 0L) {
  1251. size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxFoldedConstantInBytes);
  1252. }
  1253. if (DoFunctionInlining != false) {
  1254. size += 1 + 1;
  1255. }
  1256. if (OptLevel != 0) {
  1257. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptLevel);
  1258. }
  1259. if (GlobalJitLevel != 0) {
  1260. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GlobalJitLevel);
  1261. }
  1262. if (_unknownFields != null) {
  1263. size += _unknownFields.CalculateSize();
  1264. }
  1265. return size;
  1266. }
  1267. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1268. public void MergeFrom(OptimizerOptions other) {
  1269. if (other == null) {
  1270. return;
  1271. }
  1272. if (other.DoCommonSubexpressionElimination != false) {
  1273. DoCommonSubexpressionElimination = other.DoCommonSubexpressionElimination;
  1274. }
  1275. if (other.DoConstantFolding != false) {
  1276. DoConstantFolding = other.DoConstantFolding;
  1277. }
  1278. if (other.MaxFoldedConstantInBytes != 0L) {
  1279. MaxFoldedConstantInBytes = other.MaxFoldedConstantInBytes;
  1280. }
  1281. if (other.DoFunctionInlining != false) {
  1282. DoFunctionInlining = other.DoFunctionInlining;
  1283. }
  1284. if (other.OptLevel != 0) {
  1285. OptLevel = other.OptLevel;
  1286. }
  1287. if (other.GlobalJitLevel != 0) {
  1288. GlobalJitLevel = other.GlobalJitLevel;
  1289. }
  1290. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1291. }
  1292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1293. public void MergeFrom(pb::CodedInputStream input) {
  1294. uint tag;
  1295. while ((tag = input.ReadTag()) != 0) {
  1296. switch(tag) {
  1297. default:
  1298. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1299. break;
  1300. case 8: {
  1301. DoCommonSubexpressionElimination = input.ReadBool();
  1302. break;
  1303. }
  1304. case 16: {
  1305. DoConstantFolding = input.ReadBool();
  1306. break;
  1307. }
  1308. case 24: {
  1309. optLevel_ = (global::Tensorflow.OptimizerOptions.Types.Level) input.ReadEnum();
  1310. break;
  1311. }
  1312. case 32: {
  1313. DoFunctionInlining = input.ReadBool();
  1314. break;
  1315. }
  1316. case 40: {
  1317. globalJitLevel_ = (global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) input.ReadEnum();
  1318. break;
  1319. }
  1320. case 48: {
  1321. MaxFoldedConstantInBytes = input.ReadInt64();
  1322. break;
  1323. }
  1324. }
  1325. }
  1326. }
  1327. #region Nested types
  1328. /// <summary>Container for nested types declared in the OptimizerOptions message type.</summary>
  1329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1330. public static partial class Types {
  1331. /// <summary>
  1332. /// Optimization level
  1333. /// </summary>
  1334. public enum Level {
  1335. /// <summary>
  1336. /// L1 is the default level.
  1337. /// Optimization performed at L1 :
  1338. /// 1. Common subexpression elimination
  1339. /// 2. Constant folding
  1340. /// </summary>
  1341. [pbr::OriginalName("L1")] L1 = 0,
  1342. /// <summary>
  1343. /// No optimizations
  1344. /// </summary>
  1345. [pbr::OriginalName("L0")] L0 = -1,
  1346. }
  1347. /// <summary>
  1348. /// Control the use of the compiler/jit. Experimental.
  1349. /// </summary>
  1350. public enum GlobalJitLevel {
  1351. /// <summary>
  1352. /// Default setting ("off" now, but later expected to be "on")
  1353. /// </summary>
  1354. [pbr::OriginalName("DEFAULT")] Default = 0,
  1355. [pbr::OriginalName("OFF")] Off = -1,
  1356. /// <summary>
  1357. /// The following settings turn on compilation, with higher values being
  1358. /// more aggressive. Higher values may reduce opportunities for parallelism
  1359. /// and may use more memory. (At present, there is no distinction, but this
  1360. /// is expected to change.)
  1361. /// </summary>
  1362. [pbr::OriginalName("ON_1")] On1 = 1,
  1363. [pbr::OriginalName("ON_2")] On2 = 2,
  1364. }
  1365. }
  1366. #endregion
  1367. }
  1368. public sealed partial class GraphOptions : pb::IMessage<GraphOptions> {
  1369. private static readonly pb::MessageParser<GraphOptions> _parser = new pb::MessageParser<GraphOptions>(() => new GraphOptions());
  1370. private pb::UnknownFieldSet _unknownFields;
  1371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1372. public static pb::MessageParser<GraphOptions> Parser { get { return _parser; } }
  1373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1374. public static pbr::MessageDescriptor Descriptor {
  1375. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[2]; }
  1376. }
  1377. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1378. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1379. get { return Descriptor; }
  1380. }
  1381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1382. public GraphOptions() {
  1383. OnConstruction();
  1384. }
  1385. partial void OnConstruction();
  1386. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1387. public GraphOptions(GraphOptions other) : this() {
  1388. enableRecvScheduling_ = other.enableRecvScheduling_;
  1389. optimizerOptions_ = other.optimizerOptions_ != null ? other.optimizerOptions_.Clone() : null;
  1390. buildCostModel_ = other.buildCostModel_;
  1391. buildCostModelAfter_ = other.buildCostModelAfter_;
  1392. inferShapes_ = other.inferShapes_;
  1393. placePrunedGraph_ = other.placePrunedGraph_;
  1394. enableBfloat16Sendrecv_ = other.enableBfloat16Sendrecv_;
  1395. timelineStep_ = other.timelineStep_;
  1396. rewriteOptions_ = other.rewriteOptions_ != null ? other.rewriteOptions_.Clone() : null;
  1397. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1398. }
  1399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1400. public GraphOptions Clone() {
  1401. return new GraphOptions(this);
  1402. }
  1403. /// <summary>Field number for the "enable_recv_scheduling" field.</summary>
  1404. public const int EnableRecvSchedulingFieldNumber = 2;
  1405. private bool enableRecvScheduling_;
  1406. /// <summary>
  1407. /// If true, use control flow to schedule the activation of Recv nodes.
  1408. /// (Currently ignored.)
  1409. /// </summary>
  1410. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1411. public bool EnableRecvScheduling {
  1412. get { return enableRecvScheduling_; }
  1413. set {
  1414. enableRecvScheduling_ = value;
  1415. }
  1416. }
  1417. /// <summary>Field number for the "optimizer_options" field.</summary>
  1418. public const int OptimizerOptionsFieldNumber = 3;
  1419. private global::Tensorflow.OptimizerOptions optimizerOptions_;
  1420. /// <summary>
  1421. /// Options controlling how graph is optimized.
  1422. /// </summary>
  1423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1424. public global::Tensorflow.OptimizerOptions OptimizerOptions {
  1425. get { return optimizerOptions_; }
  1426. set {
  1427. optimizerOptions_ = value;
  1428. }
  1429. }
  1430. /// <summary>Field number for the "build_cost_model" field.</summary>
  1431. public const int BuildCostModelFieldNumber = 4;
  1432. private long buildCostModel_;
  1433. /// <summary>
  1434. /// The number of steps to run before returning a cost model detailing
  1435. /// the memory usage and performance of each node of the graph. 0 means
  1436. /// no cost model.
  1437. /// </summary>
  1438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1439. public long BuildCostModel {
  1440. get { return buildCostModel_; }
  1441. set {
  1442. buildCostModel_ = value;
  1443. }
  1444. }
  1445. /// <summary>Field number for the "build_cost_model_after" field.</summary>
  1446. public const int BuildCostModelAfterFieldNumber = 9;
  1447. private long buildCostModelAfter_;
  1448. /// <summary>
  1449. /// The number of steps to skip before collecting statistics for the
  1450. /// cost model.
  1451. /// </summary>
  1452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1453. public long BuildCostModelAfter {
  1454. get { return buildCostModelAfter_; }
  1455. set {
  1456. buildCostModelAfter_ = value;
  1457. }
  1458. }
  1459. /// <summary>Field number for the "infer_shapes" field.</summary>
  1460. public const int InferShapesFieldNumber = 5;
  1461. private bool inferShapes_;
  1462. /// <summary>
  1463. /// Annotate each Node with Op output shape data, to the extent it can
  1464. /// be statically inferred.
  1465. /// </summary>
  1466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1467. public bool InferShapes {
  1468. get { return inferShapes_; }
  1469. set {
  1470. inferShapes_ = value;
  1471. }
  1472. }
  1473. /// <summary>Field number for the "place_pruned_graph" field.</summary>
  1474. public const int PlacePrunedGraphFieldNumber = 6;
  1475. private bool placePrunedGraph_;
  1476. /// <summary>
  1477. /// Only place the subgraphs that are run, rather than the entire graph.
  1478. ///
  1479. /// This is useful for interactive graph building, where one might
  1480. /// produce graphs that cannot be placed during the debugging
  1481. /// process. In particular, it allows the client to continue work in
  1482. /// a session after adding a node to a graph whose placement
  1483. /// constraints are unsatisfiable.
  1484. /// </summary>
  1485. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1486. public bool PlacePrunedGraph {
  1487. get { return placePrunedGraph_; }
  1488. set {
  1489. placePrunedGraph_ = value;
  1490. }
  1491. }
  1492. /// <summary>Field number for the "enable_bfloat16_sendrecv" field.</summary>
  1493. public const int EnableBfloat16SendrecvFieldNumber = 7;
  1494. private bool enableBfloat16Sendrecv_;
  1495. /// <summary>
  1496. /// If true, transfer float values between processes as bfloat16.
  1497. /// </summary>
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1499. public bool EnableBfloat16Sendrecv {
  1500. get { return enableBfloat16Sendrecv_; }
  1501. set {
  1502. enableBfloat16Sendrecv_ = value;
  1503. }
  1504. }
  1505. /// <summary>Field number for the "timeline_step" field.</summary>
  1506. public const int TimelineStepFieldNumber = 8;
  1507. private int timelineStep_;
  1508. /// <summary>
  1509. /// If > 0, record a timeline every this many steps.
  1510. /// EXPERIMENTAL: This currently has no effect in MasterSession.
  1511. /// </summary>
  1512. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1513. public int TimelineStep {
  1514. get { return timelineStep_; }
  1515. set {
  1516. timelineStep_ = value;
  1517. }
  1518. }
  1519. /// <summary>Field number for the "rewrite_options" field.</summary>
  1520. public const int RewriteOptionsFieldNumber = 10;
  1521. private global::Tensorflow.RewriterConfig rewriteOptions_;
  1522. /// <summary>
  1523. /// Options that control the type and amount of graph rewriting.
  1524. /// Not currently configurable via the public Python API (i.e. there is no API
  1525. /// stability guarantee if you import RewriterConfig explicitly).
  1526. /// </summary>
  1527. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1528. public global::Tensorflow.RewriterConfig RewriteOptions {
  1529. get { return rewriteOptions_; }
  1530. set {
  1531. rewriteOptions_ = value;
  1532. }
  1533. }
  1534. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1535. public override bool Equals(object other) {
  1536. return Equals(other as GraphOptions);
  1537. }
  1538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1539. public bool Equals(GraphOptions other) {
  1540. if (ReferenceEquals(other, null)) {
  1541. return false;
  1542. }
  1543. if (ReferenceEquals(other, this)) {
  1544. return true;
  1545. }
  1546. if (EnableRecvScheduling != other.EnableRecvScheduling) return false;
  1547. if (!object.Equals(OptimizerOptions, other.OptimizerOptions)) return false;
  1548. if (BuildCostModel != other.BuildCostModel) return false;
  1549. if (BuildCostModelAfter != other.BuildCostModelAfter) return false;
  1550. if (InferShapes != other.InferShapes) return false;
  1551. if (PlacePrunedGraph != other.PlacePrunedGraph) return false;
  1552. if (EnableBfloat16Sendrecv != other.EnableBfloat16Sendrecv) return false;
  1553. if (TimelineStep != other.TimelineStep) return false;
  1554. if (!object.Equals(RewriteOptions, other.RewriteOptions)) return false;
  1555. return Equals(_unknownFields, other._unknownFields);
  1556. }
  1557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1558. public override int GetHashCode() {
  1559. int hash = 1;
  1560. if (EnableRecvScheduling != false) hash ^= EnableRecvScheduling.GetHashCode();
  1561. if (optimizerOptions_ != null) hash ^= OptimizerOptions.GetHashCode();
  1562. if (BuildCostModel != 0L) hash ^= BuildCostModel.GetHashCode();
  1563. if (BuildCostModelAfter != 0L) hash ^= BuildCostModelAfter.GetHashCode();
  1564. if (InferShapes != false) hash ^= InferShapes.GetHashCode();
  1565. if (PlacePrunedGraph != false) hash ^= PlacePrunedGraph.GetHashCode();
  1566. if (EnableBfloat16Sendrecv != false) hash ^= EnableBfloat16Sendrecv.GetHashCode();
  1567. if (TimelineStep != 0) hash ^= TimelineStep.GetHashCode();
  1568. if (rewriteOptions_ != null) hash ^= RewriteOptions.GetHashCode();
  1569. if (_unknownFields != null) {
  1570. hash ^= _unknownFields.GetHashCode();
  1571. }
  1572. return hash;
  1573. }
  1574. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1575. public override string ToString() {
  1576. return pb::JsonFormatter.ToDiagnosticString(this);
  1577. }
  1578. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1579. public void WriteTo(pb::CodedOutputStream output) {
  1580. if (EnableRecvScheduling != false) {
  1581. output.WriteRawTag(16);
  1582. output.WriteBool(EnableRecvScheduling);
  1583. }
  1584. if (optimizerOptions_ != null) {
  1585. output.WriteRawTag(26);
  1586. output.WriteMessage(OptimizerOptions);
  1587. }
  1588. if (BuildCostModel != 0L) {
  1589. output.WriteRawTag(32);
  1590. output.WriteInt64(BuildCostModel);
  1591. }
  1592. if (InferShapes != false) {
  1593. output.WriteRawTag(40);
  1594. output.WriteBool(InferShapes);
  1595. }
  1596. if (PlacePrunedGraph != false) {
  1597. output.WriteRawTag(48);
  1598. output.WriteBool(PlacePrunedGraph);
  1599. }
  1600. if (EnableBfloat16Sendrecv != false) {
  1601. output.WriteRawTag(56);
  1602. output.WriteBool(EnableBfloat16Sendrecv);
  1603. }
  1604. if (TimelineStep != 0) {
  1605. output.WriteRawTag(64);
  1606. output.WriteInt32(TimelineStep);
  1607. }
  1608. if (BuildCostModelAfter != 0L) {
  1609. output.WriteRawTag(72);
  1610. output.WriteInt64(BuildCostModelAfter);
  1611. }
  1612. if (rewriteOptions_ != null) {
  1613. output.WriteRawTag(82);
  1614. output.WriteMessage(RewriteOptions);
  1615. }
  1616. if (_unknownFields != null) {
  1617. _unknownFields.WriteTo(output);
  1618. }
  1619. }
  1620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1621. public int CalculateSize() {
  1622. int size = 0;
  1623. if (EnableRecvScheduling != false) {
  1624. size += 1 + 1;
  1625. }
  1626. if (optimizerOptions_ != null) {
  1627. size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptimizerOptions);
  1628. }
  1629. if (BuildCostModel != 0L) {
  1630. size += 1 + pb::CodedOutputStream.ComputeInt64Size(BuildCostModel);
  1631. }
  1632. if (BuildCostModelAfter != 0L) {
  1633. size += 1 + pb::CodedOutputStream.ComputeInt64Size(BuildCostModelAfter);
  1634. }
  1635. if (InferShapes != false) {
  1636. size += 1 + 1;
  1637. }
  1638. if (PlacePrunedGraph != false) {
  1639. size += 1 + 1;
  1640. }
  1641. if (EnableBfloat16Sendrecv != false) {
  1642. size += 1 + 1;
  1643. }
  1644. if (TimelineStep != 0) {
  1645. size += 1 + pb::CodedOutputStream.ComputeInt32Size(TimelineStep);
  1646. }
  1647. if (rewriteOptions_ != null) {
  1648. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RewriteOptions);
  1649. }
  1650. if (_unknownFields != null) {
  1651. size += _unknownFields.CalculateSize();
  1652. }
  1653. return size;
  1654. }
  1655. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1656. public void MergeFrom(GraphOptions other) {
  1657. if (other == null) {
  1658. return;
  1659. }
  1660. if (other.EnableRecvScheduling != false) {
  1661. EnableRecvScheduling = other.EnableRecvScheduling;
  1662. }
  1663. if (other.optimizerOptions_ != null) {
  1664. if (optimizerOptions_ == null) {
  1665. optimizerOptions_ = new global::Tensorflow.OptimizerOptions();
  1666. }
  1667. OptimizerOptions.MergeFrom(other.OptimizerOptions);
  1668. }
  1669. if (other.BuildCostModel != 0L) {
  1670. BuildCostModel = other.BuildCostModel;
  1671. }
  1672. if (other.BuildCostModelAfter != 0L) {
  1673. BuildCostModelAfter = other.BuildCostModelAfter;
  1674. }
  1675. if (other.InferShapes != false) {
  1676. InferShapes = other.InferShapes;
  1677. }
  1678. if (other.PlacePrunedGraph != false) {
  1679. PlacePrunedGraph = other.PlacePrunedGraph;
  1680. }
  1681. if (other.EnableBfloat16Sendrecv != false) {
  1682. EnableBfloat16Sendrecv = other.EnableBfloat16Sendrecv;
  1683. }
  1684. if (other.TimelineStep != 0) {
  1685. TimelineStep = other.TimelineStep;
  1686. }
  1687. if (other.rewriteOptions_ != null) {
  1688. if (rewriteOptions_ == null) {
  1689. rewriteOptions_ = new global::Tensorflow.RewriterConfig();
  1690. }
  1691. RewriteOptions.MergeFrom(other.RewriteOptions);
  1692. }
  1693. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1694. }
  1695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1696. public void MergeFrom(pb::CodedInputStream input) {
  1697. uint tag;
  1698. while ((tag = input.ReadTag()) != 0) {
  1699. switch(tag) {
  1700. default:
  1701. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1702. break;
  1703. case 16: {
  1704. EnableRecvScheduling = input.ReadBool();
  1705. break;
  1706. }
  1707. case 26: {
  1708. if (optimizerOptions_ == null) {
  1709. optimizerOptions_ = new global::Tensorflow.OptimizerOptions();
  1710. }
  1711. input.ReadMessage(optimizerOptions_);
  1712. break;
  1713. }
  1714. case 32: {
  1715. BuildCostModel = input.ReadInt64();
  1716. break;
  1717. }
  1718. case 40: {
  1719. InferShapes = input.ReadBool();
  1720. break;
  1721. }
  1722. case 48: {
  1723. PlacePrunedGraph = input.ReadBool();
  1724. break;
  1725. }
  1726. case 56: {
  1727. EnableBfloat16Sendrecv = input.ReadBool();
  1728. break;
  1729. }
  1730. case 64: {
  1731. TimelineStep = input.ReadInt32();
  1732. break;
  1733. }
  1734. case 72: {
  1735. BuildCostModelAfter = input.ReadInt64();
  1736. break;
  1737. }
  1738. case 82: {
  1739. if (rewriteOptions_ == null) {
  1740. rewriteOptions_ = new global::Tensorflow.RewriterConfig();
  1741. }
  1742. input.ReadMessage(rewriteOptions_);
  1743. break;
  1744. }
  1745. }
  1746. }
  1747. }
  1748. }
  1749. public sealed partial class ThreadPoolOptionProto : pb::IMessage<ThreadPoolOptionProto> {
  1750. private static readonly pb::MessageParser<ThreadPoolOptionProto> _parser = new pb::MessageParser<ThreadPoolOptionProto>(() => new ThreadPoolOptionProto());
  1751. private pb::UnknownFieldSet _unknownFields;
  1752. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1753. public static pb::MessageParser<ThreadPoolOptionProto> Parser { get { return _parser; } }
  1754. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1755. public static pbr::MessageDescriptor Descriptor {
  1756. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[3]; }
  1757. }
  1758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1759. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1760. get { return Descriptor; }
  1761. }
  1762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1763. public ThreadPoolOptionProto() {
  1764. OnConstruction();
  1765. }
  1766. partial void OnConstruction();
  1767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1768. public ThreadPoolOptionProto(ThreadPoolOptionProto other) : this() {
  1769. numThreads_ = other.numThreads_;
  1770. globalName_ = other.globalName_;
  1771. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1772. }
  1773. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1774. public ThreadPoolOptionProto Clone() {
  1775. return new ThreadPoolOptionProto(this);
  1776. }
  1777. /// <summary>Field number for the "num_threads" field.</summary>
  1778. public const int NumThreadsFieldNumber = 1;
  1779. private int numThreads_;
  1780. /// <summary>
  1781. /// The number of threads in the pool.
  1782. ///
  1783. /// 0 means the system picks a value based on where this option proto is used
  1784. /// (see the declaration of the specific field for more info).
  1785. /// </summary>
  1786. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1787. public int NumThreads {
  1788. get { return numThreads_; }
  1789. set {
  1790. numThreads_ = value;
  1791. }
  1792. }
  1793. /// <summary>Field number for the "global_name" field.</summary>
  1794. public const int GlobalNameFieldNumber = 2;
  1795. private string globalName_ = "";
  1796. /// <summary>
  1797. /// The global name of the threadpool.
  1798. ///
  1799. /// If empty, then the threadpool is made and used according to the scope it's
  1800. /// in - e.g., for a session threadpool, it is used by that session only.
  1801. ///
  1802. /// If non-empty, then:
  1803. /// - a global threadpool associated with this name is looked
  1804. /// up or created. This allows, for example, sharing one threadpool across
  1805. /// many sessions (e.g., like the default behavior, if
  1806. /// inter_op_parallelism_threads is not configured), but still partitioning
  1807. /// into a large and small pool.
  1808. /// - if the threadpool for this global_name already exists, then it is an
  1809. /// error if the existing pool was created using a different num_threads
  1810. /// value as is specified on this call.
  1811. /// - threadpools created this way are never garbage collected.
  1812. /// </summary>
  1813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1814. public string GlobalName {
  1815. get { return globalName_; }
  1816. set {
  1817. globalName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1818. }
  1819. }
  1820. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1821. public override bool Equals(object other) {
  1822. return Equals(other as ThreadPoolOptionProto);
  1823. }
  1824. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1825. public bool Equals(ThreadPoolOptionProto other) {
  1826. if (ReferenceEquals(other, null)) {
  1827. return false;
  1828. }
  1829. if (ReferenceEquals(other, this)) {
  1830. return true;
  1831. }
  1832. if (NumThreads != other.NumThreads) return false;
  1833. if (GlobalName != other.GlobalName) return false;
  1834. return Equals(_unknownFields, other._unknownFields);
  1835. }
  1836. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1837. public override int GetHashCode() {
  1838. int hash = 1;
  1839. if (NumThreads != 0) hash ^= NumThreads.GetHashCode();
  1840. if (GlobalName.Length != 0) hash ^= GlobalName.GetHashCode();
  1841. if (_unknownFields != null) {
  1842. hash ^= _unknownFields.GetHashCode();
  1843. }
  1844. return hash;
  1845. }
  1846. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1847. public override string ToString() {
  1848. return pb::JsonFormatter.ToDiagnosticString(this);
  1849. }
  1850. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1851. public void WriteTo(pb::CodedOutputStream output) {
  1852. if (NumThreads != 0) {
  1853. output.WriteRawTag(8);
  1854. output.WriteInt32(NumThreads);
  1855. }
  1856. if (GlobalName.Length != 0) {
  1857. output.WriteRawTag(18);
  1858. output.WriteString(GlobalName);
  1859. }
  1860. if (_unknownFields != null) {
  1861. _unknownFields.WriteTo(output);
  1862. }
  1863. }
  1864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1865. public int CalculateSize() {
  1866. int size = 0;
  1867. if (NumThreads != 0) {
  1868. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumThreads);
  1869. }
  1870. if (GlobalName.Length != 0) {
  1871. size += 1 + pb::CodedOutputStream.ComputeStringSize(GlobalName);
  1872. }
  1873. if (_unknownFields != null) {
  1874. size += _unknownFields.CalculateSize();
  1875. }
  1876. return size;
  1877. }
  1878. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1879. public void MergeFrom(ThreadPoolOptionProto other) {
  1880. if (other == null) {
  1881. return;
  1882. }
  1883. if (other.NumThreads != 0) {
  1884. NumThreads = other.NumThreads;
  1885. }
  1886. if (other.GlobalName.Length != 0) {
  1887. GlobalName = other.GlobalName;
  1888. }
  1889. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1890. }
  1891. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1892. public void MergeFrom(pb::CodedInputStream input) {
  1893. uint tag;
  1894. while ((tag = input.ReadTag()) != 0) {
  1895. switch(tag) {
  1896. default:
  1897. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1898. break;
  1899. case 8: {
  1900. NumThreads = input.ReadInt32();
  1901. break;
  1902. }
  1903. case 18: {
  1904. GlobalName = input.ReadString();
  1905. break;
  1906. }
  1907. }
  1908. }
  1909. }
  1910. }
  1911. public sealed partial class RPCOptions : pb::IMessage<RPCOptions> {
  1912. private static readonly pb::MessageParser<RPCOptions> _parser = new pb::MessageParser<RPCOptions>(() => new RPCOptions());
  1913. private pb::UnknownFieldSet _unknownFields;
  1914. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1915. public static pb::MessageParser<RPCOptions> Parser { get { return _parser; } }
  1916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1917. public static pbr::MessageDescriptor Descriptor {
  1918. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[4]; }
  1919. }
  1920. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1921. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1922. get { return Descriptor; }
  1923. }
  1924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1925. public RPCOptions() {
  1926. OnConstruction();
  1927. }
  1928. partial void OnConstruction();
  1929. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1930. public RPCOptions(RPCOptions other) : this() {
  1931. useRpcForInprocessMaster_ = other.useRpcForInprocessMaster_;
  1932. compressionAlgorithm_ = other.compressionAlgorithm_;
  1933. compressionLevel_ = other.compressionLevel_;
  1934. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1935. }
  1936. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1937. public RPCOptions Clone() {
  1938. return new RPCOptions(this);
  1939. }
  1940. /// <summary>Field number for the "use_rpc_for_inprocess_master" field.</summary>
  1941. public const int UseRpcForInprocessMasterFieldNumber = 1;
  1942. private bool useRpcForInprocessMaster_;
  1943. /// <summary>
  1944. /// If true, always use RPC to contact the session target.
  1945. ///
  1946. /// If false (the default option), TensorFlow may use an optimized
  1947. /// transport for client-master communication that avoids the RPC
  1948. /// stack. This option is primarily for used testing the RPC stack.
  1949. /// </summary>
  1950. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1951. public bool UseRpcForInprocessMaster {
  1952. get { return useRpcForInprocessMaster_; }
  1953. set {
  1954. useRpcForInprocessMaster_ = value;
  1955. }
  1956. }
  1957. /// <summary>Field number for the "compression_algorithm" field.</summary>
  1958. public const int CompressionAlgorithmFieldNumber = 2;
  1959. private string compressionAlgorithm_ = "";
  1960. /// <summary>
  1961. /// The compression algorithm to be used. One of "deflate", "gzip".
  1962. /// </summary>
  1963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1964. public string CompressionAlgorithm {
  1965. get { return compressionAlgorithm_; }
  1966. set {
  1967. compressionAlgorithm_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1968. }
  1969. }
  1970. /// <summary>Field number for the "compression_level" field.</summary>
  1971. public const int CompressionLevelFieldNumber = 3;
  1972. private int compressionLevel_;
  1973. /// <summary>
  1974. /// If compression_algorithm is set, the compression level to be used.
  1975. /// From 0 (no compression), up to 3.
  1976. /// </summary>
  1977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1978. public int CompressionLevel {
  1979. get { return compressionLevel_; }
  1980. set {
  1981. compressionLevel_ = value;
  1982. }
  1983. }
  1984. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1985. public override bool Equals(object other) {
  1986. return Equals(other as RPCOptions);
  1987. }
  1988. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1989. public bool Equals(RPCOptions other) {
  1990. if (ReferenceEquals(other, null)) {
  1991. return false;
  1992. }
  1993. if (ReferenceEquals(other, this)) {
  1994. return true;
  1995. }
  1996. if (UseRpcForInprocessMaster != other.UseRpcForInprocessMaster) return false;
  1997. if (CompressionAlgorithm != other.CompressionAlgorithm) return false;
  1998. if (CompressionLevel != other.CompressionLevel) return false;
  1999. return Equals(_unknownFields, other._unknownFields);
  2000. }
  2001. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2002. public override int GetHashCode() {
  2003. int hash = 1;
  2004. if (UseRpcForInprocessMaster != false) hash ^= UseRpcForInprocessMaster.GetHashCode();
  2005. if (CompressionAlgorithm.Length != 0) hash ^= CompressionAlgorithm.GetHashCode();
  2006. if (CompressionLevel != 0) hash ^= CompressionLevel.GetHashCode();
  2007. if (_unknownFields != null) {
  2008. hash ^= _unknownFields.GetHashCode();
  2009. }
  2010. return hash;
  2011. }
  2012. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2013. public override string ToString() {
  2014. return pb::JsonFormatter.ToDiagnosticString(this);
  2015. }
  2016. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2017. public void WriteTo(pb::CodedOutputStream output) {
  2018. if (UseRpcForInprocessMaster != false) {
  2019. output.WriteRawTag(8);
  2020. output.WriteBool(UseRpcForInprocessMaster);
  2021. }
  2022. if (CompressionAlgorithm.Length != 0) {
  2023. output.WriteRawTag(18);
  2024. output.WriteString(CompressionAlgorithm);
  2025. }
  2026. if (CompressionLevel != 0) {
  2027. output.WriteRawTag(24);
  2028. output.WriteInt32(CompressionLevel);
  2029. }
  2030. if (_unknownFields != null) {
  2031. _unknownFields.WriteTo(output);
  2032. }
  2033. }
  2034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2035. public int CalculateSize() {
  2036. int size = 0;
  2037. if (UseRpcForInprocessMaster != false) {
  2038. size += 1 + 1;
  2039. }
  2040. if (CompressionAlgorithm.Length != 0) {
  2041. size += 1 + pb::CodedOutputStream.ComputeStringSize(CompressionAlgorithm);
  2042. }
  2043. if (CompressionLevel != 0) {
  2044. size += 1 + pb::CodedOutputStream.ComputeInt32Size(CompressionLevel);
  2045. }
  2046. if (_unknownFields != null) {
  2047. size += _unknownFields.CalculateSize();
  2048. }
  2049. return size;
  2050. }
  2051. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2052. public void MergeFrom(RPCOptions other) {
  2053. if (other == null) {
  2054. return;
  2055. }
  2056. if (other.UseRpcForInprocessMaster != false) {
  2057. UseRpcForInprocessMaster = other.UseRpcForInprocessMaster;
  2058. }
  2059. if (other.CompressionAlgorithm.Length != 0) {
  2060. CompressionAlgorithm = other.CompressionAlgorithm;
  2061. }
  2062. if (other.CompressionLevel != 0) {
  2063. CompressionLevel = other.CompressionLevel;
  2064. }
  2065. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2066. }
  2067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2068. public void MergeFrom(pb::CodedInputStream input) {
  2069. uint tag;
  2070. while ((tag = input.ReadTag()) != 0) {
  2071. switch(tag) {
  2072. default:
  2073. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2074. break;
  2075. case 8: {
  2076. UseRpcForInprocessMaster = input.ReadBool();
  2077. break;
  2078. }
  2079. case 18: {
  2080. CompressionAlgorithm = input.ReadString();
  2081. break;
  2082. }
  2083. case 24: {
  2084. CompressionLevel = input.ReadInt32();
  2085. break;
  2086. }
  2087. }
  2088. }
  2089. }
  2090. }
  2091. /// <summary>
  2092. /// Session configuration parameters.
  2093. /// The system picks appropriate values for fields that are not set.
  2094. /// </summary>
  2095. public sealed partial class ConfigProto : pb::IMessage<ConfigProto> {
  2096. private static readonly pb::MessageParser<ConfigProto> _parser = new pb::MessageParser<ConfigProto>(() => new ConfigProto());
  2097. private pb::UnknownFieldSet _unknownFields;
  2098. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2099. public static pb::MessageParser<ConfigProto> Parser { get { return _parser; } }
  2100. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2101. public static pbr::MessageDescriptor Descriptor {
  2102. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[5]; }
  2103. }
  2104. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2105. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2106. get { return Descriptor; }
  2107. }
  2108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2109. public ConfigProto() {
  2110. OnConstruction();
  2111. }
  2112. partial void OnConstruction();
  2113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2114. public ConfigProto(ConfigProto other) : this() {
  2115. deviceCount_ = other.deviceCount_.Clone();
  2116. intraOpParallelismThreads_ = other.intraOpParallelismThreads_;
  2117. interOpParallelismThreads_ = other.interOpParallelismThreads_;
  2118. usePerSessionThreads_ = other.usePerSessionThreads_;
  2119. sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_.Clone();
  2120. placementPeriod_ = other.placementPeriod_;
  2121. deviceFilters_ = other.deviceFilters_.Clone();
  2122. gpuOptions_ = other.gpuOptions_ != null ? other.gpuOptions_.Clone() : null;
  2123. allowSoftPlacement_ = other.allowSoftPlacement_;
  2124. logDevicePlacement_ = other.logDevicePlacement_;
  2125. graphOptions_ = other.graphOptions_ != null ? other.graphOptions_.Clone() : null;
  2126. operationTimeoutInMs_ = other.operationTimeoutInMs_;
  2127. rpcOptions_ = other.rpcOptions_ != null ? other.rpcOptions_.Clone() : null;
  2128. clusterDef_ = other.clusterDef_ != null ? other.clusterDef_.Clone() : null;
  2129. isolateSessionState_ = other.isolateSessionState_;
  2130. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  2131. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2132. }
  2133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2134. public ConfigProto Clone() {
  2135. return new ConfigProto(this);
  2136. }
  2137. /// <summary>Field number for the "device_count" field.</summary>
  2138. public const int DeviceCountFieldNumber = 1;
  2139. private static readonly pbc::MapField<string, int>.Codec _map_deviceCount_codec
  2140. = new pbc::MapField<string, int>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForInt32(16), 10);
  2141. private readonly pbc::MapField<string, int> deviceCount_ = new pbc::MapField<string, int>();
  2142. /// <summary>
  2143. /// Map from device type name (e.g., "CPU" or "GPU" ) to maximum
  2144. /// number of devices of that type to use. If a particular device
  2145. /// type is not found in the map, the system picks an appropriate
  2146. /// number.
  2147. /// </summary>
  2148. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2149. public pbc::MapField<string, int> DeviceCount {
  2150. get { return deviceCount_; }
  2151. }
  2152. /// <summary>Field number for the "intra_op_parallelism_threads" field.</summary>
  2153. public const int IntraOpParallelismThreadsFieldNumber = 2;
  2154. private int intraOpParallelismThreads_;
  2155. /// <summary>
  2156. /// The execution of an individual op (for some op types) can be
  2157. /// parallelized on a pool of intra_op_parallelism_threads.
  2158. /// 0 means the system picks an appropriate number.
  2159. /// </summary>
  2160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2161. public int IntraOpParallelismThreads {
  2162. get { return intraOpParallelismThreads_; }
  2163. set {
  2164. intraOpParallelismThreads_ = value;
  2165. }
  2166. }
  2167. /// <summary>Field number for the "inter_op_parallelism_threads" field.</summary>
  2168. public const int InterOpParallelismThreadsFieldNumber = 5;
  2169. private int interOpParallelismThreads_;
  2170. /// <summary>
  2171. /// Nodes that perform blocking operations are enqueued on a pool of
  2172. /// inter_op_parallelism_threads available in each process.
  2173. ///
  2174. /// 0 means the system picks an appropriate number.
  2175. /// Negative means all operations are performed in caller's thread.
  2176. ///
  2177. /// Note that the first Session created in the process sets the
  2178. /// number of threads for all future sessions unless use_per_session_threads is
  2179. /// true or session_inter_op_thread_pool is configured.
  2180. /// </summary>
  2181. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2182. public int InterOpParallelismThreads {
  2183. get { return interOpParallelismThreads_; }
  2184. set {
  2185. interOpParallelismThreads_ = value;
  2186. }
  2187. }
  2188. /// <summary>Field number for the "use_per_session_threads" field.</summary>
  2189. public const int UsePerSessionThreadsFieldNumber = 9;
  2190. private bool usePerSessionThreads_;
  2191. /// <summary>
  2192. /// If true, use a new set of threads for this session rather than the global
  2193. /// pool of threads. Only supported by direct sessions.
  2194. ///
  2195. /// If false, use the global threads created by the first session, or the
  2196. /// per-session thread pools configured by session_inter_op_thread_pool.
  2197. ///
  2198. /// This option is deprecated. The same effect can be achieved by setting
  2199. /// session_inter_op_thread_pool to have one element, whose num_threads equals
  2200. /// inter_op_parallelism_threads.
  2201. /// </summary>
  2202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2203. public bool UsePerSessionThreads {
  2204. get { return usePerSessionThreads_; }
  2205. set {
  2206. usePerSessionThreads_ = value;
  2207. }
  2208. }
  2209. /// <summary>Field number for the "session_inter_op_thread_pool" field.</summary>
  2210. public const int SessionInterOpThreadPoolFieldNumber = 12;
  2211. private static readonly pb::FieldCodec<global::Tensorflow.ThreadPoolOptionProto> _repeated_sessionInterOpThreadPool_codec
  2212. = pb::FieldCodec.ForMessage(98, global::Tensorflow.ThreadPoolOptionProto.Parser);
  2213. private readonly pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto> sessionInterOpThreadPool_ = new pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto>();
  2214. /// <summary>
  2215. /// This option is experimental - it may be replaced with a different mechanism
  2216. /// in the future.
  2217. ///
  2218. /// Configures session thread pools. If this is configured, then RunOptions for
  2219. /// a Run call can select the thread pool to use.
  2220. ///
  2221. /// The intended use is for when some session invocations need to run in a
  2222. /// background pool limited to a small number of threads:
  2223. /// - For example, a session may be configured to have one large pool (for
  2224. /// regular compute) and one small pool (for periodic, low priority work);
  2225. /// using the small pool is currently the mechanism for limiting the inter-op
  2226. /// parallelism of the low priority work. Note that it does not limit the
  2227. /// parallelism of work spawned by a single op kernel implementation.
  2228. /// - Using this setting is normally not needed in training, but may help some
  2229. /// serving use cases.
  2230. /// - It is also generally recommended to set the global_name field of this
  2231. /// proto, to avoid creating multiple large pools. It is typically better to
  2232. /// run the non-low-priority work, even across sessions, in a single large
  2233. /// pool.
  2234. /// </summary>
  2235. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2236. public pbc::RepeatedField<global::Tensorflow.ThreadPoolOptionProto> SessionInterOpThreadPool {
  2237. get { return sessionInterOpThreadPool_; }
  2238. }
  2239. /// <summary>Field number for the "placement_period" field.</summary>
  2240. public const int PlacementPeriodFieldNumber = 3;
  2241. private int placementPeriod_;
  2242. /// <summary>
  2243. /// Assignment of Nodes to Devices is recomputed every placement_period
  2244. /// steps until the system warms up (at which point the recomputation
  2245. /// typically slows down automatically).
  2246. /// </summary>
  2247. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2248. public int PlacementPeriod {
  2249. get { return placementPeriod_; }
  2250. set {
  2251. placementPeriod_ = value;
  2252. }
  2253. }
  2254. /// <summary>Field number for the "device_filters" field.</summary>
  2255. public const int DeviceFiltersFieldNumber = 4;
  2256. private static readonly pb::FieldCodec<string> _repeated_deviceFilters_codec
  2257. = pb::FieldCodec.ForString(34);
  2258. private readonly pbc::RepeatedField<string> deviceFilters_ = new pbc::RepeatedField<string>();
  2259. /// <summary>
  2260. /// When any filters are present sessions will ignore all devices which do not
  2261. /// match the filters. Each filter can be partially specified, e.g. "/job:ps"
  2262. /// "/job:worker/replica:3", etc.
  2263. /// </summary>
  2264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2265. public pbc::RepeatedField<string> DeviceFilters {
  2266. get { return deviceFilters_; }
  2267. }
  2268. /// <summary>Field number for the "gpu_options" field.</summary>
  2269. public const int GpuOptionsFieldNumber = 6;
  2270. private global::Tensorflow.GPUOptions gpuOptions_;
  2271. /// <summary>
  2272. /// Options that apply to all GPUs.
  2273. /// </summary>
  2274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2275. public global::Tensorflow.GPUOptions GpuOptions {
  2276. get { return gpuOptions_; }
  2277. set {
  2278. gpuOptions_ = value;
  2279. }
  2280. }
  2281. /// <summary>Field number for the "allow_soft_placement" field.</summary>
  2282. public const int AllowSoftPlacementFieldNumber = 7;
  2283. private bool allowSoftPlacement_;
  2284. /// <summary>
  2285. /// Whether soft placement is allowed. If allow_soft_placement is true,
  2286. /// an op will be placed on CPU if
  2287. /// 1. there's no GPU implementation for the OP
  2288. /// or
  2289. /// 2. no GPU devices are known or registered
  2290. /// or
  2291. /// 3. need to co-locate with reftype input(s) which are from CPU.
  2292. /// </summary>
  2293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2294. public bool AllowSoftPlacement {
  2295. get { return allowSoftPlacement_; }
  2296. set {
  2297. allowSoftPlacement_ = value;
  2298. }
  2299. }
  2300. /// <summary>Field number for the "log_device_placement" field.</summary>
  2301. public const int LogDevicePlacementFieldNumber = 8;
  2302. private bool logDevicePlacement_;
  2303. /// <summary>
  2304. /// Whether device placements should be logged.
  2305. /// </summary>
  2306. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2307. public bool LogDevicePlacement {
  2308. get { return logDevicePlacement_; }
  2309. set {
  2310. logDevicePlacement_ = value;
  2311. }
  2312. }
  2313. /// <summary>Field number for the "graph_options" field.</summary>
  2314. public const int GraphOptionsFieldNumber = 10;
  2315. private global::Tensorflow.GraphOptions graphOptions_;
  2316. /// <summary>
  2317. /// Options that apply to all graphs.
  2318. /// </summary>
  2319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2320. public global::Tensorflow.GraphOptions GraphOptions {
  2321. get { return graphOptions_; }
  2322. set {
  2323. graphOptions_ = value;
  2324. }
  2325. }
  2326. /// <summary>Field number for the "operation_timeout_in_ms" field.</summary>
  2327. public const int OperationTimeoutInMsFieldNumber = 11;
  2328. private long operationTimeoutInMs_;
  2329. /// <summary>
  2330. /// Global timeout for all blocking operations in this session. If non-zero,
  2331. /// and not overridden on a per-operation basis, this value will be used as the
  2332. /// deadline for all blocking operations.
  2333. /// </summary>
  2334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2335. public long OperationTimeoutInMs {
  2336. get { return operationTimeoutInMs_; }
  2337. set {
  2338. operationTimeoutInMs_ = value;
  2339. }
  2340. }
  2341. /// <summary>Field number for the "rpc_options" field.</summary>
  2342. public const int RpcOptionsFieldNumber = 13;
  2343. private global::Tensorflow.RPCOptions rpcOptions_;
  2344. /// <summary>
  2345. /// Options that apply when this session uses the distributed runtime.
  2346. /// </summary>
  2347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2348. public global::Tensorflow.RPCOptions RpcOptions {
  2349. get { return rpcOptions_; }
  2350. set {
  2351. rpcOptions_ = value;
  2352. }
  2353. }
  2354. /// <summary>Field number for the "cluster_def" field.</summary>
  2355. public const int ClusterDefFieldNumber = 14;
  2356. private global::Tensorflow.ClusterDef clusterDef_;
  2357. /// <summary>
  2358. /// Optional list of all workers to use in this session.
  2359. /// </summary>
  2360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2361. public global::Tensorflow.ClusterDef ClusterDef {
  2362. get { return clusterDef_; }
  2363. set {
  2364. clusterDef_ = value;
  2365. }
  2366. }
  2367. /// <summary>Field number for the "isolate_session_state" field.</summary>
  2368. public const int IsolateSessionStateFieldNumber = 15;
  2369. private bool isolateSessionState_;
  2370. /// <summary>
  2371. /// If true, any resources such as Variables used in the session will not be
  2372. /// shared with other sessions. However, when clusterspec propagation is
  2373. /// enabled, this field is ignored and sessions are always isolated.
  2374. /// </summary>
  2375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2376. public bool IsolateSessionState {
  2377. get { return isolateSessionState_; }
  2378. set {
  2379. isolateSessionState_ = value;
  2380. }
  2381. }
  2382. /// <summary>Field number for the "experimental" field.</summary>
  2383. public const int ExperimentalFieldNumber = 16;
  2384. private global::Tensorflow.ConfigProto.Types.Experimental experimental_;
  2385. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2386. public global::Tensorflow.ConfigProto.Types.Experimental Experimental {
  2387. get { return experimental_; }
  2388. set {
  2389. experimental_ = value;
  2390. }
  2391. }
  2392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2393. public override bool Equals(object other) {
  2394. return Equals(other as ConfigProto);
  2395. }
  2396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2397. public bool Equals(ConfigProto other) {
  2398. if (ReferenceEquals(other, null)) {
  2399. return false;
  2400. }
  2401. if (ReferenceEquals(other, this)) {
  2402. return true;
  2403. }
  2404. if (!DeviceCount.Equals(other.DeviceCount)) return false;
  2405. if (IntraOpParallelismThreads != other.IntraOpParallelismThreads) return false;
  2406. if (InterOpParallelismThreads != other.InterOpParallelismThreads) return false;
  2407. if (UsePerSessionThreads != other.UsePerSessionThreads) return false;
  2408. if(!sessionInterOpThreadPool_.Equals(other.sessionInterOpThreadPool_)) return false;
  2409. if (PlacementPeriod != other.PlacementPeriod) return false;
  2410. if(!deviceFilters_.Equals(other.deviceFilters_)) return false;
  2411. if (!object.Equals(GpuOptions, other.GpuOptions)) return false;
  2412. if (AllowSoftPlacement != other.AllowSoftPlacement) return false;
  2413. if (LogDevicePlacement != other.LogDevicePlacement) return false;
  2414. if (!object.Equals(GraphOptions, other.GraphOptions)) return false;
  2415. if (OperationTimeoutInMs != other.OperationTimeoutInMs) return false;
  2416. if (!object.Equals(RpcOptions, other.RpcOptions)) return false;
  2417. if (!object.Equals(ClusterDef, other.ClusterDef)) return false;
  2418. if (IsolateSessionState != other.IsolateSessionState) return false;
  2419. if (!object.Equals(Experimental, other.Experimental)) return false;
  2420. return Equals(_unknownFields, other._unknownFields);
  2421. }
  2422. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2423. public override int GetHashCode() {
  2424. int hash = 1;
  2425. hash ^= DeviceCount.GetHashCode();
  2426. if (IntraOpParallelismThreads != 0) hash ^= IntraOpParallelismThreads.GetHashCode();
  2427. if (InterOpParallelismThreads != 0) hash ^= InterOpParallelismThreads.GetHashCode();
  2428. if (UsePerSessionThreads != false) hash ^= UsePerSessionThreads.GetHashCode();
  2429. hash ^= sessionInterOpThreadPool_.GetHashCode();
  2430. if (PlacementPeriod != 0) hash ^= PlacementPeriod.GetHashCode();
  2431. hash ^= deviceFilters_.GetHashCode();
  2432. if (gpuOptions_ != null) hash ^= GpuOptions.GetHashCode();
  2433. if (AllowSoftPlacement != false) hash ^= AllowSoftPlacement.GetHashCode();
  2434. if (LogDevicePlacement != false) hash ^= LogDevicePlacement.GetHashCode();
  2435. if (graphOptions_ != null) hash ^= GraphOptions.GetHashCode();
  2436. if (OperationTimeoutInMs != 0L) hash ^= OperationTimeoutInMs.GetHashCode();
  2437. if (rpcOptions_ != null) hash ^= RpcOptions.GetHashCode();
  2438. if (clusterDef_ != null) hash ^= ClusterDef.GetHashCode();
  2439. if (IsolateSessionState != false) hash ^= IsolateSessionState.GetHashCode();
  2440. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  2441. if (_unknownFields != null) {
  2442. hash ^= _unknownFields.GetHashCode();
  2443. }
  2444. return hash;
  2445. }
  2446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2447. public override string ToString() {
  2448. return pb::JsonFormatter.ToDiagnosticString(this);
  2449. }
  2450. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2451. public void WriteTo(pb::CodedOutputStream output) {
  2452. deviceCount_.WriteTo(output, _map_deviceCount_codec);
  2453. if (IntraOpParallelismThreads != 0) {
  2454. output.WriteRawTag(16);
  2455. output.WriteInt32(IntraOpParallelismThreads);
  2456. }
  2457. if (PlacementPeriod != 0) {
  2458. output.WriteRawTag(24);
  2459. output.WriteInt32(PlacementPeriod);
  2460. }
  2461. deviceFilters_.WriteTo(output, _repeated_deviceFilters_codec);
  2462. if (InterOpParallelismThreads != 0) {
  2463. output.WriteRawTag(40);
  2464. output.WriteInt32(InterOpParallelismThreads);
  2465. }
  2466. if (gpuOptions_ != null) {
  2467. output.WriteRawTag(50);
  2468. output.WriteMessage(GpuOptions);
  2469. }
  2470. if (AllowSoftPlacement != false) {
  2471. output.WriteRawTag(56);
  2472. output.WriteBool(AllowSoftPlacement);
  2473. }
  2474. if (LogDevicePlacement != false) {
  2475. output.WriteRawTag(64);
  2476. output.WriteBool(LogDevicePlacement);
  2477. }
  2478. if (UsePerSessionThreads != false) {
  2479. output.WriteRawTag(72);
  2480. output.WriteBool(UsePerSessionThreads);
  2481. }
  2482. if (graphOptions_ != null) {
  2483. output.WriteRawTag(82);
  2484. output.WriteMessage(GraphOptions);
  2485. }
  2486. if (OperationTimeoutInMs != 0L) {
  2487. output.WriteRawTag(88);
  2488. output.WriteInt64(OperationTimeoutInMs);
  2489. }
  2490. sessionInterOpThreadPool_.WriteTo(output, _repeated_sessionInterOpThreadPool_codec);
  2491. if (rpcOptions_ != null) {
  2492. output.WriteRawTag(106);
  2493. output.WriteMessage(RpcOptions);
  2494. }
  2495. if (clusterDef_ != null) {
  2496. output.WriteRawTag(114);
  2497. output.WriteMessage(ClusterDef);
  2498. }
  2499. if (IsolateSessionState != false) {
  2500. output.WriteRawTag(120);
  2501. output.WriteBool(IsolateSessionState);
  2502. }
  2503. if (experimental_ != null) {
  2504. output.WriteRawTag(130, 1);
  2505. output.WriteMessage(Experimental);
  2506. }
  2507. if (_unknownFields != null) {
  2508. _unknownFields.WriteTo(output);
  2509. }
  2510. }
  2511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2512. public int CalculateSize() {
  2513. int size = 0;
  2514. size += deviceCount_.CalculateSize(_map_deviceCount_codec);
  2515. if (IntraOpParallelismThreads != 0) {
  2516. size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntraOpParallelismThreads);
  2517. }
  2518. if (InterOpParallelismThreads != 0) {
  2519. size += 1 + pb::CodedOutputStream.ComputeInt32Size(InterOpParallelismThreads);
  2520. }
  2521. if (UsePerSessionThreads != false) {
  2522. size += 1 + 1;
  2523. }
  2524. size += sessionInterOpThreadPool_.CalculateSize(_repeated_sessionInterOpThreadPool_codec);
  2525. if (PlacementPeriod != 0) {
  2526. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlacementPeriod);
  2527. }
  2528. size += deviceFilters_.CalculateSize(_repeated_deviceFilters_codec);
  2529. if (gpuOptions_ != null) {
  2530. size += 1 + pb::CodedOutputStream.ComputeMessageSize(GpuOptions);
  2531. }
  2532. if (AllowSoftPlacement != false) {
  2533. size += 1 + 1;
  2534. }
  2535. if (LogDevicePlacement != false) {
  2536. size += 1 + 1;
  2537. }
  2538. if (graphOptions_ != null) {
  2539. size += 1 + pb::CodedOutputStream.ComputeMessageSize(GraphOptions);
  2540. }
  2541. if (OperationTimeoutInMs != 0L) {
  2542. size += 1 + pb::CodedOutputStream.ComputeInt64Size(OperationTimeoutInMs);
  2543. }
  2544. if (rpcOptions_ != null) {
  2545. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RpcOptions);
  2546. }
  2547. if (clusterDef_ != null) {
  2548. size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClusterDef);
  2549. }
  2550. if (IsolateSessionState != false) {
  2551. size += 1 + 1;
  2552. }
  2553. if (experimental_ != null) {
  2554. size += 2 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  2555. }
  2556. if (_unknownFields != null) {
  2557. size += _unknownFields.CalculateSize();
  2558. }
  2559. return size;
  2560. }
  2561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2562. public void MergeFrom(ConfigProto other) {
  2563. if (other == null) {
  2564. return;
  2565. }
  2566. deviceCount_.Add(other.deviceCount_);
  2567. if (other.IntraOpParallelismThreads != 0) {
  2568. IntraOpParallelismThreads = other.IntraOpParallelismThreads;
  2569. }
  2570. if (other.InterOpParallelismThreads != 0) {
  2571. InterOpParallelismThreads = other.InterOpParallelismThreads;
  2572. }
  2573. if (other.UsePerSessionThreads != false) {
  2574. UsePerSessionThreads = other.UsePerSessionThreads;
  2575. }
  2576. sessionInterOpThreadPool_.Add(other.sessionInterOpThreadPool_);
  2577. if (other.PlacementPeriod != 0) {
  2578. PlacementPeriod = other.PlacementPeriod;
  2579. }
  2580. deviceFilters_.Add(other.deviceFilters_);
  2581. if (other.gpuOptions_ != null) {
  2582. if (gpuOptions_ == null) {
  2583. gpuOptions_ = new global::Tensorflow.GPUOptions();
  2584. }
  2585. GpuOptions.MergeFrom(other.GpuOptions);
  2586. }
  2587. if (other.AllowSoftPlacement != false) {
  2588. AllowSoftPlacement = other.AllowSoftPlacement;
  2589. }
  2590. if (other.LogDevicePlacement != false) {
  2591. LogDevicePlacement = other.LogDevicePlacement;
  2592. }
  2593. if (other.graphOptions_ != null) {
  2594. if (graphOptions_ == null) {
  2595. graphOptions_ = new global::Tensorflow.GraphOptions();
  2596. }
  2597. GraphOptions.MergeFrom(other.GraphOptions);
  2598. }
  2599. if (other.OperationTimeoutInMs != 0L) {
  2600. OperationTimeoutInMs = other.OperationTimeoutInMs;
  2601. }
  2602. if (other.rpcOptions_ != null) {
  2603. if (rpcOptions_ == null) {
  2604. rpcOptions_ = new global::Tensorflow.RPCOptions();
  2605. }
  2606. RpcOptions.MergeFrom(other.RpcOptions);
  2607. }
  2608. if (other.clusterDef_ != null) {
  2609. if (clusterDef_ == null) {
  2610. clusterDef_ = new global::Tensorflow.ClusterDef();
  2611. }
  2612. ClusterDef.MergeFrom(other.ClusterDef);
  2613. }
  2614. if (other.IsolateSessionState != false) {
  2615. IsolateSessionState = other.IsolateSessionState;
  2616. }
  2617. if (other.experimental_ != null) {
  2618. if (experimental_ == null) {
  2619. experimental_ = new global::Tensorflow.ConfigProto.Types.Experimental();
  2620. }
  2621. Experimental.MergeFrom(other.Experimental);
  2622. }
  2623. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  2624. }
  2625. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2626. public void MergeFrom(pb::CodedInputStream input) {
  2627. uint tag;
  2628. while ((tag = input.ReadTag()) != 0) {
  2629. switch(tag) {
  2630. default:
  2631. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  2632. break;
  2633. case 10: {
  2634. deviceCount_.AddEntriesFrom(input, _map_deviceCount_codec);
  2635. break;
  2636. }
  2637. case 16: {
  2638. IntraOpParallelismThreads = input.ReadInt32();
  2639. break;
  2640. }
  2641. case 24: {
  2642. PlacementPeriod = input.ReadInt32();
  2643. break;
  2644. }
  2645. case 34: {
  2646. deviceFilters_.AddEntriesFrom(input, _repeated_deviceFilters_codec);
  2647. break;
  2648. }
  2649. case 40: {
  2650. InterOpParallelismThreads = input.ReadInt32();
  2651. break;
  2652. }
  2653. case 50: {
  2654. if (gpuOptions_ == null) {
  2655. gpuOptions_ = new global::Tensorflow.GPUOptions();
  2656. }
  2657. input.ReadMessage(gpuOptions_);
  2658. break;
  2659. }
  2660. case 56: {
  2661. AllowSoftPlacement = input.ReadBool();
  2662. break;
  2663. }
  2664. case 64: {
  2665. LogDevicePlacement = input.ReadBool();
  2666. break;
  2667. }
  2668. case 72: {
  2669. UsePerSessionThreads = input.ReadBool();
  2670. break;
  2671. }
  2672. case 82: {
  2673. if (graphOptions_ == null) {
  2674. graphOptions_ = new global::Tensorflow.GraphOptions();
  2675. }
  2676. input.ReadMessage(graphOptions_);
  2677. break;
  2678. }
  2679. case 88: {
  2680. OperationTimeoutInMs = input.ReadInt64();
  2681. break;
  2682. }
  2683. case 98: {
  2684. sessionInterOpThreadPool_.AddEntriesFrom(input, _repeated_sessionInterOpThreadPool_codec);
  2685. break;
  2686. }
  2687. case 106: {
  2688. if (rpcOptions_ == null) {
  2689. rpcOptions_ = new global::Tensorflow.RPCOptions();
  2690. }
  2691. input.ReadMessage(rpcOptions_);
  2692. break;
  2693. }
  2694. case 114: {
  2695. if (clusterDef_ == null) {
  2696. clusterDef_ = new global::Tensorflow.ClusterDef();
  2697. }
  2698. input.ReadMessage(clusterDef_);
  2699. break;
  2700. }
  2701. case 120: {
  2702. IsolateSessionState = input.ReadBool();
  2703. break;
  2704. }
  2705. case 130: {
  2706. if (experimental_ == null) {
  2707. experimental_ = new global::Tensorflow.ConfigProto.Types.Experimental();
  2708. }
  2709. input.ReadMessage(experimental_);
  2710. break;
  2711. }
  2712. }
  2713. }
  2714. }
  2715. #region Nested types
  2716. /// <summary>Container for nested types declared in the ConfigProto message type.</summary>
  2717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2718. public static partial class Types {
  2719. /// <summary>
  2720. /// Everything inside Experimental is subject to change and is not subject
  2721. /// to API stability guarantees in
  2722. /// https://www.tensorflow.org/guide/version_compat.
  2723. /// </summary>
  2724. public sealed partial class Experimental : pb::IMessage<Experimental> {
  2725. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  2726. private pb::UnknownFieldSet _unknownFields;
  2727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2728. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  2729. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2730. public static pbr::MessageDescriptor Descriptor {
  2731. get { return global::Tensorflow.ConfigProto.Descriptor.NestedTypes[1]; }
  2732. }
  2733. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2734. pbr::MessageDescriptor pb::IMessage.Descriptor {
  2735. get { return Descriptor; }
  2736. }
  2737. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2738. public Experimental() {
  2739. OnConstruction();
  2740. }
  2741. partial void OnConstruction();
  2742. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2743. public Experimental(Experimental other) : this() {
  2744. collectiveGroupLeader_ = other.collectiveGroupLeader_;
  2745. executorType_ = other.executorType_;
  2746. recvBufMaxChunk_ = other.recvBufMaxChunk_;
  2747. useNumaAffinity_ = other.useNumaAffinity_;
  2748. collectiveDeterministicSequentialExecution_ = other.collectiveDeterministicSequentialExecution_;
  2749. collectiveNccl_ = other.collectiveNccl_;
  2750. shareSessionStateInClusterspecPropagation_ = other.shareSessionStateInClusterspecPropagation_;
  2751. disableThreadSpinning_ = other.disableThreadSpinning_;
  2752. shareClusterDevicesInSession_ = other.shareClusterDevicesInSession_;
  2753. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  2754. }
  2755. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2756. public Experimental Clone() {
  2757. return new Experimental(this);
  2758. }
  2759. /// <summary>Field number for the "collective_group_leader" field.</summary>
  2760. public const int CollectiveGroupLeaderFieldNumber = 1;
  2761. private string collectiveGroupLeader_ = "";
  2762. /// <summary>
  2763. /// Task name for group resolution.
  2764. /// </summary>
  2765. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2766. public string CollectiveGroupLeader {
  2767. get { return collectiveGroupLeader_; }
  2768. set {
  2769. collectiveGroupLeader_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2770. }
  2771. }
  2772. /// <summary>Field number for the "executor_type" field.</summary>
  2773. public const int ExecutorTypeFieldNumber = 3;
  2774. private string executorType_ = "";
  2775. /// <summary>
  2776. /// Which executor to use, the default executor will be used
  2777. /// if it is an empty string or "DEFAULT"
  2778. /// </summary>
  2779. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2780. public string ExecutorType {
  2781. get { return executorType_; }
  2782. set {
  2783. executorType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  2784. }
  2785. }
  2786. /// <summary>Field number for the "recv_buf_max_chunk" field.</summary>
  2787. public const int RecvBufMaxChunkFieldNumber = 4;
  2788. private int recvBufMaxChunk_;
  2789. /// <summary>
  2790. /// Guidance to formatting of large RecvBuf fields for transfer.
  2791. /// Any positive value sets the max chunk size. 0 defaults to 4096.
  2792. /// Any negative value indicates no max, i.e. one chunk only.
  2793. /// </summary>
  2794. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2795. public int RecvBufMaxChunk {
  2796. get { return recvBufMaxChunk_; }
  2797. set {
  2798. recvBufMaxChunk_ = value;
  2799. }
  2800. }
  2801. /// <summary>Field number for the "use_numa_affinity" field.</summary>
  2802. public const int UseNumaAffinityFieldNumber = 5;
  2803. private bool useNumaAffinity_;
  2804. /// <summary>
  2805. /// If true, and supported by the platform, the runtime will attempt to
  2806. /// use NUMA affinity where applicable. One consequence will be the
  2807. /// existence of as many CPU devices as there are available NUMA nodes.
  2808. /// </summary>
  2809. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2810. public bool UseNumaAffinity {
  2811. get { return useNumaAffinity_; }
  2812. set {
  2813. useNumaAffinity_ = value;
  2814. }
  2815. }
  2816. /// <summary>Field number for the "collective_deterministic_sequential_execution" field.</summary>
  2817. public const int CollectiveDeterministicSequentialExecutionFieldNumber = 6;
  2818. private bool collectiveDeterministicSequentialExecution_;
  2819. /// <summary>
  2820. /// If true, make collective op execution order sequential and deterministic
  2821. /// for potentially concurrent collective instances.
  2822. /// </summary>
  2823. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2824. public bool CollectiveDeterministicSequentialExecution {
  2825. get { return collectiveDeterministicSequentialExecution_; }
  2826. set {
  2827. collectiveDeterministicSequentialExecution_ = value;
  2828. }
  2829. }
  2830. /// <summary>Field number for the "collective_nccl" field.</summary>
  2831. public const int CollectiveNcclFieldNumber = 7;
  2832. private bool collectiveNccl_;
  2833. /// <summary>
  2834. /// If true, use NCCL for CollectiveOps. This feature is highly
  2835. /// experimental.
  2836. /// </summary>
  2837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2838. public bool CollectiveNccl {
  2839. get { return collectiveNccl_; }
  2840. set {
  2841. collectiveNccl_ = value;
  2842. }
  2843. }
  2844. /// <summary>Field number for the "share_session_state_in_clusterspec_propagation" field.</summary>
  2845. public const int ShareSessionStateInClusterspecPropagationFieldNumber = 8;
  2846. private bool shareSessionStateInClusterspecPropagation_;
  2847. /// <summary>
  2848. /// In the following, session state means the value of a variable, elements
  2849. /// in a hash table, or any other resource, accessible by worker sessions
  2850. /// held by a TF server.
  2851. ///
  2852. /// When ClusterSpec propagation is enabled, the value of
  2853. /// isolate_session_state is ignored when deciding whether to share session
  2854. /// states in a TF server (for backwards compatibility reasons).
  2855. /// - If share_session_state_in_clusterspec_propagation is true, the session
  2856. /// states are shared.
  2857. /// - If share_session_state_in_clusterspec_propagation is false, session
  2858. /// states are isolated.
  2859. ///
  2860. /// When clusterspec propagation is not used, the value of
  2861. /// share_session_state_in_clusterspec_propagation is ignored when deciding
  2862. /// whether to share session states in a TF server.
  2863. /// - If isolate_session_state is true, session states are isolated.
  2864. /// - If isolate_session_state is false, session states are shared.
  2865. ///
  2866. /// TODO(b/129330037): Add a single API that consistently treats
  2867. /// isolate_session_state and ClusterSpec propagation.
  2868. /// </summary>
  2869. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2870. public bool ShareSessionStateInClusterspecPropagation {
  2871. get { return shareSessionStateInClusterspecPropagation_; }
  2872. set {
  2873. shareSessionStateInClusterspecPropagation_ = value;
  2874. }
  2875. }
  2876. /// <summary>Field number for the "disable_thread_spinning" field.</summary>
  2877. public const int DisableThreadSpinningFieldNumber = 9;
  2878. private bool disableThreadSpinning_;
  2879. /// <summary>
  2880. /// If using a direct session, disable spinning while waiting for work in
  2881. /// the thread pool. This may result in higher latency for completing ops,
  2882. /// but in the case where there is a lot of spinning may result in lower
  2883. /// CPU usage.
  2884. /// </summary>
  2885. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2886. public bool DisableThreadSpinning {
  2887. get { return disableThreadSpinning_; }
  2888. set {
  2889. disableThreadSpinning_ = value;
  2890. }
  2891. }
  2892. /// <summary>Field number for the "share_cluster_devices_in_session" field.</summary>
  2893. public const int ShareClusterDevicesInSessionFieldNumber = 10;
  2894. private bool shareClusterDevicesInSession_;
  2895. /// <summary>
  2896. /// When true, WorkerSessions are created with device attributes from the
  2897. /// full cluster.
  2898. /// This is helpful when a worker wants to partition a graph
  2899. /// (for example during a PartitionedCallOp).
  2900. /// </summary>
  2901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2902. public bool ShareClusterDevicesInSession {
  2903. get { return shareClusterDevicesInSession_; }
  2904. set {
  2905. shareClusterDevicesInSession_ = value;
  2906. }
  2907. }
  2908. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2909. public override bool Equals(object other) {
  2910. return Equals(other as Experimental);
  2911. }
  2912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2913. public bool Equals(Experimental other) {
  2914. if (ReferenceEquals(other, null)) {
  2915. return false;
  2916. }
  2917. if (ReferenceEquals(other, this)) {
  2918. return true;
  2919. }
  2920. if (CollectiveGroupLeader != other.CollectiveGroupLeader) return false;
  2921. if (ExecutorType != other.ExecutorType) return false;
  2922. if (RecvBufMaxChunk != other.RecvBufMaxChunk) return false;
  2923. if (UseNumaAffinity != other.UseNumaAffinity) return false;
  2924. if (CollectiveDeterministicSequentialExecution != other.CollectiveDeterministicSequentialExecution) return false;
  2925. if (CollectiveNccl != other.CollectiveNccl) return false;
  2926. if (ShareSessionStateInClusterspecPropagation != other.ShareSessionStateInClusterspecPropagation) return false;
  2927. if (DisableThreadSpinning != other.DisableThreadSpinning) return false;
  2928. if (ShareClusterDevicesInSession != other.ShareClusterDevicesInSession) return false;
  2929. return Equals(_unknownFields, other._unknownFields);
  2930. }
  2931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2932. public override int GetHashCode() {
  2933. int hash = 1;
  2934. if (CollectiveGroupLeader.Length != 0) hash ^= CollectiveGroupLeader.GetHashCode();
  2935. if (ExecutorType.Length != 0) hash ^= ExecutorType.GetHashCode();
  2936. if (RecvBufMaxChunk != 0) hash ^= RecvBufMaxChunk.GetHashCode();
  2937. if (UseNumaAffinity != false) hash ^= UseNumaAffinity.GetHashCode();
  2938. if (CollectiveDeterministicSequentialExecution != false) hash ^= CollectiveDeterministicSequentialExecution.GetHashCode();
  2939. if (CollectiveNccl != false) hash ^= CollectiveNccl.GetHashCode();
  2940. if (ShareSessionStateInClusterspecPropagation != false) hash ^= ShareSessionStateInClusterspecPropagation.GetHashCode();
  2941. if (DisableThreadSpinning != false) hash ^= DisableThreadSpinning.GetHashCode();
  2942. if (ShareClusterDevicesInSession != false) hash ^= ShareClusterDevicesInSession.GetHashCode();
  2943. if (_unknownFields != null) {
  2944. hash ^= _unknownFields.GetHashCode();
  2945. }
  2946. return hash;
  2947. }
  2948. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2949. public override string ToString() {
  2950. return pb::JsonFormatter.ToDiagnosticString(this);
  2951. }
  2952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2953. public void WriteTo(pb::CodedOutputStream output) {
  2954. if (CollectiveGroupLeader.Length != 0) {
  2955. output.WriteRawTag(10);
  2956. output.WriteString(CollectiveGroupLeader);
  2957. }
  2958. if (ExecutorType.Length != 0) {
  2959. output.WriteRawTag(26);
  2960. output.WriteString(ExecutorType);
  2961. }
  2962. if (RecvBufMaxChunk != 0) {
  2963. output.WriteRawTag(32);
  2964. output.WriteInt32(RecvBufMaxChunk);
  2965. }
  2966. if (UseNumaAffinity != false) {
  2967. output.WriteRawTag(40);
  2968. output.WriteBool(UseNumaAffinity);
  2969. }
  2970. if (CollectiveDeterministicSequentialExecution != false) {
  2971. output.WriteRawTag(48);
  2972. output.WriteBool(CollectiveDeterministicSequentialExecution);
  2973. }
  2974. if (CollectiveNccl != false) {
  2975. output.WriteRawTag(56);
  2976. output.WriteBool(CollectiveNccl);
  2977. }
  2978. if (ShareSessionStateInClusterspecPropagation != false) {
  2979. output.WriteRawTag(64);
  2980. output.WriteBool(ShareSessionStateInClusterspecPropagation);
  2981. }
  2982. if (DisableThreadSpinning != false) {
  2983. output.WriteRawTag(72);
  2984. output.WriteBool(DisableThreadSpinning);
  2985. }
  2986. if (ShareClusterDevicesInSession != false) {
  2987. output.WriteRawTag(80);
  2988. output.WriteBool(ShareClusterDevicesInSession);
  2989. }
  2990. if (_unknownFields != null) {
  2991. _unknownFields.WriteTo(output);
  2992. }
  2993. }
  2994. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  2995. public int CalculateSize() {
  2996. int size = 0;
  2997. if (CollectiveGroupLeader.Length != 0) {
  2998. size += 1 + pb::CodedOutputStream.ComputeStringSize(CollectiveGroupLeader);
  2999. }
  3000. if (ExecutorType.Length != 0) {
  3001. size += 1 + pb::CodedOutputStream.ComputeStringSize(ExecutorType);
  3002. }
  3003. if (RecvBufMaxChunk != 0) {
  3004. size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecvBufMaxChunk);
  3005. }
  3006. if (UseNumaAffinity != false) {
  3007. size += 1 + 1;
  3008. }
  3009. if (CollectiveDeterministicSequentialExecution != false) {
  3010. size += 1 + 1;
  3011. }
  3012. if (CollectiveNccl != false) {
  3013. size += 1 + 1;
  3014. }
  3015. if (ShareSessionStateInClusterspecPropagation != false) {
  3016. size += 1 + 1;
  3017. }
  3018. if (DisableThreadSpinning != false) {
  3019. size += 1 + 1;
  3020. }
  3021. if (ShareClusterDevicesInSession != false) {
  3022. size += 1 + 1;
  3023. }
  3024. if (_unknownFields != null) {
  3025. size += _unknownFields.CalculateSize();
  3026. }
  3027. return size;
  3028. }
  3029. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3030. public void MergeFrom(Experimental other) {
  3031. if (other == null) {
  3032. return;
  3033. }
  3034. if (other.CollectiveGroupLeader.Length != 0) {
  3035. CollectiveGroupLeader = other.CollectiveGroupLeader;
  3036. }
  3037. if (other.ExecutorType.Length != 0) {
  3038. ExecutorType = other.ExecutorType;
  3039. }
  3040. if (other.RecvBufMaxChunk != 0) {
  3041. RecvBufMaxChunk = other.RecvBufMaxChunk;
  3042. }
  3043. if (other.UseNumaAffinity != false) {
  3044. UseNumaAffinity = other.UseNumaAffinity;
  3045. }
  3046. if (other.CollectiveDeterministicSequentialExecution != false) {
  3047. CollectiveDeterministicSequentialExecution = other.CollectiveDeterministicSequentialExecution;
  3048. }
  3049. if (other.CollectiveNccl != false) {
  3050. CollectiveNccl = other.CollectiveNccl;
  3051. }
  3052. if (other.ShareSessionStateInClusterspecPropagation != false) {
  3053. ShareSessionStateInClusterspecPropagation = other.ShareSessionStateInClusterspecPropagation;
  3054. }
  3055. if (other.DisableThreadSpinning != false) {
  3056. DisableThreadSpinning = other.DisableThreadSpinning;
  3057. }
  3058. if (other.ShareClusterDevicesInSession != false) {
  3059. ShareClusterDevicesInSession = other.ShareClusterDevicesInSession;
  3060. }
  3061. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3062. }
  3063. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3064. public void MergeFrom(pb::CodedInputStream input) {
  3065. uint tag;
  3066. while ((tag = input.ReadTag()) != 0) {
  3067. switch(tag) {
  3068. default:
  3069. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3070. break;
  3071. case 10: {
  3072. CollectiveGroupLeader = input.ReadString();
  3073. break;
  3074. }
  3075. case 26: {
  3076. ExecutorType = input.ReadString();
  3077. break;
  3078. }
  3079. case 32: {
  3080. RecvBufMaxChunk = input.ReadInt32();
  3081. break;
  3082. }
  3083. case 40: {
  3084. UseNumaAffinity = input.ReadBool();
  3085. break;
  3086. }
  3087. case 48: {
  3088. CollectiveDeterministicSequentialExecution = input.ReadBool();
  3089. break;
  3090. }
  3091. case 56: {
  3092. CollectiveNccl = input.ReadBool();
  3093. break;
  3094. }
  3095. case 64: {
  3096. ShareSessionStateInClusterspecPropagation = input.ReadBool();
  3097. break;
  3098. }
  3099. case 72: {
  3100. DisableThreadSpinning = input.ReadBool();
  3101. break;
  3102. }
  3103. case 80: {
  3104. ShareClusterDevicesInSession = input.ReadBool();
  3105. break;
  3106. }
  3107. }
  3108. }
  3109. }
  3110. }
  3111. }
  3112. #endregion
  3113. }
  3114. /// <summary>
  3115. /// Options for a single Run() call.
  3116. /// </summary>
  3117. public sealed partial class RunOptions : pb::IMessage<RunOptions> {
  3118. private static readonly pb::MessageParser<RunOptions> _parser = new pb::MessageParser<RunOptions>(() => new RunOptions());
  3119. private pb::UnknownFieldSet _unknownFields;
  3120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3121. public static pb::MessageParser<RunOptions> Parser { get { return _parser; } }
  3122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3123. public static pbr::MessageDescriptor Descriptor {
  3124. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[6]; }
  3125. }
  3126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3127. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3128. get { return Descriptor; }
  3129. }
  3130. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3131. public RunOptions() {
  3132. OnConstruction();
  3133. }
  3134. partial void OnConstruction();
  3135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3136. public RunOptions(RunOptions other) : this() {
  3137. traceLevel_ = other.traceLevel_;
  3138. timeoutInMs_ = other.timeoutInMs_;
  3139. interOpThreadPool_ = other.interOpThreadPool_;
  3140. outputPartitionGraphs_ = other.outputPartitionGraphs_;
  3141. debugOptions_ = other.debugOptions_ != null ? other.debugOptions_.Clone() : null;
  3142. reportTensorAllocationsUponOom_ = other.reportTensorAllocationsUponOom_;
  3143. experimental_ = other.experimental_ != null ? other.experimental_.Clone() : null;
  3144. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3145. }
  3146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3147. public RunOptions Clone() {
  3148. return new RunOptions(this);
  3149. }
  3150. /// <summary>Field number for the "trace_level" field.</summary>
  3151. public const int TraceLevelFieldNumber = 1;
  3152. private global::Tensorflow.RunOptions.Types.TraceLevel traceLevel_ = 0;
  3153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3154. public global::Tensorflow.RunOptions.Types.TraceLevel TraceLevel {
  3155. get { return traceLevel_; }
  3156. set {
  3157. traceLevel_ = value;
  3158. }
  3159. }
  3160. /// <summary>Field number for the "timeout_in_ms" field.</summary>
  3161. public const int TimeoutInMsFieldNumber = 2;
  3162. private long timeoutInMs_;
  3163. /// <summary>
  3164. /// Time to wait for operation to complete in milliseconds.
  3165. /// </summary>
  3166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3167. public long TimeoutInMs {
  3168. get { return timeoutInMs_; }
  3169. set {
  3170. timeoutInMs_ = value;
  3171. }
  3172. }
  3173. /// <summary>Field number for the "inter_op_thread_pool" field.</summary>
  3174. public const int InterOpThreadPoolFieldNumber = 3;
  3175. private int interOpThreadPool_;
  3176. /// <summary>
  3177. /// The thread pool to use, if session_inter_op_thread_pool is configured.
  3178. /// To use the caller thread set this to -1 - this uses the caller thread
  3179. /// to execute Session::Run() and thus avoids a context switch. Using the
  3180. /// caller thread to execute Session::Run() should be done ONLY for simple
  3181. /// graphs, where the overhead of an additional context switch is
  3182. /// comparable with the overhead of Session::Run().
  3183. /// </summary>
  3184. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3185. public int InterOpThreadPool {
  3186. get { return interOpThreadPool_; }
  3187. set {
  3188. interOpThreadPool_ = value;
  3189. }
  3190. }
  3191. /// <summary>Field number for the "output_partition_graphs" field.</summary>
  3192. public const int OutputPartitionGraphsFieldNumber = 5;
  3193. private bool outputPartitionGraphs_;
  3194. /// <summary>
  3195. /// Whether the partition graph(s) executed by the executor(s) should be
  3196. /// outputted via RunMetadata.
  3197. /// </summary>
  3198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3199. public bool OutputPartitionGraphs {
  3200. get { return outputPartitionGraphs_; }
  3201. set {
  3202. outputPartitionGraphs_ = value;
  3203. }
  3204. }
  3205. /// <summary>Field number for the "debug_options" field.</summary>
  3206. public const int DebugOptionsFieldNumber = 6;
  3207. private global::Tensorflow.DebugOptions debugOptions_;
  3208. /// <summary>
  3209. /// EXPERIMENTAL. Options used to initialize DebuggerState, if enabled.
  3210. /// </summary>
  3211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3212. public global::Tensorflow.DebugOptions DebugOptions {
  3213. get { return debugOptions_; }
  3214. set {
  3215. debugOptions_ = value;
  3216. }
  3217. }
  3218. /// <summary>Field number for the "report_tensor_allocations_upon_oom" field.</summary>
  3219. public const int ReportTensorAllocationsUponOomFieldNumber = 7;
  3220. private bool reportTensorAllocationsUponOom_;
  3221. /// <summary>
  3222. /// When enabled, causes tensor allocation information to be included in
  3223. /// the error message when the Run() call fails because the allocator ran
  3224. /// out of memory (OOM).
  3225. ///
  3226. /// Enabling this option can slow down the Run() call.
  3227. /// </summary>
  3228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3229. public bool ReportTensorAllocationsUponOom {
  3230. get { return reportTensorAllocationsUponOom_; }
  3231. set {
  3232. reportTensorAllocationsUponOom_ = value;
  3233. }
  3234. }
  3235. /// <summary>Field number for the "experimental" field.</summary>
  3236. public const int ExperimentalFieldNumber = 8;
  3237. private global::Tensorflow.RunOptions.Types.Experimental experimental_;
  3238. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3239. public global::Tensorflow.RunOptions.Types.Experimental Experimental {
  3240. get { return experimental_; }
  3241. set {
  3242. experimental_ = value;
  3243. }
  3244. }
  3245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3246. public override bool Equals(object other) {
  3247. return Equals(other as RunOptions);
  3248. }
  3249. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3250. public bool Equals(RunOptions other) {
  3251. if (ReferenceEquals(other, null)) {
  3252. return false;
  3253. }
  3254. if (ReferenceEquals(other, this)) {
  3255. return true;
  3256. }
  3257. if (TraceLevel != other.TraceLevel) return false;
  3258. if (TimeoutInMs != other.TimeoutInMs) return false;
  3259. if (InterOpThreadPool != other.InterOpThreadPool) return false;
  3260. if (OutputPartitionGraphs != other.OutputPartitionGraphs) return false;
  3261. if (!object.Equals(DebugOptions, other.DebugOptions)) return false;
  3262. if (ReportTensorAllocationsUponOom != other.ReportTensorAllocationsUponOom) return false;
  3263. if (!object.Equals(Experimental, other.Experimental)) return false;
  3264. return Equals(_unknownFields, other._unknownFields);
  3265. }
  3266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3267. public override int GetHashCode() {
  3268. int hash = 1;
  3269. if (TraceLevel != 0) hash ^= TraceLevel.GetHashCode();
  3270. if (TimeoutInMs != 0L) hash ^= TimeoutInMs.GetHashCode();
  3271. if (InterOpThreadPool != 0) hash ^= InterOpThreadPool.GetHashCode();
  3272. if (OutputPartitionGraphs != false) hash ^= OutputPartitionGraphs.GetHashCode();
  3273. if (debugOptions_ != null) hash ^= DebugOptions.GetHashCode();
  3274. if (ReportTensorAllocationsUponOom != false) hash ^= ReportTensorAllocationsUponOom.GetHashCode();
  3275. if (experimental_ != null) hash ^= Experimental.GetHashCode();
  3276. if (_unknownFields != null) {
  3277. hash ^= _unknownFields.GetHashCode();
  3278. }
  3279. return hash;
  3280. }
  3281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3282. public override string ToString() {
  3283. return pb::JsonFormatter.ToDiagnosticString(this);
  3284. }
  3285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3286. public void WriteTo(pb::CodedOutputStream output) {
  3287. if (TraceLevel != 0) {
  3288. output.WriteRawTag(8);
  3289. output.WriteEnum((int) TraceLevel);
  3290. }
  3291. if (TimeoutInMs != 0L) {
  3292. output.WriteRawTag(16);
  3293. output.WriteInt64(TimeoutInMs);
  3294. }
  3295. if (InterOpThreadPool != 0) {
  3296. output.WriteRawTag(24);
  3297. output.WriteInt32(InterOpThreadPool);
  3298. }
  3299. if (OutputPartitionGraphs != false) {
  3300. output.WriteRawTag(40);
  3301. output.WriteBool(OutputPartitionGraphs);
  3302. }
  3303. if (debugOptions_ != null) {
  3304. output.WriteRawTag(50);
  3305. output.WriteMessage(DebugOptions);
  3306. }
  3307. if (ReportTensorAllocationsUponOom != false) {
  3308. output.WriteRawTag(56);
  3309. output.WriteBool(ReportTensorAllocationsUponOom);
  3310. }
  3311. if (experimental_ != null) {
  3312. output.WriteRawTag(66);
  3313. output.WriteMessage(Experimental);
  3314. }
  3315. if (_unknownFields != null) {
  3316. _unknownFields.WriteTo(output);
  3317. }
  3318. }
  3319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3320. public int CalculateSize() {
  3321. int size = 0;
  3322. if (TraceLevel != 0) {
  3323. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TraceLevel);
  3324. }
  3325. if (TimeoutInMs != 0L) {
  3326. size += 1 + pb::CodedOutputStream.ComputeInt64Size(TimeoutInMs);
  3327. }
  3328. if (InterOpThreadPool != 0) {
  3329. size += 1 + pb::CodedOutputStream.ComputeInt32Size(InterOpThreadPool);
  3330. }
  3331. if (OutputPartitionGraphs != false) {
  3332. size += 1 + 1;
  3333. }
  3334. if (debugOptions_ != null) {
  3335. size += 1 + pb::CodedOutputStream.ComputeMessageSize(DebugOptions);
  3336. }
  3337. if (ReportTensorAllocationsUponOom != false) {
  3338. size += 1 + 1;
  3339. }
  3340. if (experimental_ != null) {
  3341. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Experimental);
  3342. }
  3343. if (_unknownFields != null) {
  3344. size += _unknownFields.CalculateSize();
  3345. }
  3346. return size;
  3347. }
  3348. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3349. public void MergeFrom(RunOptions other) {
  3350. if (other == null) {
  3351. return;
  3352. }
  3353. if (other.TraceLevel != 0) {
  3354. TraceLevel = other.TraceLevel;
  3355. }
  3356. if (other.TimeoutInMs != 0L) {
  3357. TimeoutInMs = other.TimeoutInMs;
  3358. }
  3359. if (other.InterOpThreadPool != 0) {
  3360. InterOpThreadPool = other.InterOpThreadPool;
  3361. }
  3362. if (other.OutputPartitionGraphs != false) {
  3363. OutputPartitionGraphs = other.OutputPartitionGraphs;
  3364. }
  3365. if (other.debugOptions_ != null) {
  3366. if (debugOptions_ == null) {
  3367. debugOptions_ = new global::Tensorflow.DebugOptions();
  3368. }
  3369. DebugOptions.MergeFrom(other.DebugOptions);
  3370. }
  3371. if (other.ReportTensorAllocationsUponOom != false) {
  3372. ReportTensorAllocationsUponOom = other.ReportTensorAllocationsUponOom;
  3373. }
  3374. if (other.experimental_ != null) {
  3375. if (experimental_ == null) {
  3376. experimental_ = new global::Tensorflow.RunOptions.Types.Experimental();
  3377. }
  3378. Experimental.MergeFrom(other.Experimental);
  3379. }
  3380. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3381. }
  3382. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3383. public void MergeFrom(pb::CodedInputStream input) {
  3384. uint tag;
  3385. while ((tag = input.ReadTag()) != 0) {
  3386. switch(tag) {
  3387. default:
  3388. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3389. break;
  3390. case 8: {
  3391. traceLevel_ = (global::Tensorflow.RunOptions.Types.TraceLevel) input.ReadEnum();
  3392. break;
  3393. }
  3394. case 16: {
  3395. TimeoutInMs = input.ReadInt64();
  3396. break;
  3397. }
  3398. case 24: {
  3399. InterOpThreadPool = input.ReadInt32();
  3400. break;
  3401. }
  3402. case 40: {
  3403. OutputPartitionGraphs = input.ReadBool();
  3404. break;
  3405. }
  3406. case 50: {
  3407. if (debugOptions_ == null) {
  3408. debugOptions_ = new global::Tensorflow.DebugOptions();
  3409. }
  3410. input.ReadMessage(debugOptions_);
  3411. break;
  3412. }
  3413. case 56: {
  3414. ReportTensorAllocationsUponOom = input.ReadBool();
  3415. break;
  3416. }
  3417. case 66: {
  3418. if (experimental_ == null) {
  3419. experimental_ = new global::Tensorflow.RunOptions.Types.Experimental();
  3420. }
  3421. input.ReadMessage(experimental_);
  3422. break;
  3423. }
  3424. }
  3425. }
  3426. }
  3427. #region Nested types
  3428. /// <summary>Container for nested types declared in the RunOptions message type.</summary>
  3429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3430. public static partial class Types {
  3431. /// <summary>
  3432. /// TODO(pbar) Turn this into a TraceOptions proto which allows
  3433. /// tracing to be controlled in a more orthogonal manner?
  3434. /// </summary>
  3435. public enum TraceLevel {
  3436. [pbr::OriginalName("NO_TRACE")] NoTrace = 0,
  3437. [pbr::OriginalName("SOFTWARE_TRACE")] SoftwareTrace = 1,
  3438. [pbr::OriginalName("HARDWARE_TRACE")] HardwareTrace = 2,
  3439. [pbr::OriginalName("FULL_TRACE")] FullTrace = 3,
  3440. }
  3441. /// <summary>
  3442. /// Everything inside Experimental is subject to change and is not subject
  3443. /// to API stability guarantees in
  3444. /// https://www.tensorflow.org/guide/version_compat.
  3445. /// </summary>
  3446. public sealed partial class Experimental : pb::IMessage<Experimental> {
  3447. private static readonly pb::MessageParser<Experimental> _parser = new pb::MessageParser<Experimental>(() => new Experimental());
  3448. private pb::UnknownFieldSet _unknownFields;
  3449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3450. public static pb::MessageParser<Experimental> Parser { get { return _parser; } }
  3451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3452. public static pbr::MessageDescriptor Descriptor {
  3453. get { return global::Tensorflow.RunOptions.Descriptor.NestedTypes[0]; }
  3454. }
  3455. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3456. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3457. get { return Descriptor; }
  3458. }
  3459. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3460. public Experimental() {
  3461. OnConstruction();
  3462. }
  3463. partial void OnConstruction();
  3464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3465. public Experimental(Experimental other) : this() {
  3466. collectiveGraphKey_ = other.collectiveGraphKey_;
  3467. useRunHandlerPool_ = other.useRunHandlerPool_;
  3468. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3469. }
  3470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3471. public Experimental Clone() {
  3472. return new Experimental(this);
  3473. }
  3474. /// <summary>Field number for the "collective_graph_key" field.</summary>
  3475. public const int CollectiveGraphKeyFieldNumber = 1;
  3476. private long collectiveGraphKey_;
  3477. /// <summary>
  3478. /// If non-zero, declares that this graph is going to use collective
  3479. /// ops and must synchronize step_ids with any other graph with this
  3480. /// same group_key value (in a distributed computation where tasks
  3481. /// run disjoint graphs).
  3482. /// </summary>
  3483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3484. public long CollectiveGraphKey {
  3485. get { return collectiveGraphKey_; }
  3486. set {
  3487. collectiveGraphKey_ = value;
  3488. }
  3489. }
  3490. /// <summary>Field number for the "use_run_handler_pool" field.</summary>
  3491. public const int UseRunHandlerPoolFieldNumber = 2;
  3492. private bool useRunHandlerPool_;
  3493. /// <summary>
  3494. /// If true, then operations (using the inter-op pool) across all
  3495. /// session::run() calls will be centrally scheduled, optimizing for (median
  3496. /// and tail) latency.
  3497. /// Consider using this option for CPU-bound workloads like inference.
  3498. /// </summary>
  3499. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3500. public bool UseRunHandlerPool {
  3501. get { return useRunHandlerPool_; }
  3502. set {
  3503. useRunHandlerPool_ = value;
  3504. }
  3505. }
  3506. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3507. public override bool Equals(object other) {
  3508. return Equals(other as Experimental);
  3509. }
  3510. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3511. public bool Equals(Experimental other) {
  3512. if (ReferenceEquals(other, null)) {
  3513. return false;
  3514. }
  3515. if (ReferenceEquals(other, this)) {
  3516. return true;
  3517. }
  3518. if (CollectiveGraphKey != other.CollectiveGraphKey) return false;
  3519. if (UseRunHandlerPool != other.UseRunHandlerPool) return false;
  3520. return Equals(_unknownFields, other._unknownFields);
  3521. }
  3522. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3523. public override int GetHashCode() {
  3524. int hash = 1;
  3525. if (CollectiveGraphKey != 0L) hash ^= CollectiveGraphKey.GetHashCode();
  3526. if (UseRunHandlerPool != false) hash ^= UseRunHandlerPool.GetHashCode();
  3527. if (_unknownFields != null) {
  3528. hash ^= _unknownFields.GetHashCode();
  3529. }
  3530. return hash;
  3531. }
  3532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3533. public override string ToString() {
  3534. return pb::JsonFormatter.ToDiagnosticString(this);
  3535. }
  3536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3537. public void WriteTo(pb::CodedOutputStream output) {
  3538. if (CollectiveGraphKey != 0L) {
  3539. output.WriteRawTag(8);
  3540. output.WriteInt64(CollectiveGraphKey);
  3541. }
  3542. if (UseRunHandlerPool != false) {
  3543. output.WriteRawTag(16);
  3544. output.WriteBool(UseRunHandlerPool);
  3545. }
  3546. if (_unknownFields != null) {
  3547. _unknownFields.WriteTo(output);
  3548. }
  3549. }
  3550. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3551. public int CalculateSize() {
  3552. int size = 0;
  3553. if (CollectiveGraphKey != 0L) {
  3554. size += 1 + pb::CodedOutputStream.ComputeInt64Size(CollectiveGraphKey);
  3555. }
  3556. if (UseRunHandlerPool != false) {
  3557. size += 1 + 1;
  3558. }
  3559. if (_unknownFields != null) {
  3560. size += _unknownFields.CalculateSize();
  3561. }
  3562. return size;
  3563. }
  3564. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3565. public void MergeFrom(Experimental other) {
  3566. if (other == null) {
  3567. return;
  3568. }
  3569. if (other.CollectiveGraphKey != 0L) {
  3570. CollectiveGraphKey = other.CollectiveGraphKey;
  3571. }
  3572. if (other.UseRunHandlerPool != false) {
  3573. UseRunHandlerPool = other.UseRunHandlerPool;
  3574. }
  3575. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3576. }
  3577. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3578. public void MergeFrom(pb::CodedInputStream input) {
  3579. uint tag;
  3580. while ((tag = input.ReadTag()) != 0) {
  3581. switch(tag) {
  3582. default:
  3583. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3584. break;
  3585. case 8: {
  3586. CollectiveGraphKey = input.ReadInt64();
  3587. break;
  3588. }
  3589. case 16: {
  3590. UseRunHandlerPool = input.ReadBool();
  3591. break;
  3592. }
  3593. }
  3594. }
  3595. }
  3596. }
  3597. }
  3598. #endregion
  3599. }
  3600. /// <summary>
  3601. /// Metadata output (i.e., non-Tensor) for a single Run() call.
  3602. /// </summary>
  3603. public sealed partial class RunMetadata : pb::IMessage<RunMetadata> {
  3604. private static readonly pb::MessageParser<RunMetadata> _parser = new pb::MessageParser<RunMetadata>(() => new RunMetadata());
  3605. private pb::UnknownFieldSet _unknownFields;
  3606. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3607. public static pb::MessageParser<RunMetadata> Parser { get { return _parser; } }
  3608. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3609. public static pbr::MessageDescriptor Descriptor {
  3610. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[7]; }
  3611. }
  3612. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3613. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3614. get { return Descriptor; }
  3615. }
  3616. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3617. public RunMetadata() {
  3618. OnConstruction();
  3619. }
  3620. partial void OnConstruction();
  3621. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3622. public RunMetadata(RunMetadata other) : this() {
  3623. stepStats_ = other.stepStats_ != null ? other.stepStats_.Clone() : null;
  3624. costGraph_ = other.costGraph_ != null ? other.costGraph_.Clone() : null;
  3625. partitionGraphs_ = other.partitionGraphs_.Clone();
  3626. functionGraphs_ = other.functionGraphs_.Clone();
  3627. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3628. }
  3629. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3630. public RunMetadata Clone() {
  3631. return new RunMetadata(this);
  3632. }
  3633. /// <summary>Field number for the "step_stats" field.</summary>
  3634. public const int StepStatsFieldNumber = 1;
  3635. private global::Tensorflow.StepStats stepStats_;
  3636. /// <summary>
  3637. /// Statistics traced for this step. Populated if tracing is turned on via the
  3638. /// "RunOptions" proto.
  3639. /// EXPERIMENTAL: The format and set of events may change in future versions.
  3640. /// </summary>
  3641. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3642. public global::Tensorflow.StepStats StepStats {
  3643. get { return stepStats_; }
  3644. set {
  3645. stepStats_ = value;
  3646. }
  3647. }
  3648. /// <summary>Field number for the "cost_graph" field.</summary>
  3649. public const int CostGraphFieldNumber = 2;
  3650. private global::Tensorflow.CostGraphDef costGraph_;
  3651. /// <summary>
  3652. /// The cost graph for the computation defined by the run call.
  3653. /// </summary>
  3654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3655. public global::Tensorflow.CostGraphDef CostGraph {
  3656. get { return costGraph_; }
  3657. set {
  3658. costGraph_ = value;
  3659. }
  3660. }
  3661. /// <summary>Field number for the "partition_graphs" field.</summary>
  3662. public const int PartitionGraphsFieldNumber = 3;
  3663. private static readonly pb::FieldCodec<global::Tensorflow.GraphDef> _repeated_partitionGraphs_codec
  3664. = pb::FieldCodec.ForMessage(26, global::Tensorflow.GraphDef.Parser);
  3665. private readonly pbc::RepeatedField<global::Tensorflow.GraphDef> partitionGraphs_ = new pbc::RepeatedField<global::Tensorflow.GraphDef>();
  3666. /// <summary>
  3667. /// Graphs of the partitions executed by executors.
  3668. /// </summary>
  3669. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3670. public pbc::RepeatedField<global::Tensorflow.GraphDef> PartitionGraphs {
  3671. get { return partitionGraphs_; }
  3672. }
  3673. /// <summary>Field number for the "function_graphs" field.</summary>
  3674. public const int FunctionGraphsFieldNumber = 4;
  3675. private static readonly pb::FieldCodec<global::Tensorflow.RunMetadata.Types.FunctionGraphs> _repeated_functionGraphs_codec
  3676. = pb::FieldCodec.ForMessage(34, global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser);
  3677. private readonly pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs> functionGraphs_ = new pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs>();
  3678. /// <summary>
  3679. /// This is only populated for graphs that are run as functions in TensorFlow
  3680. /// V2. There will be an entry below for each function that is traced.
  3681. /// The main use cases of the post_optimization_graph and the partition_graphs
  3682. /// is to give the caller insight into the graphs that were actually run by the
  3683. /// runtime. Additional information (such as those in step_stats) will match
  3684. /// these graphs.
  3685. /// We also include the pre_optimization_graph since it is usually easier to
  3686. /// read, and is helpful in situations where the caller wants to get a high
  3687. /// level idea of what the built graph looks like (since the various graph
  3688. /// optimization passes might change the structure of the graph significantly).
  3689. /// </summary>
  3690. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3691. public pbc::RepeatedField<global::Tensorflow.RunMetadata.Types.FunctionGraphs> FunctionGraphs {
  3692. get { return functionGraphs_; }
  3693. }
  3694. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3695. public override bool Equals(object other) {
  3696. return Equals(other as RunMetadata);
  3697. }
  3698. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3699. public bool Equals(RunMetadata other) {
  3700. if (ReferenceEquals(other, null)) {
  3701. return false;
  3702. }
  3703. if (ReferenceEquals(other, this)) {
  3704. return true;
  3705. }
  3706. if (!object.Equals(StepStats, other.StepStats)) return false;
  3707. if (!object.Equals(CostGraph, other.CostGraph)) return false;
  3708. if(!partitionGraphs_.Equals(other.partitionGraphs_)) return false;
  3709. if(!functionGraphs_.Equals(other.functionGraphs_)) return false;
  3710. return Equals(_unknownFields, other._unknownFields);
  3711. }
  3712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3713. public override int GetHashCode() {
  3714. int hash = 1;
  3715. if (stepStats_ != null) hash ^= StepStats.GetHashCode();
  3716. if (costGraph_ != null) hash ^= CostGraph.GetHashCode();
  3717. hash ^= partitionGraphs_.GetHashCode();
  3718. hash ^= functionGraphs_.GetHashCode();
  3719. if (_unknownFields != null) {
  3720. hash ^= _unknownFields.GetHashCode();
  3721. }
  3722. return hash;
  3723. }
  3724. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3725. public override string ToString() {
  3726. return pb::JsonFormatter.ToDiagnosticString(this);
  3727. }
  3728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3729. public void WriteTo(pb::CodedOutputStream output) {
  3730. if (stepStats_ != null) {
  3731. output.WriteRawTag(10);
  3732. output.WriteMessage(StepStats);
  3733. }
  3734. if (costGraph_ != null) {
  3735. output.WriteRawTag(18);
  3736. output.WriteMessage(CostGraph);
  3737. }
  3738. partitionGraphs_.WriteTo(output, _repeated_partitionGraphs_codec);
  3739. functionGraphs_.WriteTo(output, _repeated_functionGraphs_codec);
  3740. if (_unknownFields != null) {
  3741. _unknownFields.WriteTo(output);
  3742. }
  3743. }
  3744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3745. public int CalculateSize() {
  3746. int size = 0;
  3747. if (stepStats_ != null) {
  3748. size += 1 + pb::CodedOutputStream.ComputeMessageSize(StepStats);
  3749. }
  3750. if (costGraph_ != null) {
  3751. size += 1 + pb::CodedOutputStream.ComputeMessageSize(CostGraph);
  3752. }
  3753. size += partitionGraphs_.CalculateSize(_repeated_partitionGraphs_codec);
  3754. size += functionGraphs_.CalculateSize(_repeated_functionGraphs_codec);
  3755. if (_unknownFields != null) {
  3756. size += _unknownFields.CalculateSize();
  3757. }
  3758. return size;
  3759. }
  3760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3761. public void MergeFrom(RunMetadata other) {
  3762. if (other == null) {
  3763. return;
  3764. }
  3765. if (other.stepStats_ != null) {
  3766. if (stepStats_ == null) {
  3767. stepStats_ = new global::Tensorflow.StepStats();
  3768. }
  3769. StepStats.MergeFrom(other.StepStats);
  3770. }
  3771. if (other.costGraph_ != null) {
  3772. if (costGraph_ == null) {
  3773. costGraph_ = new global::Tensorflow.CostGraphDef();
  3774. }
  3775. CostGraph.MergeFrom(other.CostGraph);
  3776. }
  3777. partitionGraphs_.Add(other.partitionGraphs_);
  3778. functionGraphs_.Add(other.functionGraphs_);
  3779. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3780. }
  3781. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3782. public void MergeFrom(pb::CodedInputStream input) {
  3783. uint tag;
  3784. while ((tag = input.ReadTag()) != 0) {
  3785. switch(tag) {
  3786. default:
  3787. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3788. break;
  3789. case 10: {
  3790. if (stepStats_ == null) {
  3791. stepStats_ = new global::Tensorflow.StepStats();
  3792. }
  3793. input.ReadMessage(stepStats_);
  3794. break;
  3795. }
  3796. case 18: {
  3797. if (costGraph_ == null) {
  3798. costGraph_ = new global::Tensorflow.CostGraphDef();
  3799. }
  3800. input.ReadMessage(costGraph_);
  3801. break;
  3802. }
  3803. case 26: {
  3804. partitionGraphs_.AddEntriesFrom(input, _repeated_partitionGraphs_codec);
  3805. break;
  3806. }
  3807. case 34: {
  3808. functionGraphs_.AddEntriesFrom(input, _repeated_functionGraphs_codec);
  3809. break;
  3810. }
  3811. }
  3812. }
  3813. }
  3814. #region Nested types
  3815. /// <summary>Container for nested types declared in the RunMetadata message type.</summary>
  3816. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3817. public static partial class Types {
  3818. public sealed partial class FunctionGraphs : pb::IMessage<FunctionGraphs> {
  3819. private static readonly pb::MessageParser<FunctionGraphs> _parser = new pb::MessageParser<FunctionGraphs>(() => new FunctionGraphs());
  3820. private pb::UnknownFieldSet _unknownFields;
  3821. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3822. public static pb::MessageParser<FunctionGraphs> Parser { get { return _parser; } }
  3823. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3824. public static pbr::MessageDescriptor Descriptor {
  3825. get { return global::Tensorflow.RunMetadata.Descriptor.NestedTypes[0]; }
  3826. }
  3827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3828. pbr::MessageDescriptor pb::IMessage.Descriptor {
  3829. get { return Descriptor; }
  3830. }
  3831. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3832. public FunctionGraphs() {
  3833. OnConstruction();
  3834. }
  3835. partial void OnConstruction();
  3836. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3837. public FunctionGraphs(FunctionGraphs other) : this() {
  3838. partitionGraphs_ = other.partitionGraphs_.Clone();
  3839. preOptimizationGraph_ = other.preOptimizationGraph_ != null ? other.preOptimizationGraph_.Clone() : null;
  3840. postOptimizationGraph_ = other.postOptimizationGraph_ != null ? other.postOptimizationGraph_.Clone() : null;
  3841. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  3842. }
  3843. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3844. public FunctionGraphs Clone() {
  3845. return new FunctionGraphs(this);
  3846. }
  3847. /// <summary>Field number for the "partition_graphs" field.</summary>
  3848. public const int PartitionGraphsFieldNumber = 1;
  3849. private static readonly pb::FieldCodec<global::Tensorflow.GraphDef> _repeated_partitionGraphs_codec
  3850. = pb::FieldCodec.ForMessage(10, global::Tensorflow.GraphDef.Parser);
  3851. private readonly pbc::RepeatedField<global::Tensorflow.GraphDef> partitionGraphs_ = new pbc::RepeatedField<global::Tensorflow.GraphDef>();
  3852. /// <summary>
  3853. /// TODO(nareshmodi): Include some sort of function/cache-key identifier?
  3854. /// </summary>
  3855. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3856. public pbc::RepeatedField<global::Tensorflow.GraphDef> PartitionGraphs {
  3857. get { return partitionGraphs_; }
  3858. }
  3859. /// <summary>Field number for the "pre_optimization_graph" field.</summary>
  3860. public const int PreOptimizationGraphFieldNumber = 2;
  3861. private global::Tensorflow.GraphDef preOptimizationGraph_;
  3862. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3863. public global::Tensorflow.GraphDef PreOptimizationGraph {
  3864. get { return preOptimizationGraph_; }
  3865. set {
  3866. preOptimizationGraph_ = value;
  3867. }
  3868. }
  3869. /// <summary>Field number for the "post_optimization_graph" field.</summary>
  3870. public const int PostOptimizationGraphFieldNumber = 3;
  3871. private global::Tensorflow.GraphDef postOptimizationGraph_;
  3872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3873. public global::Tensorflow.GraphDef PostOptimizationGraph {
  3874. get { return postOptimizationGraph_; }
  3875. set {
  3876. postOptimizationGraph_ = value;
  3877. }
  3878. }
  3879. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3880. public override bool Equals(object other) {
  3881. return Equals(other as FunctionGraphs);
  3882. }
  3883. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3884. public bool Equals(FunctionGraphs other) {
  3885. if (ReferenceEquals(other, null)) {
  3886. return false;
  3887. }
  3888. if (ReferenceEquals(other, this)) {
  3889. return true;
  3890. }
  3891. if(!partitionGraphs_.Equals(other.partitionGraphs_)) return false;
  3892. if (!object.Equals(PreOptimizationGraph, other.PreOptimizationGraph)) return false;
  3893. if (!object.Equals(PostOptimizationGraph, other.PostOptimizationGraph)) return false;
  3894. return Equals(_unknownFields, other._unknownFields);
  3895. }
  3896. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3897. public override int GetHashCode() {
  3898. int hash = 1;
  3899. hash ^= partitionGraphs_.GetHashCode();
  3900. if (preOptimizationGraph_ != null) hash ^= PreOptimizationGraph.GetHashCode();
  3901. if (postOptimizationGraph_ != null) hash ^= PostOptimizationGraph.GetHashCode();
  3902. if (_unknownFields != null) {
  3903. hash ^= _unknownFields.GetHashCode();
  3904. }
  3905. return hash;
  3906. }
  3907. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3908. public override string ToString() {
  3909. return pb::JsonFormatter.ToDiagnosticString(this);
  3910. }
  3911. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3912. public void WriteTo(pb::CodedOutputStream output) {
  3913. partitionGraphs_.WriteTo(output, _repeated_partitionGraphs_codec);
  3914. if (preOptimizationGraph_ != null) {
  3915. output.WriteRawTag(18);
  3916. output.WriteMessage(PreOptimizationGraph);
  3917. }
  3918. if (postOptimizationGraph_ != null) {
  3919. output.WriteRawTag(26);
  3920. output.WriteMessage(PostOptimizationGraph);
  3921. }
  3922. if (_unknownFields != null) {
  3923. _unknownFields.WriteTo(output);
  3924. }
  3925. }
  3926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3927. public int CalculateSize() {
  3928. int size = 0;
  3929. size += partitionGraphs_.CalculateSize(_repeated_partitionGraphs_codec);
  3930. if (preOptimizationGraph_ != null) {
  3931. size += 1 + pb::CodedOutputStream.ComputeMessageSize(PreOptimizationGraph);
  3932. }
  3933. if (postOptimizationGraph_ != null) {
  3934. size += 1 + pb::CodedOutputStream.ComputeMessageSize(PostOptimizationGraph);
  3935. }
  3936. if (_unknownFields != null) {
  3937. size += _unknownFields.CalculateSize();
  3938. }
  3939. return size;
  3940. }
  3941. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3942. public void MergeFrom(FunctionGraphs other) {
  3943. if (other == null) {
  3944. return;
  3945. }
  3946. partitionGraphs_.Add(other.partitionGraphs_);
  3947. if (other.preOptimizationGraph_ != null) {
  3948. if (preOptimizationGraph_ == null) {
  3949. preOptimizationGraph_ = new global::Tensorflow.GraphDef();
  3950. }
  3951. PreOptimizationGraph.MergeFrom(other.PreOptimizationGraph);
  3952. }
  3953. if (other.postOptimizationGraph_ != null) {
  3954. if (postOptimizationGraph_ == null) {
  3955. postOptimizationGraph_ = new global::Tensorflow.GraphDef();
  3956. }
  3957. PostOptimizationGraph.MergeFrom(other.PostOptimizationGraph);
  3958. }
  3959. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  3960. }
  3961. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  3962. public void MergeFrom(pb::CodedInputStream input) {
  3963. uint tag;
  3964. while ((tag = input.ReadTag()) != 0) {
  3965. switch(tag) {
  3966. default:
  3967. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  3968. break;
  3969. case 10: {
  3970. partitionGraphs_.AddEntriesFrom(input, _repeated_partitionGraphs_codec);
  3971. break;
  3972. }
  3973. case 18: {
  3974. if (preOptimizationGraph_ == null) {
  3975. preOptimizationGraph_ = new global::Tensorflow.GraphDef();
  3976. }
  3977. input.ReadMessage(preOptimizationGraph_);
  3978. break;
  3979. }
  3980. case 26: {
  3981. if (postOptimizationGraph_ == null) {
  3982. postOptimizationGraph_ = new global::Tensorflow.GraphDef();
  3983. }
  3984. input.ReadMessage(postOptimizationGraph_);
  3985. break;
  3986. }
  3987. }
  3988. }
  3989. }
  3990. }
  3991. }
  3992. #endregion
  3993. }
  3994. /// <summary>
  3995. /// Defines a connection between two tensors in a `GraphDef`.
  3996. /// </summary>
  3997. public sealed partial class TensorConnection : pb::IMessage<TensorConnection> {
  3998. private static readonly pb::MessageParser<TensorConnection> _parser = new pb::MessageParser<TensorConnection>(() => new TensorConnection());
  3999. private pb::UnknownFieldSet _unknownFields;
  4000. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4001. public static pb::MessageParser<TensorConnection> Parser { get { return _parser; } }
  4002. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4003. public static pbr::MessageDescriptor Descriptor {
  4004. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[8]; }
  4005. }
  4006. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4007. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4008. get { return Descriptor; }
  4009. }
  4010. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4011. public TensorConnection() {
  4012. OnConstruction();
  4013. }
  4014. partial void OnConstruction();
  4015. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4016. public TensorConnection(TensorConnection other) : this() {
  4017. fromTensor_ = other.fromTensor_;
  4018. toTensor_ = other.toTensor_;
  4019. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  4020. }
  4021. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4022. public TensorConnection Clone() {
  4023. return new TensorConnection(this);
  4024. }
  4025. /// <summary>Field number for the "from_tensor" field.</summary>
  4026. public const int FromTensorFieldNumber = 1;
  4027. private string fromTensor_ = "";
  4028. /// <summary>
  4029. /// A tensor name. The value of this tensor will be substituted for
  4030. /// the tensor named in `to_tensor`.
  4031. /// </summary>
  4032. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4033. public string FromTensor {
  4034. get { return fromTensor_; }
  4035. set {
  4036. fromTensor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  4037. }
  4038. }
  4039. /// <summary>Field number for the "to_tensor" field.</summary>
  4040. public const int ToTensorFieldNumber = 2;
  4041. private string toTensor_ = "";
  4042. /// <summary>
  4043. /// A tensor name. The value of this tensor will be bound to the
  4044. /// value of the tensor named in `from_tensor`.
  4045. /// </summary>
  4046. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4047. public string ToTensor {
  4048. get { return toTensor_; }
  4049. set {
  4050. toTensor_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  4051. }
  4052. }
  4053. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4054. public override bool Equals(object other) {
  4055. return Equals(other as TensorConnection);
  4056. }
  4057. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4058. public bool Equals(TensorConnection other) {
  4059. if (ReferenceEquals(other, null)) {
  4060. return false;
  4061. }
  4062. if (ReferenceEquals(other, this)) {
  4063. return true;
  4064. }
  4065. if (FromTensor != other.FromTensor) return false;
  4066. if (ToTensor != other.ToTensor) return false;
  4067. return Equals(_unknownFields, other._unknownFields);
  4068. }
  4069. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4070. public override int GetHashCode() {
  4071. int hash = 1;
  4072. if (FromTensor.Length != 0) hash ^= FromTensor.GetHashCode();
  4073. if (ToTensor.Length != 0) hash ^= ToTensor.GetHashCode();
  4074. if (_unknownFields != null) {
  4075. hash ^= _unknownFields.GetHashCode();
  4076. }
  4077. return hash;
  4078. }
  4079. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4080. public override string ToString() {
  4081. return pb::JsonFormatter.ToDiagnosticString(this);
  4082. }
  4083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4084. public void WriteTo(pb::CodedOutputStream output) {
  4085. if (FromTensor.Length != 0) {
  4086. output.WriteRawTag(10);
  4087. output.WriteString(FromTensor);
  4088. }
  4089. if (ToTensor.Length != 0) {
  4090. output.WriteRawTag(18);
  4091. output.WriteString(ToTensor);
  4092. }
  4093. if (_unknownFields != null) {
  4094. _unknownFields.WriteTo(output);
  4095. }
  4096. }
  4097. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4098. public int CalculateSize() {
  4099. int size = 0;
  4100. if (FromTensor.Length != 0) {
  4101. size += 1 + pb::CodedOutputStream.ComputeStringSize(FromTensor);
  4102. }
  4103. if (ToTensor.Length != 0) {
  4104. size += 1 + pb::CodedOutputStream.ComputeStringSize(ToTensor);
  4105. }
  4106. if (_unknownFields != null) {
  4107. size += _unknownFields.CalculateSize();
  4108. }
  4109. return size;
  4110. }
  4111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4112. public void MergeFrom(TensorConnection other) {
  4113. if (other == null) {
  4114. return;
  4115. }
  4116. if (other.FromTensor.Length != 0) {
  4117. FromTensor = other.FromTensor;
  4118. }
  4119. if (other.ToTensor.Length != 0) {
  4120. ToTensor = other.ToTensor;
  4121. }
  4122. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  4123. }
  4124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4125. public void MergeFrom(pb::CodedInputStream input) {
  4126. uint tag;
  4127. while ((tag = input.ReadTag()) != 0) {
  4128. switch(tag) {
  4129. default:
  4130. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  4131. break;
  4132. case 10: {
  4133. FromTensor = input.ReadString();
  4134. break;
  4135. }
  4136. case 18: {
  4137. ToTensor = input.ReadString();
  4138. break;
  4139. }
  4140. }
  4141. }
  4142. }
  4143. }
  4144. /// <summary>
  4145. /// Defines a subgraph in another `GraphDef` as a set of feed points and nodes
  4146. /// to be fetched or executed.
  4147. ///
  4148. /// Compare with the arguments to `Session::Run()`.
  4149. /// </summary>
  4150. public sealed partial class CallableOptions : pb::IMessage<CallableOptions> {
  4151. private static readonly pb::MessageParser<CallableOptions> _parser = new pb::MessageParser<CallableOptions>(() => new CallableOptions());
  4152. private pb::UnknownFieldSet _unknownFields;
  4153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4154. public static pb::MessageParser<CallableOptions> Parser { get { return _parser; } }
  4155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4156. public static pbr::MessageDescriptor Descriptor {
  4157. get { return global::Tensorflow.ConfigReflection.Descriptor.MessageTypes[9]; }
  4158. }
  4159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4160. pbr::MessageDescriptor pb::IMessage.Descriptor {
  4161. get { return Descriptor; }
  4162. }
  4163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4164. public CallableOptions() {
  4165. OnConstruction();
  4166. }
  4167. partial void OnConstruction();
  4168. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4169. public CallableOptions(CallableOptions other) : this() {
  4170. feed_ = other.feed_.Clone();
  4171. fetch_ = other.fetch_.Clone();
  4172. target_ = other.target_.Clone();
  4173. runOptions_ = other.runOptions_ != null ? other.runOptions_.Clone() : null;
  4174. tensorConnection_ = other.tensorConnection_.Clone();
  4175. feedDevices_ = other.feedDevices_.Clone();
  4176. fetchDevices_ = other.fetchDevices_.Clone();
  4177. fetchSkipSync_ = other.fetchSkipSync_;
  4178. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  4179. }
  4180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4181. public CallableOptions Clone() {
  4182. return new CallableOptions(this);
  4183. }
  4184. /// <summary>Field number for the "feed" field.</summary>
  4185. public const int FeedFieldNumber = 1;
  4186. private static readonly pb::FieldCodec<string> _repeated_feed_codec
  4187. = pb::FieldCodec.ForString(10);
  4188. private readonly pbc::RepeatedField<string> feed_ = new pbc::RepeatedField<string>();
  4189. /// <summary>
  4190. /// Tensors to be fed in the callable. Each feed is the name of a tensor.
  4191. /// </summary>
  4192. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4193. public pbc::RepeatedField<string> Feed {
  4194. get { return feed_; }
  4195. }
  4196. /// <summary>Field number for the "fetch" field.</summary>
  4197. public const int FetchFieldNumber = 2;
  4198. private static readonly pb::FieldCodec<string> _repeated_fetch_codec
  4199. = pb::FieldCodec.ForString(18);
  4200. private readonly pbc::RepeatedField<string> fetch_ = new pbc::RepeatedField<string>();
  4201. /// <summary>
  4202. /// Fetches. A list of tensor names. The caller of the callable expects a
  4203. /// tensor to be returned for each fetch[i] (see RunStepResponse.tensor). The
  4204. /// order of specified fetches does not change the execution order.
  4205. /// </summary>
  4206. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4207. public pbc::RepeatedField<string> Fetch {
  4208. get { return fetch_; }
  4209. }
  4210. /// <summary>Field number for the "target" field.</summary>
  4211. public const int TargetFieldNumber = 3;
  4212. private static readonly pb::FieldCodec<string> _repeated_target_codec
  4213. = pb::FieldCodec.ForString(26);
  4214. private readonly pbc::RepeatedField<string> target_ = new pbc::RepeatedField<string>();
  4215. /// <summary>
  4216. /// Target Nodes. A list of node names. The named nodes will be run by the
  4217. /// callable but their outputs will not be returned.
  4218. /// </summary>
  4219. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4220. public pbc::RepeatedField<string> Target {
  4221. get { return target_; }
  4222. }
  4223. /// <summary>Field number for the "run_options" field.</summary>
  4224. public const int RunOptionsFieldNumber = 4;
  4225. private global::Tensorflow.RunOptions runOptions_;
  4226. /// <summary>
  4227. /// Options that will be applied to each run.
  4228. /// </summary>
  4229. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4230. public global::Tensorflow.RunOptions RunOptions {
  4231. get { return runOptions_; }
  4232. set {
  4233. runOptions_ = value;
  4234. }
  4235. }
  4236. /// <summary>Field number for the "tensor_connection" field.</summary>
  4237. public const int TensorConnectionFieldNumber = 5;
  4238. private static readonly pb::FieldCodec<global::Tensorflow.TensorConnection> _repeated_tensorConnection_codec
  4239. = pb::FieldCodec.ForMessage(42, global::Tensorflow.TensorConnection.Parser);
  4240. private readonly pbc::RepeatedField<global::Tensorflow.TensorConnection> tensorConnection_ = new pbc::RepeatedField<global::Tensorflow.TensorConnection>();
  4241. /// <summary>
  4242. /// Tensors to be connected in the callable. Each TensorConnection denotes
  4243. /// a pair of tensors in the graph, between which an edge will be created
  4244. /// in the callable.
  4245. /// </summary>
  4246. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4247. public pbc::RepeatedField<global::Tensorflow.TensorConnection> TensorConnection {
  4248. get { return tensorConnection_; }
  4249. }
  4250. /// <summary>Field number for the "feed_devices" field.</summary>
  4251. public const int FeedDevicesFieldNumber = 6;
  4252. private static readonly pbc::MapField<string, string>.Codec _map_feedDevices_codec
  4253. = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 50);
  4254. private readonly pbc::MapField<string, string> feedDevices_ = new pbc::MapField<string, string>();
  4255. /// <summary>
  4256. /// The Tensor objects fed in the callable and fetched from the callable
  4257. /// are expected to be backed by host (CPU) memory by default.
  4258. ///
  4259. /// The options below allow changing that - feeding tensors backed by
  4260. /// device memory, or returning tensors that are backed by device memory.
  4261. ///
  4262. /// The maps below map the name of a feed/fetch tensor (which appears in
  4263. /// 'feed' or 'fetch' fields above), to the fully qualified name of the device
  4264. /// owning the memory backing the contents of the tensor.
  4265. ///
  4266. /// For example, creating a callable with the following options:
  4267. ///
  4268. /// CallableOptions {
  4269. /// feed: "a:0"
  4270. /// feed: "b:0"
  4271. ///
  4272. /// fetch: "x:0"
  4273. /// fetch: "y:0"
  4274. ///
  4275. /// feed_devices: {
  4276. /// "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
  4277. /// }
  4278. ///
  4279. /// fetch_devices: {
  4280. /// "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
  4281. /// }
  4282. /// }
  4283. ///
  4284. /// means that the Callable expects:
  4285. /// - The first argument ("a:0") is a Tensor backed by GPU memory.
  4286. /// - The second argument ("b:0") is a Tensor backed by host memory.
  4287. /// and of its return values:
  4288. /// - The first output ("x:0") will be backed by host memory.
  4289. /// - The second output ("y:0") will be backed by GPU memory.
  4290. ///
  4291. /// FEEDS:
  4292. /// It is the responsibility of the caller to ensure that the memory of the fed
  4293. /// tensors will be correctly initialized and synchronized before it is
  4294. /// accessed by operations executed during the call to Session::RunCallable().
  4295. ///
  4296. /// This is typically ensured by using the TensorFlow memory allocators
  4297. /// (Device::GetAllocator()) to create the Tensor to be fed.
  4298. ///
  4299. /// Alternatively, for CUDA-enabled GPU devices, this typically means that the
  4300. /// operation that produced the contents of the tensor has completed, i.e., the
  4301. /// CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
  4302. /// cuStreamSynchronize()).
  4303. /// </summary>
  4304. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4305. public pbc::MapField<string, string> FeedDevices {
  4306. get { return feedDevices_; }
  4307. }
  4308. /// <summary>Field number for the "fetch_devices" field.</summary>
  4309. public const int FetchDevicesFieldNumber = 7;
  4310. private static readonly pbc::MapField<string, string>.Codec _map_fetchDevices_codec
  4311. = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 58);
  4312. private readonly pbc::MapField<string, string> fetchDevices_ = new pbc::MapField<string, string>();
  4313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4314. public pbc::MapField<string, string> FetchDevices {
  4315. get { return fetchDevices_; }
  4316. }
  4317. /// <summary>Field number for the "fetch_skip_sync" field.</summary>
  4318. public const int FetchSkipSyncFieldNumber = 8;
  4319. private bool fetchSkipSync_;
  4320. /// <summary>
  4321. /// By default, RunCallable() will synchronize the GPU stream before returning
  4322. /// fetched tensors on a GPU device, to ensure that the values in those tensors
  4323. /// have been produced. This simplifies interacting with the tensors, but
  4324. /// potentially incurs a performance hit.
  4325. ///
  4326. /// If this options is set to true, the caller is responsible for ensuring
  4327. /// that the values in the fetched tensors have been produced before they are
  4328. /// used. The caller can do this by invoking `Device::Sync()` on the underlying
  4329. /// device(s), or by feeding the tensors back to the same Session using
  4330. /// `feed_devices` with the same corresponding device name.
  4331. /// </summary>
  4332. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4333. public bool FetchSkipSync {
  4334. get { return fetchSkipSync_; }
  4335. set {
  4336. fetchSkipSync_ = value;
  4337. }
  4338. }
  4339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4340. public override bool Equals(object other) {
  4341. return Equals(other as CallableOptions);
  4342. }
  4343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4344. public bool Equals(CallableOptions other) {
  4345. if (ReferenceEquals(other, null)) {
  4346. return false;
  4347. }
  4348. if (ReferenceEquals(other, this)) {
  4349. return true;
  4350. }
  4351. if(!feed_.Equals(other.feed_)) return false;
  4352. if(!fetch_.Equals(other.fetch_)) return false;
  4353. if(!target_.Equals(other.target_)) return false;
  4354. if (!object.Equals(RunOptions, other.RunOptions)) return false;
  4355. if(!tensorConnection_.Equals(other.tensorConnection_)) return false;
  4356. if (!FeedDevices.Equals(other.FeedDevices)) return false;
  4357. if (!FetchDevices.Equals(other.FetchDevices)) return false;
  4358. if (FetchSkipSync != other.FetchSkipSync) return false;
  4359. return Equals(_unknownFields, other._unknownFields);
  4360. }
  4361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4362. public override int GetHashCode() {
  4363. int hash = 1;
  4364. hash ^= feed_.GetHashCode();
  4365. hash ^= fetch_.GetHashCode();
  4366. hash ^= target_.GetHashCode();
  4367. if (runOptions_ != null) hash ^= RunOptions.GetHashCode();
  4368. hash ^= tensorConnection_.GetHashCode();
  4369. hash ^= FeedDevices.GetHashCode();
  4370. hash ^= FetchDevices.GetHashCode();
  4371. if (FetchSkipSync != false) hash ^= FetchSkipSync.GetHashCode();
  4372. if (_unknownFields != null) {
  4373. hash ^= _unknownFields.GetHashCode();
  4374. }
  4375. return hash;
  4376. }
  4377. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4378. public override string ToString() {
  4379. return pb::JsonFormatter.ToDiagnosticString(this);
  4380. }
  4381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4382. public void WriteTo(pb::CodedOutputStream output) {
  4383. feed_.WriteTo(output, _repeated_feed_codec);
  4384. fetch_.WriteTo(output, _repeated_fetch_codec);
  4385. target_.WriteTo(output, _repeated_target_codec);
  4386. if (runOptions_ != null) {
  4387. output.WriteRawTag(34);
  4388. output.WriteMessage(RunOptions);
  4389. }
  4390. tensorConnection_.WriteTo(output, _repeated_tensorConnection_codec);
  4391. feedDevices_.WriteTo(output, _map_feedDevices_codec);
  4392. fetchDevices_.WriteTo(output, _map_fetchDevices_codec);
  4393. if (FetchSkipSync != false) {
  4394. output.WriteRawTag(64);
  4395. output.WriteBool(FetchSkipSync);
  4396. }
  4397. if (_unknownFields != null) {
  4398. _unknownFields.WriteTo(output);
  4399. }
  4400. }
  4401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4402. public int CalculateSize() {
  4403. int size = 0;
  4404. size += feed_.CalculateSize(_repeated_feed_codec);
  4405. size += fetch_.CalculateSize(_repeated_fetch_codec);
  4406. size += target_.CalculateSize(_repeated_target_codec);
  4407. if (runOptions_ != null) {
  4408. size += 1 + pb::CodedOutputStream.ComputeMessageSize(RunOptions);
  4409. }
  4410. size += tensorConnection_.CalculateSize(_repeated_tensorConnection_codec);
  4411. size += feedDevices_.CalculateSize(_map_feedDevices_codec);
  4412. size += fetchDevices_.CalculateSize(_map_fetchDevices_codec);
  4413. if (FetchSkipSync != false) {
  4414. size += 1 + 1;
  4415. }
  4416. if (_unknownFields != null) {
  4417. size += _unknownFields.CalculateSize();
  4418. }
  4419. return size;
  4420. }
  4421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4422. public void MergeFrom(CallableOptions other) {
  4423. if (other == null) {
  4424. return;
  4425. }
  4426. feed_.Add(other.feed_);
  4427. fetch_.Add(other.fetch_);
  4428. target_.Add(other.target_);
  4429. if (other.runOptions_ != null) {
  4430. if (runOptions_ == null) {
  4431. runOptions_ = new global::Tensorflow.RunOptions();
  4432. }
  4433. RunOptions.MergeFrom(other.RunOptions);
  4434. }
  4435. tensorConnection_.Add(other.tensorConnection_);
  4436. feedDevices_.Add(other.feedDevices_);
  4437. fetchDevices_.Add(other.fetchDevices_);
  4438. if (other.FetchSkipSync != false) {
  4439. FetchSkipSync = other.FetchSkipSync;
  4440. }
  4441. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  4442. }
  4443. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  4444. public void MergeFrom(pb::CodedInputStream input) {
  4445. uint tag;
  4446. while ((tag = input.ReadTag()) != 0) {
  4447. switch(tag) {
  4448. default:
  4449. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  4450. break;
  4451. case 10: {
  4452. feed_.AddEntriesFrom(input, _repeated_feed_codec);
  4453. break;
  4454. }
  4455. case 18: {
  4456. fetch_.AddEntriesFrom(input, _repeated_fetch_codec);
  4457. break;
  4458. }
  4459. case 26: {
  4460. target_.AddEntriesFrom(input, _repeated_target_codec);
  4461. break;
  4462. }
  4463. case 34: {
  4464. if (runOptions_ == null) {
  4465. runOptions_ = new global::Tensorflow.RunOptions();
  4466. }
  4467. input.ReadMessage(runOptions_);
  4468. break;
  4469. }
  4470. case 42: {
  4471. tensorConnection_.AddEntriesFrom(input, _repeated_tensorConnection_codec);
  4472. break;
  4473. }
  4474. case 50: {
  4475. feedDevices_.AddEntriesFrom(input, _map_feedDevices_codec);
  4476. break;
  4477. }
  4478. case 58: {
  4479. fetchDevices_.AddEntriesFrom(input, _map_fetchDevices_codec);
  4480. break;
  4481. }
  4482. case 64: {
  4483. FetchSkipSync = input.ReadBool();
  4484. break;
  4485. }
  4486. }
  4487. }
  4488. }
  4489. }
  4490. #endregion
  4491. }
  4492. #endregion Designer generated code