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.

DeviceAttributes.cs 43 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/framework/device_attributes.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021, 8981
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/framework/device_attributes.proto</summary>
  13. public static partial class DeviceAttributesReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/framework/device_attributes.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static DeviceAttributesReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CjF0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2RldmljZV9hdHRyaWJ1dGVz",
  24. "LnByb3RvEgp0ZW5zb3JmbG93IkUKEEludGVyY29ubmVjdExpbmsSEQoJZGV2",
  25. "aWNlX2lkGAEgASgFEgwKBHR5cGUYAiABKAkSEAoIc3RyZW5ndGgYAyABKAUi",
  26. "OAoKTG9jYWxMaW5rcxIqCgRsaW5rGAEgAygLMhwudGVuc29yZmxvdy5JbnRl",
  27. "cmNvbm5lY3RMaW5rIloKDkRldmljZUxvY2FsaXR5Eg4KBmJ1c19pZBgBIAEo",
  28. "BRIRCgludW1hX25vZGUYAiABKAUSJQoFbGlua3MYAyABKAsyFi50ZW5zb3Jm",
  29. "bG93LkxvY2FsTGlua3MiwwEKEERldmljZUF0dHJpYnV0ZXMSDAoEbmFtZRgB",
  30. "IAEoCRITCgtkZXZpY2VfdHlwZRgCIAEoCRIUCgxtZW1vcnlfbGltaXQYBCAB",
  31. "KAMSLAoIbG9jYWxpdHkYBSABKAsyGi50ZW5zb3JmbG93LkRldmljZUxvY2Fs",
  32. "aXR5EhMKC2luY2FybmF0aW9uGAYgASgGEhwKFHBoeXNpY2FsX2RldmljZV9k",
  33. "ZXNjGAcgASgJEhUKDXhsYV9nbG9iYWxfaWQYCCABKANCkQEKGG9yZy50ZW5z",
  34. "b3JmbG93LmZyYW1ld29ya0IWRGV2aWNlQXR0cmlidXRlc1Byb3Rvc1ABWlhn",
  35. "aXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dv",
  36. "L2NvcmUvZnJhbWV3b3JrL2RldmljZV9hdHRyaWJ1dGVzX2dvX3Byb3Rv+AEB",
  37. "YgZwcm90bzM="));
  38. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  39. new pbr::FileDescriptor[] { },
  40. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  41. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.InterconnectLink), global::Tensorflow.InterconnectLink.Parser, new[]{ "DeviceId", "Type", "Strength" }, null, null, null, null),
  42. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.LocalLinks), global::Tensorflow.LocalLinks.Parser, new[]{ "Link" }, null, null, null, null),
  43. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceLocality), global::Tensorflow.DeviceLocality.Parser, new[]{ "BusId", "NumaNode", "Links" }, null, null, null, null),
  44. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.DeviceAttributes), global::Tensorflow.DeviceAttributes.Parser, new[]{ "Name", "DeviceType", "MemoryLimit", "Locality", "Incarnation", "PhysicalDeviceDesc", "XlaGlobalId" }, null, null, null, null)
  45. }));
  46. }
  47. #endregion
  48. }
  49. #region Messages
  50. public sealed partial class InterconnectLink : pb::IMessage<InterconnectLink>
  51. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  52. , pb::IBufferMessage
  53. #endif
  54. {
  55. private static readonly pb::MessageParser<InterconnectLink> _parser = new pb::MessageParser<InterconnectLink>(() => new InterconnectLink());
  56. private pb::UnknownFieldSet _unknownFields;
  57. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  58. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  59. public static pb::MessageParser<InterconnectLink> Parser { get { return _parser; } }
  60. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  61. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  62. public static pbr::MessageDescriptor Descriptor {
  63. get { return global::Tensorflow.DeviceAttributesReflection.Descriptor.MessageTypes[0]; }
  64. }
  65. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  66. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  67. pbr::MessageDescriptor pb::IMessage.Descriptor {
  68. get { return Descriptor; }
  69. }
  70. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  71. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  72. public InterconnectLink() {
  73. OnConstruction();
  74. }
  75. partial void OnConstruction();
  76. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  77. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  78. public InterconnectLink(InterconnectLink other) : this() {
  79. deviceId_ = other.deviceId_;
  80. type_ = other.type_;
  81. strength_ = other.strength_;
  82. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  83. }
  84. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  85. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  86. public InterconnectLink Clone() {
  87. return new InterconnectLink(this);
  88. }
  89. /// <summary>Field number for the "device_id" field.</summary>
  90. public const int DeviceIdFieldNumber = 1;
  91. private int deviceId_;
  92. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  93. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  94. public int DeviceId {
  95. get { return deviceId_; }
  96. set {
  97. deviceId_ = value;
  98. }
  99. }
  100. /// <summary>Field number for the "type" field.</summary>
  101. public const int TypeFieldNumber = 2;
  102. private string type_ = "";
  103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  104. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  105. public string Type {
  106. get { return type_; }
  107. set {
  108. type_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  109. }
  110. }
  111. /// <summary>Field number for the "strength" field.</summary>
  112. public const int StrengthFieldNumber = 3;
  113. private int strength_;
  114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  115. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  116. public int Strength {
  117. get { return strength_; }
  118. set {
  119. strength_ = value;
  120. }
  121. }
  122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  123. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  124. public override bool Equals(object other) {
  125. return Equals(other as InterconnectLink);
  126. }
  127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  128. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  129. public bool Equals(InterconnectLink other) {
  130. if (ReferenceEquals(other, null)) {
  131. return false;
  132. }
  133. if (ReferenceEquals(other, this)) {
  134. return true;
  135. }
  136. if (DeviceId != other.DeviceId) return false;
  137. if (Type != other.Type) return false;
  138. if (Strength != other.Strength) return false;
  139. return Equals(_unknownFields, other._unknownFields);
  140. }
  141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  142. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  143. public override int GetHashCode() {
  144. int hash = 1;
  145. if (DeviceId != 0) hash ^= DeviceId.GetHashCode();
  146. if (Type.Length != 0) hash ^= Type.GetHashCode();
  147. if (Strength != 0) hash ^= Strength.GetHashCode();
  148. if (_unknownFields != null) {
  149. hash ^= _unknownFields.GetHashCode();
  150. }
  151. return hash;
  152. }
  153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  154. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  155. public override string ToString() {
  156. return pb::JsonFormatter.ToDiagnosticString(this);
  157. }
  158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  159. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  160. public void WriteTo(pb::CodedOutputStream output) {
  161. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  162. output.WriteRawMessage(this);
  163. #else
  164. if (DeviceId != 0) {
  165. output.WriteRawTag(8);
  166. output.WriteInt32(DeviceId);
  167. }
  168. if (Type.Length != 0) {
  169. output.WriteRawTag(18);
  170. output.WriteString(Type);
  171. }
  172. if (Strength != 0) {
  173. output.WriteRawTag(24);
  174. output.WriteInt32(Strength);
  175. }
  176. if (_unknownFields != null) {
  177. _unknownFields.WriteTo(output);
  178. }
  179. #endif
  180. }
  181. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  183. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  184. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  185. if (DeviceId != 0) {
  186. output.WriteRawTag(8);
  187. output.WriteInt32(DeviceId);
  188. }
  189. if (Type.Length != 0) {
  190. output.WriteRawTag(18);
  191. output.WriteString(Type);
  192. }
  193. if (Strength != 0) {
  194. output.WriteRawTag(24);
  195. output.WriteInt32(Strength);
  196. }
  197. if (_unknownFields != null) {
  198. _unknownFields.WriteTo(ref output);
  199. }
  200. }
  201. #endif
  202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  203. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  204. public int CalculateSize() {
  205. int size = 0;
  206. if (DeviceId != 0) {
  207. size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeviceId);
  208. }
  209. if (Type.Length != 0) {
  210. size += 1 + pb::CodedOutputStream.ComputeStringSize(Type);
  211. }
  212. if (Strength != 0) {
  213. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Strength);
  214. }
  215. if (_unknownFields != null) {
  216. size += _unknownFields.CalculateSize();
  217. }
  218. return size;
  219. }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  222. public void MergeFrom(InterconnectLink other) {
  223. if (other == null) {
  224. return;
  225. }
  226. if (other.DeviceId != 0) {
  227. DeviceId = other.DeviceId;
  228. }
  229. if (other.Type.Length != 0) {
  230. Type = other.Type;
  231. }
  232. if (other.Strength != 0) {
  233. Strength = other.Strength;
  234. }
  235. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  236. }
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  238. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  239. public void MergeFrom(pb::CodedInputStream input) {
  240. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  241. input.ReadRawMessage(this);
  242. #else
  243. uint tag;
  244. while ((tag = input.ReadTag()) != 0) {
  245. switch(tag) {
  246. default:
  247. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  248. break;
  249. case 8: {
  250. DeviceId = input.ReadInt32();
  251. break;
  252. }
  253. case 18: {
  254. Type = input.ReadString();
  255. break;
  256. }
  257. case 24: {
  258. Strength = input.ReadInt32();
  259. break;
  260. }
  261. }
  262. }
  263. #endif
  264. }
  265. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  267. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  268. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  269. uint tag;
  270. while ((tag = input.ReadTag()) != 0) {
  271. switch(tag) {
  272. default:
  273. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  274. break;
  275. case 8: {
  276. DeviceId = input.ReadInt32();
  277. break;
  278. }
  279. case 18: {
  280. Type = input.ReadString();
  281. break;
  282. }
  283. case 24: {
  284. Strength = input.ReadInt32();
  285. break;
  286. }
  287. }
  288. }
  289. }
  290. #endif
  291. }
  292. public sealed partial class LocalLinks : pb::IMessage<LocalLinks>
  293. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  294. , pb::IBufferMessage
  295. #endif
  296. {
  297. private static readonly pb::MessageParser<LocalLinks> _parser = new pb::MessageParser<LocalLinks>(() => new LocalLinks());
  298. private pb::UnknownFieldSet _unknownFields;
  299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  300. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  301. public static pb::MessageParser<LocalLinks> Parser { get { return _parser; } }
  302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  303. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  304. public static pbr::MessageDescriptor Descriptor {
  305. get { return global::Tensorflow.DeviceAttributesReflection.Descriptor.MessageTypes[1]; }
  306. }
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  309. pbr::MessageDescriptor pb::IMessage.Descriptor {
  310. get { return Descriptor; }
  311. }
  312. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  313. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  314. public LocalLinks() {
  315. OnConstruction();
  316. }
  317. partial void OnConstruction();
  318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  319. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  320. public LocalLinks(LocalLinks other) : this() {
  321. link_ = other.link_.Clone();
  322. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  323. }
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  325. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  326. public LocalLinks Clone() {
  327. return new LocalLinks(this);
  328. }
  329. /// <summary>Field number for the "link" field.</summary>
  330. public const int LinkFieldNumber = 1;
  331. private static readonly pb::FieldCodec<global::Tensorflow.InterconnectLink> _repeated_link_codec
  332. = pb::FieldCodec.ForMessage(10, global::Tensorflow.InterconnectLink.Parser);
  333. private readonly pbc::RepeatedField<global::Tensorflow.InterconnectLink> link_ = new pbc::RepeatedField<global::Tensorflow.InterconnectLink>();
  334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  335. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  336. public pbc::RepeatedField<global::Tensorflow.InterconnectLink> Link {
  337. get { return link_; }
  338. }
  339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  340. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  341. public override bool Equals(object other) {
  342. return Equals(other as LocalLinks);
  343. }
  344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  345. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  346. public bool Equals(LocalLinks other) {
  347. if (ReferenceEquals(other, null)) {
  348. return false;
  349. }
  350. if (ReferenceEquals(other, this)) {
  351. return true;
  352. }
  353. if(!link_.Equals(other.link_)) return false;
  354. return Equals(_unknownFields, other._unknownFields);
  355. }
  356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  357. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  358. public override int GetHashCode() {
  359. int hash = 1;
  360. hash ^= link_.GetHashCode();
  361. if (_unknownFields != null) {
  362. hash ^= _unknownFields.GetHashCode();
  363. }
  364. return hash;
  365. }
  366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  367. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  368. public override string ToString() {
  369. return pb::JsonFormatter.ToDiagnosticString(this);
  370. }
  371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  372. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  373. public void WriteTo(pb::CodedOutputStream output) {
  374. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  375. output.WriteRawMessage(this);
  376. #else
  377. link_.WriteTo(output, _repeated_link_codec);
  378. if (_unknownFields != null) {
  379. _unknownFields.WriteTo(output);
  380. }
  381. #endif
  382. }
  383. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  385. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  386. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  387. link_.WriteTo(ref output, _repeated_link_codec);
  388. if (_unknownFields != null) {
  389. _unknownFields.WriteTo(ref output);
  390. }
  391. }
  392. #endif
  393. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  394. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  395. public int CalculateSize() {
  396. int size = 0;
  397. size += link_.CalculateSize(_repeated_link_codec);
  398. if (_unknownFields != null) {
  399. size += _unknownFields.CalculateSize();
  400. }
  401. return size;
  402. }
  403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  404. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  405. public void MergeFrom(LocalLinks other) {
  406. if (other == null) {
  407. return;
  408. }
  409. link_.Add(other.link_);
  410. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  411. }
  412. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  413. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  414. public void MergeFrom(pb::CodedInputStream input) {
  415. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  416. input.ReadRawMessage(this);
  417. #else
  418. uint tag;
  419. while ((tag = input.ReadTag()) != 0) {
  420. switch(tag) {
  421. default:
  422. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  423. break;
  424. case 10: {
  425. link_.AddEntriesFrom(input, _repeated_link_codec);
  426. break;
  427. }
  428. }
  429. }
  430. #endif
  431. }
  432. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  434. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  435. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  436. uint tag;
  437. while ((tag = input.ReadTag()) != 0) {
  438. switch(tag) {
  439. default:
  440. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  441. break;
  442. case 10: {
  443. link_.AddEntriesFrom(ref input, _repeated_link_codec);
  444. break;
  445. }
  446. }
  447. }
  448. }
  449. #endif
  450. }
  451. public sealed partial class DeviceLocality : pb::IMessage<DeviceLocality>
  452. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  453. , pb::IBufferMessage
  454. #endif
  455. {
  456. private static readonly pb::MessageParser<DeviceLocality> _parser = new pb::MessageParser<DeviceLocality>(() => new DeviceLocality());
  457. private pb::UnknownFieldSet _unknownFields;
  458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  459. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  460. public static pb::MessageParser<DeviceLocality> Parser { get { return _parser; } }
  461. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  462. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  463. public static pbr::MessageDescriptor Descriptor {
  464. get { return global::Tensorflow.DeviceAttributesReflection.Descriptor.MessageTypes[2]; }
  465. }
  466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  467. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  468. pbr::MessageDescriptor pb::IMessage.Descriptor {
  469. get { return Descriptor; }
  470. }
  471. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  472. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  473. public DeviceLocality() {
  474. OnConstruction();
  475. }
  476. partial void OnConstruction();
  477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  478. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  479. public DeviceLocality(DeviceLocality other) : this() {
  480. busId_ = other.busId_;
  481. numaNode_ = other.numaNode_;
  482. links_ = other.links_ != null ? other.links_.Clone() : null;
  483. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  484. }
  485. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  486. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  487. public DeviceLocality Clone() {
  488. return new DeviceLocality(this);
  489. }
  490. /// <summary>Field number for the "bus_id" field.</summary>
  491. public const int BusIdFieldNumber = 1;
  492. private int busId_;
  493. /// <summary>
  494. /// Optional bus locality of device. Default value of 0 means
  495. /// no specific locality. Specific localities are indexed from 1.
  496. /// </summary>
  497. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  498. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  499. public int BusId {
  500. get { return busId_; }
  501. set {
  502. busId_ = value;
  503. }
  504. }
  505. /// <summary>Field number for the "numa_node" field.</summary>
  506. public const int NumaNodeFieldNumber = 2;
  507. private int numaNode_;
  508. /// <summary>
  509. /// Optional NUMA locality of device.
  510. /// </summary>
  511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  512. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  513. public int NumaNode {
  514. get { return numaNode_; }
  515. set {
  516. numaNode_ = value;
  517. }
  518. }
  519. /// <summary>Field number for the "links" field.</summary>
  520. public const int LinksFieldNumber = 3;
  521. private global::Tensorflow.LocalLinks links_;
  522. /// <summary>
  523. /// Optional local interconnect links to other devices.
  524. /// </summary>
  525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  526. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  527. public global::Tensorflow.LocalLinks Links {
  528. get { return links_; }
  529. set {
  530. links_ = value;
  531. }
  532. }
  533. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  534. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  535. public override bool Equals(object other) {
  536. return Equals(other as DeviceLocality);
  537. }
  538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  539. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  540. public bool Equals(DeviceLocality other) {
  541. if (ReferenceEquals(other, null)) {
  542. return false;
  543. }
  544. if (ReferenceEquals(other, this)) {
  545. return true;
  546. }
  547. if (BusId != other.BusId) return false;
  548. if (NumaNode != other.NumaNode) return false;
  549. if (!object.Equals(Links, other.Links)) return false;
  550. return Equals(_unknownFields, other._unknownFields);
  551. }
  552. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  553. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  554. public override int GetHashCode() {
  555. int hash = 1;
  556. if (BusId != 0) hash ^= BusId.GetHashCode();
  557. if (NumaNode != 0) hash ^= NumaNode.GetHashCode();
  558. if (links_ != null) hash ^= Links.GetHashCode();
  559. if (_unknownFields != null) {
  560. hash ^= _unknownFields.GetHashCode();
  561. }
  562. return hash;
  563. }
  564. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  565. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  566. public override string ToString() {
  567. return pb::JsonFormatter.ToDiagnosticString(this);
  568. }
  569. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  570. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  571. public void WriteTo(pb::CodedOutputStream output) {
  572. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  573. output.WriteRawMessage(this);
  574. #else
  575. if (BusId != 0) {
  576. output.WriteRawTag(8);
  577. output.WriteInt32(BusId);
  578. }
  579. if (NumaNode != 0) {
  580. output.WriteRawTag(16);
  581. output.WriteInt32(NumaNode);
  582. }
  583. if (links_ != null) {
  584. output.WriteRawTag(26);
  585. output.WriteMessage(Links);
  586. }
  587. if (_unknownFields != null) {
  588. _unknownFields.WriteTo(output);
  589. }
  590. #endif
  591. }
  592. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  593. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  594. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  595. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  596. if (BusId != 0) {
  597. output.WriteRawTag(8);
  598. output.WriteInt32(BusId);
  599. }
  600. if (NumaNode != 0) {
  601. output.WriteRawTag(16);
  602. output.WriteInt32(NumaNode);
  603. }
  604. if (links_ != null) {
  605. output.WriteRawTag(26);
  606. output.WriteMessage(Links);
  607. }
  608. if (_unknownFields != null) {
  609. _unknownFields.WriteTo(ref output);
  610. }
  611. }
  612. #endif
  613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  614. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  615. public int CalculateSize() {
  616. int size = 0;
  617. if (BusId != 0) {
  618. size += 1 + pb::CodedOutputStream.ComputeInt32Size(BusId);
  619. }
  620. if (NumaNode != 0) {
  621. size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumaNode);
  622. }
  623. if (links_ != null) {
  624. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Links);
  625. }
  626. if (_unknownFields != null) {
  627. size += _unknownFields.CalculateSize();
  628. }
  629. return size;
  630. }
  631. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  632. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  633. public void MergeFrom(DeviceLocality other) {
  634. if (other == null) {
  635. return;
  636. }
  637. if (other.BusId != 0) {
  638. BusId = other.BusId;
  639. }
  640. if (other.NumaNode != 0) {
  641. NumaNode = other.NumaNode;
  642. }
  643. if (other.links_ != null) {
  644. if (links_ == null) {
  645. Links = new global::Tensorflow.LocalLinks();
  646. }
  647. Links.MergeFrom(other.Links);
  648. }
  649. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  650. }
  651. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  652. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  653. public void MergeFrom(pb::CodedInputStream input) {
  654. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  655. input.ReadRawMessage(this);
  656. #else
  657. uint tag;
  658. while ((tag = input.ReadTag()) != 0) {
  659. switch(tag) {
  660. default:
  661. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  662. break;
  663. case 8: {
  664. BusId = input.ReadInt32();
  665. break;
  666. }
  667. case 16: {
  668. NumaNode = input.ReadInt32();
  669. break;
  670. }
  671. case 26: {
  672. if (links_ == null) {
  673. Links = new global::Tensorflow.LocalLinks();
  674. }
  675. input.ReadMessage(Links);
  676. break;
  677. }
  678. }
  679. }
  680. #endif
  681. }
  682. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  683. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  684. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  685. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  686. uint tag;
  687. while ((tag = input.ReadTag()) != 0) {
  688. switch(tag) {
  689. default:
  690. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  691. break;
  692. case 8: {
  693. BusId = input.ReadInt32();
  694. break;
  695. }
  696. case 16: {
  697. NumaNode = input.ReadInt32();
  698. break;
  699. }
  700. case 26: {
  701. if (links_ == null) {
  702. Links = new global::Tensorflow.LocalLinks();
  703. }
  704. input.ReadMessage(Links);
  705. break;
  706. }
  707. }
  708. }
  709. }
  710. #endif
  711. }
  712. public sealed partial class DeviceAttributes : pb::IMessage<DeviceAttributes>
  713. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  714. , pb::IBufferMessage
  715. #endif
  716. {
  717. private static readonly pb::MessageParser<DeviceAttributes> _parser = new pb::MessageParser<DeviceAttributes>(() => new DeviceAttributes());
  718. private pb::UnknownFieldSet _unknownFields;
  719. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  720. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  721. public static pb::MessageParser<DeviceAttributes> Parser { get { return _parser; } }
  722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  723. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  724. public static pbr::MessageDescriptor Descriptor {
  725. get { return global::Tensorflow.DeviceAttributesReflection.Descriptor.MessageTypes[3]; }
  726. }
  727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  728. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  729. pbr::MessageDescriptor pb::IMessage.Descriptor {
  730. get { return Descriptor; }
  731. }
  732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  733. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  734. public DeviceAttributes() {
  735. OnConstruction();
  736. }
  737. partial void OnConstruction();
  738. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  739. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  740. public DeviceAttributes(DeviceAttributes other) : this() {
  741. name_ = other.name_;
  742. deviceType_ = other.deviceType_;
  743. memoryLimit_ = other.memoryLimit_;
  744. locality_ = other.locality_ != null ? other.locality_.Clone() : null;
  745. incarnation_ = other.incarnation_;
  746. physicalDeviceDesc_ = other.physicalDeviceDesc_;
  747. xlaGlobalId_ = other.xlaGlobalId_;
  748. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  749. }
  750. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  751. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  752. public DeviceAttributes Clone() {
  753. return new DeviceAttributes(this);
  754. }
  755. /// <summary>Field number for the "name" field.</summary>
  756. public const int NameFieldNumber = 1;
  757. private string name_ = "";
  758. /// <summary>
  759. /// Fully specified name of the device within a cluster.
  760. /// </summary>
  761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  762. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  763. public string Name {
  764. get { return name_; }
  765. set {
  766. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  767. }
  768. }
  769. /// <summary>Field number for the "device_type" field.</summary>
  770. public const int DeviceTypeFieldNumber = 2;
  771. private string deviceType_ = "";
  772. /// <summary>
  773. /// String representation of device_type.
  774. /// </summary>
  775. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  776. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  777. public string DeviceType {
  778. get { return deviceType_; }
  779. set {
  780. deviceType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  781. }
  782. }
  783. /// <summary>Field number for the "memory_limit" field.</summary>
  784. public const int MemoryLimitFieldNumber = 4;
  785. private long memoryLimit_;
  786. /// <summary>
  787. /// Memory capacity of device in bytes.
  788. /// </summary>
  789. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  790. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  791. public long MemoryLimit {
  792. get { return memoryLimit_; }
  793. set {
  794. memoryLimit_ = value;
  795. }
  796. }
  797. /// <summary>Field number for the "locality" field.</summary>
  798. public const int LocalityFieldNumber = 5;
  799. private global::Tensorflow.DeviceLocality locality_;
  800. /// <summary>
  801. /// Platform-specific data about device that may be useful
  802. /// for supporting efficient data transfers.
  803. /// </summary>
  804. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  805. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  806. public global::Tensorflow.DeviceLocality Locality {
  807. get { return locality_; }
  808. set {
  809. locality_ = value;
  810. }
  811. }
  812. /// <summary>Field number for the "incarnation" field.</summary>
  813. public const int IncarnationFieldNumber = 6;
  814. private ulong incarnation_;
  815. /// <summary>
  816. /// A device is assigned a global unique number each time it is
  817. /// initialized. "incarnation" should never be 0.
  818. /// </summary>
  819. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  820. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  821. public ulong Incarnation {
  822. get { return incarnation_; }
  823. set {
  824. incarnation_ = value;
  825. }
  826. }
  827. /// <summary>Field number for the "physical_device_desc" field.</summary>
  828. public const int PhysicalDeviceDescFieldNumber = 7;
  829. private string physicalDeviceDesc_ = "";
  830. /// <summary>
  831. /// String representation of the physical device that this device maps to.
  832. /// </summary>
  833. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  834. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  835. public string PhysicalDeviceDesc {
  836. get { return physicalDeviceDesc_; }
  837. set {
  838. physicalDeviceDesc_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  839. }
  840. }
  841. /// <summary>Field number for the "xla_global_id" field.</summary>
  842. public const int XlaGlobalIdFieldNumber = 8;
  843. private long xlaGlobalId_;
  844. /// <summary>
  845. /// A physical device ID for use in XLA DeviceAssignments, unique across
  846. /// clients in a multi-client setup. Set to -1 if unavailable, non-negative
  847. /// otherwise.
  848. /// </summary>
  849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  850. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  851. public long XlaGlobalId {
  852. get { return xlaGlobalId_; }
  853. set {
  854. xlaGlobalId_ = value;
  855. }
  856. }
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  858. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  859. public override bool Equals(object other) {
  860. return Equals(other as DeviceAttributes);
  861. }
  862. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  863. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  864. public bool Equals(DeviceAttributes other) {
  865. if (ReferenceEquals(other, null)) {
  866. return false;
  867. }
  868. if (ReferenceEquals(other, this)) {
  869. return true;
  870. }
  871. if (Name != other.Name) return false;
  872. if (DeviceType != other.DeviceType) return false;
  873. if (MemoryLimit != other.MemoryLimit) return false;
  874. if (!object.Equals(Locality, other.Locality)) return false;
  875. if (Incarnation != other.Incarnation) return false;
  876. if (PhysicalDeviceDesc != other.PhysicalDeviceDesc) return false;
  877. if (XlaGlobalId != other.XlaGlobalId) return false;
  878. return Equals(_unknownFields, other._unknownFields);
  879. }
  880. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  881. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  882. public override int GetHashCode() {
  883. int hash = 1;
  884. if (Name.Length != 0) hash ^= Name.GetHashCode();
  885. if (DeviceType.Length != 0) hash ^= DeviceType.GetHashCode();
  886. if (MemoryLimit != 0L) hash ^= MemoryLimit.GetHashCode();
  887. if (locality_ != null) hash ^= Locality.GetHashCode();
  888. if (Incarnation != 0UL) hash ^= Incarnation.GetHashCode();
  889. if (PhysicalDeviceDesc.Length != 0) hash ^= PhysicalDeviceDesc.GetHashCode();
  890. if (XlaGlobalId != 0L) hash ^= XlaGlobalId.GetHashCode();
  891. if (_unknownFields != null) {
  892. hash ^= _unknownFields.GetHashCode();
  893. }
  894. return hash;
  895. }
  896. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  897. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  898. public override string ToString() {
  899. return pb::JsonFormatter.ToDiagnosticString(this);
  900. }
  901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  902. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  903. public void WriteTo(pb::CodedOutputStream output) {
  904. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  905. output.WriteRawMessage(this);
  906. #else
  907. if (Name.Length != 0) {
  908. output.WriteRawTag(10);
  909. output.WriteString(Name);
  910. }
  911. if (DeviceType.Length != 0) {
  912. output.WriteRawTag(18);
  913. output.WriteString(DeviceType);
  914. }
  915. if (MemoryLimit != 0L) {
  916. output.WriteRawTag(32);
  917. output.WriteInt64(MemoryLimit);
  918. }
  919. if (locality_ != null) {
  920. output.WriteRawTag(42);
  921. output.WriteMessage(Locality);
  922. }
  923. if (Incarnation != 0UL) {
  924. output.WriteRawTag(49);
  925. output.WriteFixed64(Incarnation);
  926. }
  927. if (PhysicalDeviceDesc.Length != 0) {
  928. output.WriteRawTag(58);
  929. output.WriteString(PhysicalDeviceDesc);
  930. }
  931. if (XlaGlobalId != 0L) {
  932. output.WriteRawTag(64);
  933. output.WriteInt64(XlaGlobalId);
  934. }
  935. if (_unknownFields != null) {
  936. _unknownFields.WriteTo(output);
  937. }
  938. #endif
  939. }
  940. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  941. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  942. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  943. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  944. if (Name.Length != 0) {
  945. output.WriteRawTag(10);
  946. output.WriteString(Name);
  947. }
  948. if (DeviceType.Length != 0) {
  949. output.WriteRawTag(18);
  950. output.WriteString(DeviceType);
  951. }
  952. if (MemoryLimit != 0L) {
  953. output.WriteRawTag(32);
  954. output.WriteInt64(MemoryLimit);
  955. }
  956. if (locality_ != null) {
  957. output.WriteRawTag(42);
  958. output.WriteMessage(Locality);
  959. }
  960. if (Incarnation != 0UL) {
  961. output.WriteRawTag(49);
  962. output.WriteFixed64(Incarnation);
  963. }
  964. if (PhysicalDeviceDesc.Length != 0) {
  965. output.WriteRawTag(58);
  966. output.WriteString(PhysicalDeviceDesc);
  967. }
  968. if (XlaGlobalId != 0L) {
  969. output.WriteRawTag(64);
  970. output.WriteInt64(XlaGlobalId);
  971. }
  972. if (_unknownFields != null) {
  973. _unknownFields.WriteTo(ref output);
  974. }
  975. }
  976. #endif
  977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  978. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  979. public int CalculateSize() {
  980. int size = 0;
  981. if (Name.Length != 0) {
  982. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  983. }
  984. if (DeviceType.Length != 0) {
  985. size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceType);
  986. }
  987. if (MemoryLimit != 0L) {
  988. size += 1 + pb::CodedOutputStream.ComputeInt64Size(MemoryLimit);
  989. }
  990. if (locality_ != null) {
  991. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Locality);
  992. }
  993. if (Incarnation != 0UL) {
  994. size += 1 + 8;
  995. }
  996. if (PhysicalDeviceDesc.Length != 0) {
  997. size += 1 + pb::CodedOutputStream.ComputeStringSize(PhysicalDeviceDesc);
  998. }
  999. if (XlaGlobalId != 0L) {
  1000. size += 1 + pb::CodedOutputStream.ComputeInt64Size(XlaGlobalId);
  1001. }
  1002. if (_unknownFields != null) {
  1003. size += _unknownFields.CalculateSize();
  1004. }
  1005. return size;
  1006. }
  1007. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1008. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1009. public void MergeFrom(DeviceAttributes other) {
  1010. if (other == null) {
  1011. return;
  1012. }
  1013. if (other.Name.Length != 0) {
  1014. Name = other.Name;
  1015. }
  1016. if (other.DeviceType.Length != 0) {
  1017. DeviceType = other.DeviceType;
  1018. }
  1019. if (other.MemoryLimit != 0L) {
  1020. MemoryLimit = other.MemoryLimit;
  1021. }
  1022. if (other.locality_ != null) {
  1023. if (locality_ == null) {
  1024. Locality = new global::Tensorflow.DeviceLocality();
  1025. }
  1026. Locality.MergeFrom(other.Locality);
  1027. }
  1028. if (other.Incarnation != 0UL) {
  1029. Incarnation = other.Incarnation;
  1030. }
  1031. if (other.PhysicalDeviceDesc.Length != 0) {
  1032. PhysicalDeviceDesc = other.PhysicalDeviceDesc;
  1033. }
  1034. if (other.XlaGlobalId != 0L) {
  1035. XlaGlobalId = other.XlaGlobalId;
  1036. }
  1037. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1038. }
  1039. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1040. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1041. public void MergeFrom(pb::CodedInputStream input) {
  1042. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1043. input.ReadRawMessage(this);
  1044. #else
  1045. uint tag;
  1046. while ((tag = input.ReadTag()) != 0) {
  1047. switch(tag) {
  1048. default:
  1049. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1050. break;
  1051. case 10: {
  1052. Name = input.ReadString();
  1053. break;
  1054. }
  1055. case 18: {
  1056. DeviceType = input.ReadString();
  1057. break;
  1058. }
  1059. case 32: {
  1060. MemoryLimit = input.ReadInt64();
  1061. break;
  1062. }
  1063. case 42: {
  1064. if (locality_ == null) {
  1065. Locality = new global::Tensorflow.DeviceLocality();
  1066. }
  1067. input.ReadMessage(Locality);
  1068. break;
  1069. }
  1070. case 49: {
  1071. Incarnation = input.ReadFixed64();
  1072. break;
  1073. }
  1074. case 58: {
  1075. PhysicalDeviceDesc = input.ReadString();
  1076. break;
  1077. }
  1078. case 64: {
  1079. XlaGlobalId = input.ReadInt64();
  1080. break;
  1081. }
  1082. }
  1083. }
  1084. #endif
  1085. }
  1086. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1088. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1089. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1090. uint tag;
  1091. while ((tag = input.ReadTag()) != 0) {
  1092. switch(tag) {
  1093. default:
  1094. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1095. break;
  1096. case 10: {
  1097. Name = input.ReadString();
  1098. break;
  1099. }
  1100. case 18: {
  1101. DeviceType = input.ReadString();
  1102. break;
  1103. }
  1104. case 32: {
  1105. MemoryLimit = input.ReadInt64();
  1106. break;
  1107. }
  1108. case 42: {
  1109. if (locality_ == null) {
  1110. Locality = new global::Tensorflow.DeviceLocality();
  1111. }
  1112. input.ReadMessage(Locality);
  1113. break;
  1114. }
  1115. case 49: {
  1116. Incarnation = input.ReadFixed64();
  1117. break;
  1118. }
  1119. case 58: {
  1120. PhysicalDeviceDesc = input.ReadString();
  1121. break;
  1122. }
  1123. case 64: {
  1124. XlaGlobalId = input.ReadInt64();
  1125. break;
  1126. }
  1127. }
  1128. }
  1129. }
  1130. #endif
  1131. }
  1132. #endregion
  1133. }
  1134. #endregion Designer generated code