// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: tensorflow/core/framework/log_memory.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Tensorflow {

  /// <summary>Holder for reflection information generated from tensorflow/core/framework/log_memory.proto</summary>
  public static partial class LogMemoryReflection {

    #region Descriptor
    /// <summary>File descriptor for tensorflow/core/framework/log_memory.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static LogMemoryReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2xvZ19tZW1vcnkucHJvdG8S",
            "CnRlbnNvcmZsb3caMnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvdGVuc29y",
            "X2Rlc2NyaXB0aW9uLnByb3RvIjAKDU1lbW9yeUxvZ1N0ZXASDwoHc3RlcF9p",
            "ZBgBIAEoAxIOCgZoYW5kbGUYAiABKAkicAoZTWVtb3J5TG9nVGVuc29yQWxs",
            "b2NhdGlvbhIPCgdzdGVwX2lkGAEgASgDEhMKC2tlcm5lbF9uYW1lGAIgASgJ",
            "Ei0KBnRlbnNvchgDIAEoCzIdLnRlbnNvcmZsb3cuVGVuc29yRGVzY3JpcHRp",
            "b24iTAobTWVtb3J5TG9nVGVuc29yRGVhbGxvY2F0aW9uEhUKDWFsbG9jYXRp",
            "b25faWQYASABKAMSFgoOYWxsb2NhdG9yX25hbWUYAiABKAkiewoVTWVtb3J5",
            "TG9nVGVuc29yT3V0cHV0Eg8KB3N0ZXBfaWQYASABKAMSEwoLa2VybmVsX25h",
            "bWUYAiABKAkSDQoFaW5kZXgYAyABKAUSLQoGdGVuc29yGAQgASgLMh0udGVu",
            "c29yZmxvdy5UZW5zb3JEZXNjcmlwdGlvbiKLAQoWTWVtb3J5TG9nUmF3QWxs",
            "b2NhdGlvbhIPCgdzdGVwX2lkGAEgASgDEhEKCW9wZXJhdGlvbhgCIAEoCRIR",
            "CgludW1fYnl0ZXMYAyABKAMSCwoDcHRyGAQgASgEEhUKDWFsbG9jYXRpb25f",
            "aWQYBSABKAMSFgoOYWxsb2NhdG9yX25hbWUYBiABKAkifwoYTWVtb3J5TG9n",
            "UmF3RGVhbGxvY2F0aW9uEg8KB3N0ZXBfaWQYASABKAMSEQoJb3BlcmF0aW9u",
            "GAIgASgJEhUKDWFsbG9jYXRpb25faWQYAyABKAMSFgoOYWxsb2NhdG9yX25h",
            "bWUYBCABKAkSEAoIZGVmZXJyZWQYBSABKAhCbwoYb3JnLnRlbnNvcmZsb3cu",
            "ZnJhbWV3b3JrQg9Mb2dNZW1vcnlQcm90b3NQAVo9Z2l0aHViLmNvbS90ZW5z",
            "b3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL2ZyYW1ld29y",
            "a/gBAWIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Tensorflow.TensorDescriptionReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogStep), global::Tensorflow.MemoryLogStep.Parser, new[]{ "StepId", "Handle" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorAllocation), global::Tensorflow.MemoryLogTensorAllocation.Parser, new[]{ "StepId", "KernelName", "Tensor" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorDeallocation), global::Tensorflow.MemoryLogTensorDeallocation.Parser, new[]{ "AllocationId", "AllocatorName" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogTensorOutput), global::Tensorflow.MemoryLogTensorOutput.Parser, new[]{ "StepId", "KernelName", "Index", "Tensor" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawAllocation), global::Tensorflow.MemoryLogRawAllocation.Parser, new[]{ "StepId", "Operation", "NumBytes", "Ptr", "AllocationId", "AllocatorName" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemoryLogRawDeallocation), global::Tensorflow.MemoryLogRawDeallocation.Parser, new[]{ "StepId", "Operation", "AllocationId", "AllocatorName", "Deferred" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class MemoryLogStep : pb::IMessage<MemoryLogStep> {
    private static readonly pb::MessageParser<MemoryLogStep> _parser = new pb::MessageParser<MemoryLogStep>(() => new MemoryLogStep());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogStep> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogStep() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogStep(MemoryLogStep other) : this() {
      stepId_ = other.stepId_;
      handle_ = other.handle_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogStep Clone() {
      return new MemoryLogStep(this);
    }

    /// <summary>Field number for the "step_id" field.</summary>
    public const int StepIdFieldNumber = 1;
    private long stepId_;
    /// <summary>
    /// Process-unique step id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long StepId {
      get { return stepId_; }
      set {
        stepId_ = value;
      }
    }

    /// <summary>Field number for the "handle" field.</summary>
    public const int HandleFieldNumber = 2;
    private string handle_ = "";
    /// <summary>
    /// Handle describing the feeds and fetches of the step.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Handle {
      get { return handle_; }
      set {
        handle_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogStep);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogStep other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StepId != other.StepId) return false;
      if (Handle != other.Handle) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StepId != 0L) hash ^= StepId.GetHashCode();
      if (Handle.Length != 0) hash ^= Handle.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (StepId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(StepId);
      }
      if (Handle.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Handle);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StepId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(StepId);
      }
      if (Handle.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Handle);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogStep other) {
      if (other == null) {
        return;
      }
      if (other.StepId != 0L) {
        StepId = other.StepId;
      }
      if (other.Handle.Length != 0) {
        Handle = other.Handle;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StepId = input.ReadInt64();
            break;
          }
          case 18: {
            Handle = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class MemoryLogTensorAllocation : pb::IMessage<MemoryLogTensorAllocation> {
    private static readonly pb::MessageParser<MemoryLogTensorAllocation> _parser = new pb::MessageParser<MemoryLogTensorAllocation>(() => new MemoryLogTensorAllocation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogTensorAllocation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorAllocation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorAllocation(MemoryLogTensorAllocation other) : this() {
      stepId_ = other.stepId_;
      kernelName_ = other.kernelName_;
      tensor_ = other.tensor_ != null ? other.tensor_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorAllocation Clone() {
      return new MemoryLogTensorAllocation(this);
    }

    /// <summary>Field number for the "step_id" field.</summary>
    public const int StepIdFieldNumber = 1;
    private long stepId_;
    /// <summary>
    /// Process-unique step id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long StepId {
      get { return stepId_; }
      set {
        stepId_ = value;
      }
    }

    /// <summary>Field number for the "kernel_name" field.</summary>
    public const int KernelNameFieldNumber = 2;
    private string kernelName_ = "";
    /// <summary>
    /// Name of the kernel making the allocation as set in GraphDef,
    /// e.g., "affine2/weights/Assign".
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string KernelName {
      get { return kernelName_; }
      set {
        kernelName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "tensor" field.</summary>
    public const int TensorFieldNumber = 3;
    private global::Tensorflow.TensorDescription tensor_;
    /// <summary>
    /// Allocated tensor details.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tensorflow.TensorDescription Tensor {
      get { return tensor_; }
      set {
        tensor_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogTensorAllocation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogTensorAllocation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StepId != other.StepId) return false;
      if (KernelName != other.KernelName) return false;
      if (!object.Equals(Tensor, other.Tensor)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StepId != 0L) hash ^= StepId.GetHashCode();
      if (KernelName.Length != 0) hash ^= KernelName.GetHashCode();
      if (tensor_ != null) hash ^= Tensor.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (StepId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(StepId);
      }
      if (KernelName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(KernelName);
      }
      if (tensor_ != null) {
        output.WriteRawTag(26);
        output.WriteMessage(Tensor);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StepId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(StepId);
      }
      if (KernelName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(KernelName);
      }
      if (tensor_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Tensor);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogTensorAllocation other) {
      if (other == null) {
        return;
      }
      if (other.StepId != 0L) {
        StepId = other.StepId;
      }
      if (other.KernelName.Length != 0) {
        KernelName = other.KernelName;
      }
      if (other.tensor_ != null) {
        if (tensor_ == null) {
          tensor_ = new global::Tensorflow.TensorDescription();
        }
        Tensor.MergeFrom(other.Tensor);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StepId = input.ReadInt64();
            break;
          }
          case 18: {
            KernelName = input.ReadString();
            break;
          }
          case 26: {
            if (tensor_ == null) {
              tensor_ = new global::Tensorflow.TensorDescription();
            }
            input.ReadMessage(tensor_);
            break;
          }
        }
      }
    }

  }

  public sealed partial class MemoryLogTensorDeallocation : pb::IMessage<MemoryLogTensorDeallocation> {
    private static readonly pb::MessageParser<MemoryLogTensorDeallocation> _parser = new pb::MessageParser<MemoryLogTensorDeallocation>(() => new MemoryLogTensorDeallocation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogTensorDeallocation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorDeallocation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorDeallocation(MemoryLogTensorDeallocation other) : this() {
      allocationId_ = other.allocationId_;
      allocatorName_ = other.allocatorName_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorDeallocation Clone() {
      return new MemoryLogTensorDeallocation(this);
    }

    /// <summary>Field number for the "allocation_id" field.</summary>
    public const int AllocationIdFieldNumber = 1;
    private long allocationId_;
    /// <summary>
    /// Id of the tensor buffer being deallocated, used to match to a
    /// corresponding allocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long AllocationId {
      get { return allocationId_; }
      set {
        allocationId_ = value;
      }
    }

    /// <summary>Field number for the "allocator_name" field.</summary>
    public const int AllocatorNameFieldNumber = 2;
    private string allocatorName_ = "";
    /// <summary>
    /// Name of the allocator used.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AllocatorName {
      get { return allocatorName_; }
      set {
        allocatorName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogTensorDeallocation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogTensorDeallocation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (AllocationId != other.AllocationId) return false;
      if (AllocatorName != other.AllocatorName) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (AllocationId != 0L) hash ^= AllocationId.GetHashCode();
      if (AllocatorName.Length != 0) hash ^= AllocatorName.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (AllocationId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AllocatorName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (AllocationId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AllocatorName);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogTensorDeallocation other) {
      if (other == null) {
        return;
      }
      if (other.AllocationId != 0L) {
        AllocationId = other.AllocationId;
      }
      if (other.AllocatorName.Length != 0) {
        AllocatorName = other.AllocatorName;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            AllocationId = input.ReadInt64();
            break;
          }
          case 18: {
            AllocatorName = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class MemoryLogTensorOutput : pb::IMessage<MemoryLogTensorOutput> {
    private static readonly pb::MessageParser<MemoryLogTensorOutput> _parser = new pb::MessageParser<MemoryLogTensorOutput>(() => new MemoryLogTensorOutput());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogTensorOutput> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorOutput() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorOutput(MemoryLogTensorOutput other) : this() {
      stepId_ = other.stepId_;
      kernelName_ = other.kernelName_;
      index_ = other.index_;
      tensor_ = other.tensor_ != null ? other.tensor_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogTensorOutput Clone() {
      return new MemoryLogTensorOutput(this);
    }

    /// <summary>Field number for the "step_id" field.</summary>
    public const int StepIdFieldNumber = 1;
    private long stepId_;
    /// <summary>
    /// Process-unique step id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long StepId {
      get { return stepId_; }
      set {
        stepId_ = value;
      }
    }

    /// <summary>Field number for the "kernel_name" field.</summary>
    public const int KernelNameFieldNumber = 2;
    private string kernelName_ = "";
    /// <summary>
    /// Name of the kernel producing an output as set in GraphDef, e.g.,
    /// "affine2/weights/Assign".
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string KernelName {
      get { return kernelName_; }
      set {
        kernelName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "index" field.</summary>
    public const int IndexFieldNumber = 3;
    private int index_;
    /// <summary>
    /// Index of the output being set.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int Index {
      get { return index_; }
      set {
        index_ = value;
      }
    }

    /// <summary>Field number for the "tensor" field.</summary>
    public const int TensorFieldNumber = 4;
    private global::Tensorflow.TensorDescription tensor_;
    /// <summary>
    /// Output tensor details.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tensorflow.TensorDescription Tensor {
      get { return tensor_; }
      set {
        tensor_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogTensorOutput);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogTensorOutput other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StepId != other.StepId) return false;
      if (KernelName != other.KernelName) return false;
      if (Index != other.Index) return false;
      if (!object.Equals(Tensor, other.Tensor)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StepId != 0L) hash ^= StepId.GetHashCode();
      if (KernelName.Length != 0) hash ^= KernelName.GetHashCode();
      if (Index != 0) hash ^= Index.GetHashCode();
      if (tensor_ != null) hash ^= Tensor.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (StepId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(StepId);
      }
      if (KernelName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(KernelName);
      }
      if (Index != 0) {
        output.WriteRawTag(24);
        output.WriteInt32(Index);
      }
      if (tensor_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Tensor);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StepId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(StepId);
      }
      if (KernelName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(KernelName);
      }
      if (Index != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
      }
      if (tensor_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Tensor);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogTensorOutput other) {
      if (other == null) {
        return;
      }
      if (other.StepId != 0L) {
        StepId = other.StepId;
      }
      if (other.KernelName.Length != 0) {
        KernelName = other.KernelName;
      }
      if (other.Index != 0) {
        Index = other.Index;
      }
      if (other.tensor_ != null) {
        if (tensor_ == null) {
          tensor_ = new global::Tensorflow.TensorDescription();
        }
        Tensor.MergeFrom(other.Tensor);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StepId = input.ReadInt64();
            break;
          }
          case 18: {
            KernelName = input.ReadString();
            break;
          }
          case 24: {
            Index = input.ReadInt32();
            break;
          }
          case 34: {
            if (tensor_ == null) {
              tensor_ = new global::Tensorflow.TensorDescription();
            }
            input.ReadMessage(tensor_);
            break;
          }
        }
      }
    }

  }

  public sealed partial class MemoryLogRawAllocation : pb::IMessage<MemoryLogRawAllocation> {
    private static readonly pb::MessageParser<MemoryLogRawAllocation> _parser = new pb::MessageParser<MemoryLogRawAllocation>(() => new MemoryLogRawAllocation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogRawAllocation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[4]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawAllocation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawAllocation(MemoryLogRawAllocation other) : this() {
      stepId_ = other.stepId_;
      operation_ = other.operation_;
      numBytes_ = other.numBytes_;
      ptr_ = other.ptr_;
      allocationId_ = other.allocationId_;
      allocatorName_ = other.allocatorName_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawAllocation Clone() {
      return new MemoryLogRawAllocation(this);
    }

    /// <summary>Field number for the "step_id" field.</summary>
    public const int StepIdFieldNumber = 1;
    private long stepId_;
    /// <summary>
    /// Process-unique step id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long StepId {
      get { return stepId_; }
      set {
        stepId_ = value;
      }
    }

    /// <summary>Field number for the "operation" field.</summary>
    public const int OperationFieldNumber = 2;
    private string operation_ = "";
    /// <summary>
    /// Name of the operation making the allocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Operation {
      get { return operation_; }
      set {
        operation_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "num_bytes" field.</summary>
    public const int NumBytesFieldNumber = 3;
    private long numBytes_;
    /// <summary>
    /// Number of bytes in the allocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long NumBytes {
      get { return numBytes_; }
      set {
        numBytes_ = value;
      }
    }

    /// <summary>Field number for the "ptr" field.</summary>
    public const int PtrFieldNumber = 4;
    private ulong ptr_;
    /// <summary>
    /// Address of the allocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ulong Ptr {
      get { return ptr_; }
      set {
        ptr_ = value;
      }
    }

    /// <summary>Field number for the "allocation_id" field.</summary>
    public const int AllocationIdFieldNumber = 5;
    private long allocationId_;
    /// <summary>
    /// Id of the tensor buffer being allocated, used to match to a
    /// corresponding deallocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long AllocationId {
      get { return allocationId_; }
      set {
        allocationId_ = value;
      }
    }

    /// <summary>Field number for the "allocator_name" field.</summary>
    public const int AllocatorNameFieldNumber = 6;
    private string allocatorName_ = "";
    /// <summary>
    /// Name of the allocator used.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AllocatorName {
      get { return allocatorName_; }
      set {
        allocatorName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogRawAllocation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogRawAllocation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StepId != other.StepId) return false;
      if (Operation != other.Operation) return false;
      if (NumBytes != other.NumBytes) return false;
      if (Ptr != other.Ptr) return false;
      if (AllocationId != other.AllocationId) return false;
      if (AllocatorName != other.AllocatorName) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StepId != 0L) hash ^= StepId.GetHashCode();
      if (Operation.Length != 0) hash ^= Operation.GetHashCode();
      if (NumBytes != 0L) hash ^= NumBytes.GetHashCode();
      if (Ptr != 0UL) hash ^= Ptr.GetHashCode();
      if (AllocationId != 0L) hash ^= AllocationId.GetHashCode();
      if (AllocatorName.Length != 0) hash ^= AllocatorName.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (StepId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(StepId);
      }
      if (Operation.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Operation);
      }
      if (NumBytes != 0L) {
        output.WriteRawTag(24);
        output.WriteInt64(NumBytes);
      }
      if (Ptr != 0UL) {
        output.WriteRawTag(32);
        output.WriteUInt64(Ptr);
      }
      if (AllocationId != 0L) {
        output.WriteRawTag(40);
        output.WriteInt64(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        output.WriteRawTag(50);
        output.WriteString(AllocatorName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StepId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(StepId);
      }
      if (Operation.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Operation);
      }
      if (NumBytes != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(NumBytes);
      }
      if (Ptr != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Ptr);
      }
      if (AllocationId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AllocatorName);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogRawAllocation other) {
      if (other == null) {
        return;
      }
      if (other.StepId != 0L) {
        StepId = other.StepId;
      }
      if (other.Operation.Length != 0) {
        Operation = other.Operation;
      }
      if (other.NumBytes != 0L) {
        NumBytes = other.NumBytes;
      }
      if (other.Ptr != 0UL) {
        Ptr = other.Ptr;
      }
      if (other.AllocationId != 0L) {
        AllocationId = other.AllocationId;
      }
      if (other.AllocatorName.Length != 0) {
        AllocatorName = other.AllocatorName;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StepId = input.ReadInt64();
            break;
          }
          case 18: {
            Operation = input.ReadString();
            break;
          }
          case 24: {
            NumBytes = input.ReadInt64();
            break;
          }
          case 32: {
            Ptr = input.ReadUInt64();
            break;
          }
          case 40: {
            AllocationId = input.ReadInt64();
            break;
          }
          case 50: {
            AllocatorName = input.ReadString();
            break;
          }
        }
      }
    }

  }

  public sealed partial class MemoryLogRawDeallocation : pb::IMessage<MemoryLogRawDeallocation> {
    private static readonly pb::MessageParser<MemoryLogRawDeallocation> _parser = new pb::MessageParser<MemoryLogRawDeallocation>(() => new MemoryLogRawDeallocation());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<MemoryLogRawDeallocation> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tensorflow.LogMemoryReflection.Descriptor.MessageTypes[5]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawDeallocation() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawDeallocation(MemoryLogRawDeallocation other) : this() {
      stepId_ = other.stepId_;
      operation_ = other.operation_;
      allocationId_ = other.allocationId_;
      allocatorName_ = other.allocatorName_;
      deferred_ = other.deferred_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public MemoryLogRawDeallocation Clone() {
      return new MemoryLogRawDeallocation(this);
    }

    /// <summary>Field number for the "step_id" field.</summary>
    public const int StepIdFieldNumber = 1;
    private long stepId_;
    /// <summary>
    /// Process-unique step id.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long StepId {
      get { return stepId_; }
      set {
        stepId_ = value;
      }
    }

    /// <summary>Field number for the "operation" field.</summary>
    public const int OperationFieldNumber = 2;
    private string operation_ = "";
    /// <summary>
    /// Name of the operation making the deallocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Operation {
      get { return operation_; }
      set {
        operation_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "allocation_id" field.</summary>
    public const int AllocationIdFieldNumber = 3;
    private long allocationId_;
    /// <summary>
    /// Id of the tensor buffer being deallocated, used to match to a
    /// corresponding allocation.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public long AllocationId {
      get { return allocationId_; }
      set {
        allocationId_ = value;
      }
    }

    /// <summary>Field number for the "allocator_name" field.</summary>
    public const int AllocatorNameFieldNumber = 4;
    private string allocatorName_ = "";
    /// <summary>
    /// Name of the allocator used.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string AllocatorName {
      get { return allocatorName_; }
      set {
        allocatorName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "deferred" field.</summary>
    public const int DeferredFieldNumber = 5;
    private bool deferred_;
    /// <summary>
    /// True if the deallocation is queued and will be performed later,
    /// e.g. for GPU lazy freeing of buffers.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Deferred {
      get { return deferred_; }
      set {
        deferred_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as MemoryLogRawDeallocation);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(MemoryLogRawDeallocation other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (StepId != other.StepId) return false;
      if (Operation != other.Operation) return false;
      if (AllocationId != other.AllocationId) return false;
      if (AllocatorName != other.AllocatorName) return false;
      if (Deferred != other.Deferred) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (StepId != 0L) hash ^= StepId.GetHashCode();
      if (Operation.Length != 0) hash ^= Operation.GetHashCode();
      if (AllocationId != 0L) hash ^= AllocationId.GetHashCode();
      if (AllocatorName.Length != 0) hash ^= AllocatorName.GetHashCode();
      if (Deferred != false) hash ^= Deferred.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (StepId != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(StepId);
      }
      if (Operation.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(Operation);
      }
      if (AllocationId != 0L) {
        output.WriteRawTag(24);
        output.WriteInt64(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(AllocatorName);
      }
      if (Deferred != false) {
        output.WriteRawTag(40);
        output.WriteBool(Deferred);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (StepId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(StepId);
      }
      if (Operation.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Operation);
      }
      if (AllocationId != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllocationId);
      }
      if (AllocatorName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AllocatorName);
      }
      if (Deferred != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(MemoryLogRawDeallocation other) {
      if (other == null) {
        return;
      }
      if (other.StepId != 0L) {
        StepId = other.StepId;
      }
      if (other.Operation.Length != 0) {
        Operation = other.Operation;
      }
      if (other.AllocationId != 0L) {
        AllocationId = other.AllocationId;
      }
      if (other.AllocatorName.Length != 0) {
        AllocatorName = other.AllocatorName;
      }
      if (other.Deferred != false) {
        Deferred = other.Deferred;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            StepId = input.ReadInt64();
            break;
          }
          case 18: {
            Operation = input.ReadString();
            break;
          }
          case 24: {
            AllocationId = input.ReadInt64();
            break;
          }
          case 34: {
            AllocatorName = input.ReadString();
            break;
          }
          case 40: {
            Deferred = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code
