All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tensorflow.tpu.TraceEvents Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/contrib/tpu/profiler/trace_events.proto

package tensorflow.tpu;

public final class TraceEvents {
  private TraceEvents() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface TraceOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.tpu.Trace)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ int getDevicesCount(); /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ boolean containsDevices( int key); /** * Use {@link #getDevicesMap()} instead. */ @java.lang.Deprecated java.util.Map getDevices(); /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ java.util.Map getDevicesMap(); /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ tensorflow.tpu.TraceEvents.Device getDevicesOrDefault( int key, tensorflow.tpu.TraceEvents.Device defaultValue); /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ tensorflow.tpu.TraceEvents.Device getDevicesOrThrow( int key); /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ java.util.List getTraceEventsList(); /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ tensorflow.tpu.TraceEvents.TraceEvent getTraceEvents(int index); /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ int getTraceEventsCount(); /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ java.util.List getTraceEventsOrBuilderList(); /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ tensorflow.tpu.TraceEvents.TraceEventOrBuilder getTraceEventsOrBuilder( int index); } /** *
   * A 'Trace' contains metadata for the individual traces of a system.
   * 
* * Protobuf type {@code tensorflow.tpu.Trace} */ public static final class Trace extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.Trace) TraceOrBuilder { private static final long serialVersionUID = 0L; // Use Trace.newBuilder() to construct. private Trace(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Trace() { traceEvents_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Trace( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { devices_ = com.google.protobuf.MapField.newMapField( DevicesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry devices__ = input.readMessage( DevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); devices_.getMutableMap().put( devices__.getKey(), devices__.getValue()); break; } case 34: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { traceEvents_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } traceEvents_.add( input.readMessage(tensorflow.tpu.TraceEvents.TraceEvent.parser(), extensionRegistry)); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { traceEvents_ = java.util.Collections.unmodifiableList(traceEvents_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 1: return internalGetDevices(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Trace.class, tensorflow.tpu.TraceEvents.Trace.Builder.class); } public static final int DEVICES_FIELD_NUMBER = 1; private static final class DevicesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.Integer, tensorflow.tpu.TraceEvents.Device> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_DevicesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.UINT32, 0, com.google.protobuf.WireFormat.FieldType.MESSAGE, tensorflow.tpu.TraceEvents.Device.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.Integer, tensorflow.tpu.TraceEvents.Device> devices_; private com.google.protobuf.MapField internalGetDevices() { if (devices_ == null) { return com.google.protobuf.MapField.emptyMapField( DevicesDefaultEntryHolder.defaultEntry); } return devices_; } public int getDevicesCount() { return internalGetDevices().getMap().size(); } /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public boolean containsDevices( int key) { return internalGetDevices().getMap().containsKey(key); } /** * Use {@link #getDevicesMap()} instead. */ @java.lang.Deprecated public java.util.Map getDevices() { return getDevicesMap(); } /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public java.util.Map getDevicesMap() { return internalGetDevices().getMap(); } /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public tensorflow.tpu.TraceEvents.Device getDevicesOrDefault( int key, tensorflow.tpu.TraceEvents.Device defaultValue) { java.util.Map map = internalGetDevices().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * The devices that this trace has information about. Maps from device_id to
     * more data about the specific device.
     * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public tensorflow.tpu.TraceEvents.Device getDevicesOrThrow( int key) { java.util.Map map = internalGetDevices().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int TRACE_EVENTS_FIELD_NUMBER = 4; private java.util.List traceEvents_; /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public java.util.List getTraceEventsList() { return traceEvents_; } /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public java.util.List getTraceEventsOrBuilderList() { return traceEvents_; } /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public int getTraceEventsCount() { return traceEvents_.size(); } /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEvent getTraceEvents(int index) { return traceEvents_.get(index); } /** *
     * All trace events capturing in the profiling period.
     * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEventOrBuilder getTraceEventsOrBuilder( int index) { return traceEvents_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 .serializeIntegerMapTo( output, internalGetDevices(), DevicesDefaultEntryHolder.defaultEntry, 1); for (int i = 0; i < traceEvents_.size(); i++) { output.writeMessage(4, traceEvents_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (java.util.Map.Entry entry : internalGetDevices().getMap().entrySet()) { com.google.protobuf.MapEntry devices__ = DevicesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, devices__); } for (int i = 0; i < traceEvents_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, traceEvents_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tensorflow.tpu.TraceEvents.Trace)) { return super.equals(obj); } tensorflow.tpu.TraceEvents.Trace other = (tensorflow.tpu.TraceEvents.Trace) obj; boolean result = true; result = result && internalGetDevices().equals( other.internalGetDevices()); result = result && getTraceEventsList() .equals(other.getTraceEventsList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (!internalGetDevices().getMap().isEmpty()) { hash = (37 * hash) + DEVICES_FIELD_NUMBER; hash = (53 * hash) + internalGetDevices().hashCode(); } if (getTraceEventsCount() > 0) { hash = (37 * hash) + TRACE_EVENTS_FIELD_NUMBER; hash = (53 * hash) + getTraceEventsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TraceEvents.Trace parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Trace parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Trace parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Trace parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Trace parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Trace parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TraceEvents.Trace prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * A 'Trace' contains metadata for the individual traces of a system.
     * 
* * Protobuf type {@code tensorflow.tpu.Trace} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.Trace) tensorflow.tpu.TraceEvents.TraceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 1: return internalGetDevices(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 1: return internalGetMutableDevices(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Trace.class, tensorflow.tpu.TraceEvents.Trace.Builder.class); } // Construct using tensorflow.tpu.TraceEvents.Trace.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTraceEventsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); internalGetMutableDevices().clear(); if (traceEventsBuilder_ == null) { traceEvents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { traceEventsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Trace_descriptor; } @java.lang.Override public tensorflow.tpu.TraceEvents.Trace getDefaultInstanceForType() { return tensorflow.tpu.TraceEvents.Trace.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TraceEvents.Trace build() { tensorflow.tpu.TraceEvents.Trace result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TraceEvents.Trace buildPartial() { tensorflow.tpu.TraceEvents.Trace result = new tensorflow.tpu.TraceEvents.Trace(this); int from_bitField0_ = bitField0_; result.devices_ = internalGetDevices(); result.devices_.makeImmutable(); if (traceEventsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { traceEvents_ = java.util.Collections.unmodifiableList(traceEvents_); bitField0_ = (bitField0_ & ~0x00000002); } result.traceEvents_ = traceEvents_; } else { result.traceEvents_ = traceEventsBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TraceEvents.Trace) { return mergeFrom((tensorflow.tpu.TraceEvents.Trace)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TraceEvents.Trace other) { if (other == tensorflow.tpu.TraceEvents.Trace.getDefaultInstance()) return this; internalGetMutableDevices().mergeFrom( other.internalGetDevices()); if (traceEventsBuilder_ == null) { if (!other.traceEvents_.isEmpty()) { if (traceEvents_.isEmpty()) { traceEvents_ = other.traceEvents_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTraceEventsIsMutable(); traceEvents_.addAll(other.traceEvents_); } onChanged(); } } else { if (!other.traceEvents_.isEmpty()) { if (traceEventsBuilder_.isEmpty()) { traceEventsBuilder_.dispose(); traceEventsBuilder_ = null; traceEvents_ = other.traceEvents_; bitField0_ = (bitField0_ & ~0x00000002); traceEventsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTraceEventsFieldBuilder() : null; } else { traceEventsBuilder_.addAllMessages(other.traceEvents_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TraceEvents.Trace parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TraceEvents.Trace) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.MapField< java.lang.Integer, tensorflow.tpu.TraceEvents.Device> devices_; private com.google.protobuf.MapField internalGetDevices() { if (devices_ == null) { return com.google.protobuf.MapField.emptyMapField( DevicesDefaultEntryHolder.defaultEntry); } return devices_; } private com.google.protobuf.MapField internalGetMutableDevices() { onChanged();; if (devices_ == null) { devices_ = com.google.protobuf.MapField.newMapField( DevicesDefaultEntryHolder.defaultEntry); } if (!devices_.isMutable()) { devices_ = devices_.copy(); } return devices_; } public int getDevicesCount() { return internalGetDevices().getMap().size(); } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public boolean containsDevices( int key) { return internalGetDevices().getMap().containsKey(key); } /** * Use {@link #getDevicesMap()} instead. */ @java.lang.Deprecated public java.util.Map getDevices() { return getDevicesMap(); } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public java.util.Map getDevicesMap() { return internalGetDevices().getMap(); } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public tensorflow.tpu.TraceEvents.Device getDevicesOrDefault( int key, tensorflow.tpu.TraceEvents.Device defaultValue) { java.util.Map map = internalGetDevices().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public tensorflow.tpu.TraceEvents.Device getDevicesOrThrow( int key) { java.util.Map map = internalGetDevices().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearDevices() { internalGetMutableDevices().getMutableMap() .clear(); return this; } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public Builder removeDevices( int key) { internalGetMutableDevices().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableDevices() { return internalGetMutableDevices().getMutableMap(); } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public Builder putDevices( int key, tensorflow.tpu.TraceEvents.Device value) { if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableDevices().getMutableMap() .put(key, value); return this; } /** *
       * The devices that this trace has information about. Maps from device_id to
       * more data about the specific device.
       * 
* * map<uint32, .tensorflow.tpu.Device> devices = 1; */ public Builder putAllDevices( java.util.Map values) { internalGetMutableDevices().getMutableMap() .putAll(values); return this; } private java.util.List traceEvents_ = java.util.Collections.emptyList(); private void ensureTraceEventsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { traceEvents_ = new java.util.ArrayList(traceEvents_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TraceEvents.TraceEvent, tensorflow.tpu.TraceEvents.TraceEvent.Builder, tensorflow.tpu.TraceEvents.TraceEventOrBuilder> traceEventsBuilder_; /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public java.util.List getTraceEventsList() { if (traceEventsBuilder_ == null) { return java.util.Collections.unmodifiableList(traceEvents_); } else { return traceEventsBuilder_.getMessageList(); } } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public int getTraceEventsCount() { if (traceEventsBuilder_ == null) { return traceEvents_.size(); } else { return traceEventsBuilder_.getCount(); } } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEvent getTraceEvents(int index) { if (traceEventsBuilder_ == null) { return traceEvents_.get(index); } else { return traceEventsBuilder_.getMessage(index); } } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder setTraceEvents( int index, tensorflow.tpu.TraceEvents.TraceEvent value) { if (traceEventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTraceEventsIsMutable(); traceEvents_.set(index, value); onChanged(); } else { traceEventsBuilder_.setMessage(index, value); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder setTraceEvents( int index, tensorflow.tpu.TraceEvents.TraceEvent.Builder builderForValue) { if (traceEventsBuilder_ == null) { ensureTraceEventsIsMutable(); traceEvents_.set(index, builderForValue.build()); onChanged(); } else { traceEventsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder addTraceEvents(tensorflow.tpu.TraceEvents.TraceEvent value) { if (traceEventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTraceEventsIsMutable(); traceEvents_.add(value); onChanged(); } else { traceEventsBuilder_.addMessage(value); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder addTraceEvents( int index, tensorflow.tpu.TraceEvents.TraceEvent value) { if (traceEventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTraceEventsIsMutable(); traceEvents_.add(index, value); onChanged(); } else { traceEventsBuilder_.addMessage(index, value); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder addTraceEvents( tensorflow.tpu.TraceEvents.TraceEvent.Builder builderForValue) { if (traceEventsBuilder_ == null) { ensureTraceEventsIsMutable(); traceEvents_.add(builderForValue.build()); onChanged(); } else { traceEventsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder addTraceEvents( int index, tensorflow.tpu.TraceEvents.TraceEvent.Builder builderForValue) { if (traceEventsBuilder_ == null) { ensureTraceEventsIsMutable(); traceEvents_.add(index, builderForValue.build()); onChanged(); } else { traceEventsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder addAllTraceEvents( java.lang.Iterable values) { if (traceEventsBuilder_ == null) { ensureTraceEventsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, traceEvents_); onChanged(); } else { traceEventsBuilder_.addAllMessages(values); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder clearTraceEvents() { if (traceEventsBuilder_ == null) { traceEvents_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { traceEventsBuilder_.clear(); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public Builder removeTraceEvents(int index) { if (traceEventsBuilder_ == null) { ensureTraceEventsIsMutable(); traceEvents_.remove(index); onChanged(); } else { traceEventsBuilder_.remove(index); } return this; } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEvent.Builder getTraceEventsBuilder( int index) { return getTraceEventsFieldBuilder().getBuilder(index); } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEventOrBuilder getTraceEventsOrBuilder( int index) { if (traceEventsBuilder_ == null) { return traceEvents_.get(index); } else { return traceEventsBuilder_.getMessageOrBuilder(index); } } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public java.util.List getTraceEventsOrBuilderList() { if (traceEventsBuilder_ != null) { return traceEventsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(traceEvents_); } } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEvent.Builder addTraceEventsBuilder() { return getTraceEventsFieldBuilder().addBuilder( tensorflow.tpu.TraceEvents.TraceEvent.getDefaultInstance()); } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public tensorflow.tpu.TraceEvents.TraceEvent.Builder addTraceEventsBuilder( int index) { return getTraceEventsFieldBuilder().addBuilder( index, tensorflow.tpu.TraceEvents.TraceEvent.getDefaultInstance()); } /** *
       * All trace events capturing in the profiling period.
       * 
* * repeated .tensorflow.tpu.TraceEvent trace_events = 4; */ public java.util.List getTraceEventsBuilderList() { return getTraceEventsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TraceEvents.TraceEvent, tensorflow.tpu.TraceEvents.TraceEvent.Builder, tensorflow.tpu.TraceEvents.TraceEventOrBuilder> getTraceEventsFieldBuilder() { if (traceEventsBuilder_ == null) { traceEventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.tpu.TraceEvents.TraceEvent, tensorflow.tpu.TraceEvents.TraceEvent.Builder, tensorflow.tpu.TraceEvents.TraceEventOrBuilder>( traceEvents_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); traceEvents_ = null; } return traceEventsBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.Trace) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.Trace) private static final tensorflow.tpu.TraceEvents.Trace DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TraceEvents.Trace(); } public static tensorflow.tpu.TraceEvents.Trace getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Trace parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Trace(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TraceEvents.Trace getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.tpu.Device) com.google.protobuf.MessageOrBuilder { /** *
     * The name of the device.
     * 
* * string name = 1; */ java.lang.String getName(); /** *
     * The name of the device.
     * 
* * string name = 1; */ com.google.protobuf.ByteString getNameBytes(); /** *
     * The id of this device, unique in a single trace.
     * 
* * uint32 device_id = 2; */ int getDeviceId(); /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ int getResourcesCount(); /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ boolean containsResources( int key); /** * Use {@link #getResourcesMap()} instead. */ @java.lang.Deprecated java.util.Map getResources(); /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ java.util.Map getResourcesMap(); /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ tensorflow.tpu.TraceEvents.Resource getResourcesOrDefault( int key, tensorflow.tpu.TraceEvents.Resource defaultValue); /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ tensorflow.tpu.TraceEvents.Resource getResourcesOrThrow( int key); } /** *
   * A 'device' is a physical entity in the system and is comprised of several
   * resources.
   * 
* * Protobuf type {@code tensorflow.tpu.Device} */ public static final class Device extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.Device) DeviceOrBuilder { private static final long serialVersionUID = 0L; // Use Device.newBuilder() to construct. private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Device() { name_ = ""; deviceId_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Device( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { deviceId_ = input.readUInt32(); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { resources_ = com.google.protobuf.MapField.newMapField( ResourcesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000004; } com.google.protobuf.MapEntry resources__ = input.readMessage( ResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); resources_.getMutableMap().put( resources__.getKey(), resources__.getValue()); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetResources(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Device.class, tensorflow.tpu.TraceEvents.Device.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * The name of the device.
     * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * The name of the device.
     * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEVICE_ID_FIELD_NUMBER = 2; private int deviceId_; /** *
     * The id of this device, unique in a single trace.
     * 
* * uint32 device_id = 2; */ public int getDeviceId() { return deviceId_; } public static final int RESOURCES_FIELD_NUMBER = 3; private static final class ResourcesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.Integer, tensorflow.tpu.TraceEvents.Resource> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_ResourcesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.UINT32, 0, com.google.protobuf.WireFormat.FieldType.MESSAGE, tensorflow.tpu.TraceEvents.Resource.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.Integer, tensorflow.tpu.TraceEvents.Resource> resources_; private com.google.protobuf.MapField internalGetResources() { if (resources_ == null) { return com.google.protobuf.MapField.emptyMapField( ResourcesDefaultEntryHolder.defaultEntry); } return resources_; } public int getResourcesCount() { return internalGetResources().getMap().size(); } /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public boolean containsResources( int key) { return internalGetResources().getMap().containsKey(key); } /** * Use {@link #getResourcesMap()} instead. */ @java.lang.Deprecated public java.util.Map getResources() { return getResourcesMap(); } /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public java.util.Map getResourcesMap() { return internalGetResources().getMap(); } /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public tensorflow.tpu.TraceEvents.Resource getResourcesOrDefault( int key, tensorflow.tpu.TraceEvents.Resource defaultValue) { java.util.Map map = internalGetResources().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * The resources on this device, keyed by resource_id;
     * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public tensorflow.tpu.TraceEvents.Resource getResourcesOrThrow( int key) { java.util.Map map = internalGetResources().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (deviceId_ != 0) { output.writeUInt32(2, deviceId_); } com.google.protobuf.GeneratedMessageV3 .serializeIntegerMapTo( output, internalGetResources(), ResourcesDefaultEntryHolder.defaultEntry, 3); unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (deviceId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, deviceId_); } for (java.util.Map.Entry entry : internalGetResources().getMap().entrySet()) { com.google.protobuf.MapEntry resources__ = ResourcesDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, resources__); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tensorflow.tpu.TraceEvents.Device)) { return super.equals(obj); } tensorflow.tpu.TraceEvents.Device other = (tensorflow.tpu.TraceEvents.Device) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && (getDeviceId() == other.getDeviceId()); result = result && internalGetResources().equals( other.internalGetResources()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; hash = (53 * hash) + getDeviceId(); if (!internalGetResources().getMap().isEmpty()) { hash = (37 * hash) + RESOURCES_FIELD_NUMBER; hash = (53 * hash) + internalGetResources().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TraceEvents.Device parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Device parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Device parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Device parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Device parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Device parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Device parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Device parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Device parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Device parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Device parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TraceEvents.Device prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * A 'device' is a physical entity in the system and is comprised of several
     * resources.
     * 
* * Protobuf type {@code tensorflow.tpu.Device} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.Device) tensorflow.tpu.TraceEvents.DeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetResources(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 3: return internalGetMutableResources(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Device.class, tensorflow.tpu.TraceEvents.Device.Builder.class); } // Construct using tensorflow.tpu.TraceEvents.Device.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; deviceId_ = 0; internalGetMutableResources().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Device_descriptor; } @java.lang.Override public tensorflow.tpu.TraceEvents.Device getDefaultInstanceForType() { return tensorflow.tpu.TraceEvents.Device.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TraceEvents.Device build() { tensorflow.tpu.TraceEvents.Device result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TraceEvents.Device buildPartial() { tensorflow.tpu.TraceEvents.Device result = new tensorflow.tpu.TraceEvents.Device(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.deviceId_ = deviceId_; result.resources_ = internalGetResources(); result.resources_.makeImmutable(); result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TraceEvents.Device) { return mergeFrom((tensorflow.tpu.TraceEvents.Device)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TraceEvents.Device other) { if (other == tensorflow.tpu.TraceEvents.Device.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getDeviceId() != 0) { setDeviceId(other.getDeviceId()); } internalGetMutableResources().mergeFrom( other.internalGetResources()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TraceEvents.Device parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TraceEvents.Device) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * The name of the device.
       * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The name of the device.
       * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The name of the device.
       * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * The name of the device.
       * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * The name of the device.
       * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private int deviceId_ ; /** *
       * The id of this device, unique in a single trace.
       * 
* * uint32 device_id = 2; */ public int getDeviceId() { return deviceId_; } /** *
       * The id of this device, unique in a single trace.
       * 
* * uint32 device_id = 2; */ public Builder setDeviceId(int value) { deviceId_ = value; onChanged(); return this; } /** *
       * The id of this device, unique in a single trace.
       * 
* * uint32 device_id = 2; */ public Builder clearDeviceId() { deviceId_ = 0; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.Integer, tensorflow.tpu.TraceEvents.Resource> resources_; private com.google.protobuf.MapField internalGetResources() { if (resources_ == null) { return com.google.protobuf.MapField.emptyMapField( ResourcesDefaultEntryHolder.defaultEntry); } return resources_; } private com.google.protobuf.MapField internalGetMutableResources() { onChanged();; if (resources_ == null) { resources_ = com.google.protobuf.MapField.newMapField( ResourcesDefaultEntryHolder.defaultEntry); } if (!resources_.isMutable()) { resources_ = resources_.copy(); } return resources_; } public int getResourcesCount() { return internalGetResources().getMap().size(); } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public boolean containsResources( int key) { return internalGetResources().getMap().containsKey(key); } /** * Use {@link #getResourcesMap()} instead. */ @java.lang.Deprecated public java.util.Map getResources() { return getResourcesMap(); } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public java.util.Map getResourcesMap() { return internalGetResources().getMap(); } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public tensorflow.tpu.TraceEvents.Resource getResourcesOrDefault( int key, tensorflow.tpu.TraceEvents.Resource defaultValue) { java.util.Map map = internalGetResources().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public tensorflow.tpu.TraceEvents.Resource getResourcesOrThrow( int key) { java.util.Map map = internalGetResources().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearResources() { internalGetMutableResources().getMutableMap() .clear(); return this; } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public Builder removeResources( int key) { internalGetMutableResources().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableResources() { return internalGetMutableResources().getMutableMap(); } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public Builder putResources( int key, tensorflow.tpu.TraceEvents.Resource value) { if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableResources().getMutableMap() .put(key, value); return this; } /** *
       * The resources on this device, keyed by resource_id;
       * 
* * map<uint32, .tensorflow.tpu.Resource> resources = 3; */ public Builder putAllResources( java.util.Map values) { internalGetMutableResources().getMutableMap() .putAll(values); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.Device) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.Device) private static final tensorflow.tpu.TraceEvents.Device DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TraceEvents.Device(); } public static tensorflow.tpu.TraceEvents.Device getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Device parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Device(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TraceEvents.Device getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ResourceOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.tpu.Resource) com.google.protobuf.MessageOrBuilder { /** *
     * The name of the resource.
     * 
* * string name = 1; */ java.lang.String getName(); /** *
     * The name of the resource.
     * 
* * string name = 1; */ com.google.protobuf.ByteString getNameBytes(); /** *
     * The id of the resource. Unique within a device.
     * 
* * uint32 resource_id = 2; */ int getResourceId(); } /** *
   * A 'resource' generally is a specific computation component on a device. These
   * can range from threads on CPUs to specific arithmetic units on hardware
   * devices.
   * 
* * Protobuf type {@code tensorflow.tpu.Resource} */ public static final class Resource extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.Resource) ResourceOrBuilder { private static final long serialVersionUID = 0L; // Use Resource.newBuilder() to construct. private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Resource() { name_ = ""; resourceId_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Resource( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { resourceId_ = input.readUInt32(); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Resource.class, tensorflow.tpu.TraceEvents.Resource.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * The name of the resource.
     * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * The name of the resource.
     * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOURCE_ID_FIELD_NUMBER = 2; private int resourceId_; /** *
     * The id of the resource. Unique within a device.
     * 
* * uint32 resource_id = 2; */ public int getResourceId() { return resourceId_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (resourceId_ != 0) { output.writeUInt32(2, resourceId_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (resourceId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, resourceId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tensorflow.tpu.TraceEvents.Resource)) { return super.equals(obj); } tensorflow.tpu.TraceEvents.Resource other = (tensorflow.tpu.TraceEvents.Resource) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && (getResourceId() == other.getResourceId()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + RESOURCE_ID_FIELD_NUMBER; hash = (53 * hash) + getResourceId(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TraceEvents.Resource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Resource parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Resource parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Resource parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.Resource parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TraceEvents.Resource prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * A 'resource' generally is a specific computation component on a device. These
     * can range from threads on CPUs to specific arithmetic units on hardware
     * devices.
     * 
* * Protobuf type {@code tensorflow.tpu.Resource} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.Resource) tensorflow.tpu.TraceEvents.ResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.Resource.class, tensorflow.tpu.TraceEvents.Resource.Builder.class); } // Construct using tensorflow.tpu.TraceEvents.Resource.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; resourceId_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_Resource_descriptor; } @java.lang.Override public tensorflow.tpu.TraceEvents.Resource getDefaultInstanceForType() { return tensorflow.tpu.TraceEvents.Resource.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TraceEvents.Resource build() { tensorflow.tpu.TraceEvents.Resource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TraceEvents.Resource buildPartial() { tensorflow.tpu.TraceEvents.Resource result = new tensorflow.tpu.TraceEvents.Resource(this); result.name_ = name_; result.resourceId_ = resourceId_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TraceEvents.Resource) { return mergeFrom((tensorflow.tpu.TraceEvents.Resource)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TraceEvents.Resource other) { if (other == tensorflow.tpu.TraceEvents.Resource.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getResourceId() != 0) { setResourceId(other.getResourceId()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TraceEvents.Resource parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TraceEvents.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** *
       * The name of the resource.
       * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The name of the resource.
       * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The name of the resource.
       * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * The name of the resource.
       * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * The name of the resource.
       * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private int resourceId_ ; /** *
       * The id of the resource. Unique within a device.
       * 
* * uint32 resource_id = 2; */ public int getResourceId() { return resourceId_; } /** *
       * The id of the resource. Unique within a device.
       * 
* * uint32 resource_id = 2; */ public Builder setResourceId(int value) { resourceId_ = value; onChanged(); return this; } /** *
       * The id of the resource. Unique within a device.
       * 
* * uint32 resource_id = 2; */ public Builder clearResourceId() { resourceId_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.Resource) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.Resource) private static final tensorflow.tpu.TraceEvents.Resource DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TraceEvents.Resource(); } public static tensorflow.tpu.TraceEvents.Resource getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Resource(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TraceEvents.Resource getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface TraceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.tpu.TraceEvent) com.google.protobuf.MessageOrBuilder { /** *
     * The id of the device that this event occurred on. The full dataset should
     * have this device present in the Trace object.
     * 
* * uint32 device_id = 1; */ int getDeviceId(); /** *
     * The id of the resource that this event occurred on. The full dataset should
     * have this resource present in the Device object of the Trace object. A
     * resource_id is unique on a specific device, but not necessarily within the
     * trace.
     * 
* * uint32 resource_id = 2; */ int getResourceId(); /** *
     * The name of this trace event.
     * 
* * string name = 3; */ java.lang.String getName(); /** *
     * The name of this trace event.
     * 
* * string name = 3; */ com.google.protobuf.ByteString getNameBytes(); /** *
     * The timestamp that this event occurred at (in picos since tracing started).
     * 
* * uint64 timestamp_ps = 9; */ long getTimestampPs(); /** *
     * The duration of the event in picoseconds if applicable.
     * Events without duration are called instant events.
     * 
* * uint64 duration_ps = 10; */ long getDurationPs(); } /** * Protobuf type {@code tensorflow.tpu.TraceEvent} */ public static final class TraceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.tpu.TraceEvent) TraceEventOrBuilder { private static final long serialVersionUID = 0L; // Use TraceEvent.newBuilder() to construct. private TraceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TraceEvent() { deviceId_ = 0; resourceId_ = 0; name_ = ""; timestampPs_ = 0L; durationPs_ = 0L; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TraceEvent( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { deviceId_ = input.readUInt32(); break; } case 16: { resourceId_ = input.readUInt32(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 72: { timestampPs_ = input.readUInt64(); break; } case 80: { durationPs_ = input.readUInt64(); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_TraceEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_TraceEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.TraceEvent.class, tensorflow.tpu.TraceEvents.TraceEvent.Builder.class); } public static final int DEVICE_ID_FIELD_NUMBER = 1; private int deviceId_; /** *
     * The id of the device that this event occurred on. The full dataset should
     * have this device present in the Trace object.
     * 
* * uint32 device_id = 1; */ public int getDeviceId() { return deviceId_; } public static final int RESOURCE_ID_FIELD_NUMBER = 2; private int resourceId_; /** *
     * The id of the resource that this event occurred on. The full dataset should
     * have this resource present in the Device object of the Trace object. A
     * resource_id is unique on a specific device, but not necessarily within the
     * trace.
     * 
* * uint32 resource_id = 2; */ public int getResourceId() { return resourceId_; } public static final int NAME_FIELD_NUMBER = 3; private volatile java.lang.Object name_; /** *
     * The name of this trace event.
     * 
* * string name = 3; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * The name of this trace event.
     * 
* * string name = 3; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TIMESTAMP_PS_FIELD_NUMBER = 9; private long timestampPs_; /** *
     * The timestamp that this event occurred at (in picos since tracing started).
     * 
* * uint64 timestamp_ps = 9; */ public long getTimestampPs() { return timestampPs_; } public static final int DURATION_PS_FIELD_NUMBER = 10; private long durationPs_; /** *
     * The duration of the event in picoseconds if applicable.
     * Events without duration are called instant events.
     * 
* * uint64 duration_ps = 10; */ public long getDurationPs() { return durationPs_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (deviceId_ != 0) { output.writeUInt32(1, deviceId_); } if (resourceId_ != 0) { output.writeUInt32(2, resourceId_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } if (timestampPs_ != 0L) { output.writeUInt64(9, timestampPs_); } if (durationPs_ != 0L) { output.writeUInt64(10, durationPs_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (deviceId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, deviceId_); } if (resourceId_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, resourceId_); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } if (timestampPs_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(9, timestampPs_); } if (durationPs_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(10, durationPs_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tensorflow.tpu.TraceEvents.TraceEvent)) { return super.equals(obj); } tensorflow.tpu.TraceEvents.TraceEvent other = (tensorflow.tpu.TraceEvents.TraceEvent) obj; boolean result = true; result = result && (getDeviceId() == other.getDeviceId()); result = result && (getResourceId() == other.getResourceId()); result = result && getName() .equals(other.getName()); result = result && (getTimestampPs() == other.getTimestampPs()); result = result && (getDurationPs() == other.getDurationPs()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; hash = (53 * hash) + getDeviceId(); hash = (37 * hash) + RESOURCE_ID_FIELD_NUMBER; hash = (53 * hash) + getResourceId(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TIMESTAMP_PS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTimestampPs()); hash = (37 * hash) + DURATION_PS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getDurationPs()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.TraceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.TraceEvent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.tpu.TraceEvents.TraceEvent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.tpu.TraceEvents.TraceEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code tensorflow.tpu.TraceEvent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.tpu.TraceEvent) tensorflow.tpu.TraceEvents.TraceEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_TraceEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_TraceEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.tpu.TraceEvents.TraceEvent.class, tensorflow.tpu.TraceEvents.TraceEvent.Builder.class); } // Construct using tensorflow.tpu.TraceEvents.TraceEvent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); deviceId_ = 0; resourceId_ = 0; name_ = ""; timestampPs_ = 0L; durationPs_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.tpu.TraceEvents.internal_static_tensorflow_tpu_TraceEvent_descriptor; } @java.lang.Override public tensorflow.tpu.TraceEvents.TraceEvent getDefaultInstanceForType() { return tensorflow.tpu.TraceEvents.TraceEvent.getDefaultInstance(); } @java.lang.Override public tensorflow.tpu.TraceEvents.TraceEvent build() { tensorflow.tpu.TraceEvents.TraceEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.tpu.TraceEvents.TraceEvent buildPartial() { tensorflow.tpu.TraceEvents.TraceEvent result = new tensorflow.tpu.TraceEvents.TraceEvent(this); result.deviceId_ = deviceId_; result.resourceId_ = resourceId_; result.name_ = name_; result.timestampPs_ = timestampPs_; result.durationPs_ = durationPs_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.tpu.TraceEvents.TraceEvent) { return mergeFrom((tensorflow.tpu.TraceEvents.TraceEvent)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.tpu.TraceEvents.TraceEvent other) { if (other == tensorflow.tpu.TraceEvents.TraceEvent.getDefaultInstance()) return this; if (other.getDeviceId() != 0) { setDeviceId(other.getDeviceId()); } if (other.getResourceId() != 0) { setResourceId(other.getResourceId()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getTimestampPs() != 0L) { setTimestampPs(other.getTimestampPs()); } if (other.getDurationPs() != 0L) { setDurationPs(other.getDurationPs()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.tpu.TraceEvents.TraceEvent parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.tpu.TraceEvents.TraceEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int deviceId_ ; /** *
       * The id of the device that this event occurred on. The full dataset should
       * have this device present in the Trace object.
       * 
* * uint32 device_id = 1; */ public int getDeviceId() { return deviceId_; } /** *
       * The id of the device that this event occurred on. The full dataset should
       * have this device present in the Trace object.
       * 
* * uint32 device_id = 1; */ public Builder setDeviceId(int value) { deviceId_ = value; onChanged(); return this; } /** *
       * The id of the device that this event occurred on. The full dataset should
       * have this device present in the Trace object.
       * 
* * uint32 device_id = 1; */ public Builder clearDeviceId() { deviceId_ = 0; onChanged(); return this; } private int resourceId_ ; /** *
       * The id of the resource that this event occurred on. The full dataset should
       * have this resource present in the Device object of the Trace object. A
       * resource_id is unique on a specific device, but not necessarily within the
       * trace.
       * 
* * uint32 resource_id = 2; */ public int getResourceId() { return resourceId_; } /** *
       * The id of the resource that this event occurred on. The full dataset should
       * have this resource present in the Device object of the Trace object. A
       * resource_id is unique on a specific device, but not necessarily within the
       * trace.
       * 
* * uint32 resource_id = 2; */ public Builder setResourceId(int value) { resourceId_ = value; onChanged(); return this; } /** *
       * The id of the resource that this event occurred on. The full dataset should
       * have this resource present in the Device object of the Trace object. A
       * resource_id is unique on a specific device, but not necessarily within the
       * trace.
       * 
* * uint32 resource_id = 2; */ public Builder clearResourceId() { resourceId_ = 0; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
       * The name of this trace event.
       * 
* * string name = 3; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The name of this trace event.
       * 
* * string name = 3; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The name of this trace event.
       * 
* * string name = 3; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * The name of this trace event.
       * 
* * string name = 3; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * The name of this trace event.
       * 
* * string name = 3; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private long timestampPs_ ; /** *
       * The timestamp that this event occurred at (in picos since tracing started).
       * 
* * uint64 timestamp_ps = 9; */ public long getTimestampPs() { return timestampPs_; } /** *
       * The timestamp that this event occurred at (in picos since tracing started).
       * 
* * uint64 timestamp_ps = 9; */ public Builder setTimestampPs(long value) { timestampPs_ = value; onChanged(); return this; } /** *
       * The timestamp that this event occurred at (in picos since tracing started).
       * 
* * uint64 timestamp_ps = 9; */ public Builder clearTimestampPs() { timestampPs_ = 0L; onChanged(); return this; } private long durationPs_ ; /** *
       * The duration of the event in picoseconds if applicable.
       * Events without duration are called instant events.
       * 
* * uint64 duration_ps = 10; */ public long getDurationPs() { return durationPs_; } /** *
       * The duration of the event in picoseconds if applicable.
       * Events without duration are called instant events.
       * 
* * uint64 duration_ps = 10; */ public Builder setDurationPs(long value) { durationPs_ = value; onChanged(); return this; } /** *
       * The duration of the event in picoseconds if applicable.
       * Events without duration are called instant events.
       * 
* * uint64 duration_ps = 10; */ public Builder clearDurationPs() { durationPs_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.tpu.TraceEvent) } // @@protoc_insertion_point(class_scope:tensorflow.tpu.TraceEvent) private static final tensorflow.tpu.TraceEvents.TraceEvent DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.tpu.TraceEvents.TraceEvent(); } public static tensorflow.tpu.TraceEvents.TraceEvent getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TraceEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TraceEvent(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.tpu.TraceEvents.TraceEvent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_Trace_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_Trace_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_Trace_DevicesEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_Trace_DevicesEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_Device_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_Device_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_Device_ResourcesEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_Device_ResourcesEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_Resource_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_Resource_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_tpu_TraceEvent_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_tpu_TraceEvent_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n2tensorflow/contrib/tpu/profiler/trace_" + "events.proto\022\016tensorflow.tpu\"\266\001\n\005Trace\0223" + "\n\007devices\030\001 \003(\0132\".tensorflow.tpu.Trace.D" + "evicesEntry\0220\n\014trace_events\030\004 \003(\0132\032.tens" + "orflow.tpu.TraceEvent\032F\n\014DevicesEntry\022\013\n" + "\003key\030\001 \001(\r\022%\n\005value\030\002 \001(\0132\026.tensorflow.t" + "pu.Device:\0028\001\"\257\001\n\006Device\022\014\n\004name\030\001 \001(\t\022\021" + "\n\tdevice_id\030\002 \001(\r\0228\n\tresources\030\003 \003(\0132%.t" + "ensorflow.tpu.Device.ResourcesEntry\032J\n\016R" + "esourcesEntry\022\013\n\003key\030\001 \001(\r\022\'\n\005value\030\002 \001(" + "\0132\030.tensorflow.tpu.Resource:\0028\001\"-\n\010Resou" + "rce\022\014\n\004name\030\001 \001(\t\022\023\n\013resource_id\030\002 \001(\r\"m" + "\n\nTraceEvent\022\021\n\tdevice_id\030\001 \001(\r\022\023\n\013resou" + "rce_id\030\002 \001(\r\022\014\n\004name\030\003 \001(\t\022\024\n\014timestamp_" + "ps\030\t \001(\004\022\023\n\013duration_ps\030\n \001(\004b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); internal_static_tensorflow_tpu_Trace_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_tpu_Trace_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_Trace_descriptor, new java.lang.String[] { "Devices", "TraceEvents", }); internal_static_tensorflow_tpu_Trace_DevicesEntry_descriptor = internal_static_tensorflow_tpu_Trace_descriptor.getNestedTypes().get(0); internal_static_tensorflow_tpu_Trace_DevicesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_Trace_DevicesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_tpu_Device_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_tpu_Device_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_Device_descriptor, new java.lang.String[] { "Name", "DeviceId", "Resources", }); internal_static_tensorflow_tpu_Device_ResourcesEntry_descriptor = internal_static_tensorflow_tpu_Device_descriptor.getNestedTypes().get(0); internal_static_tensorflow_tpu_Device_ResourcesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_Device_ResourcesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_tpu_Resource_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_tpu_Resource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_Resource_descriptor, new java.lang.String[] { "Name", "ResourceId", }); internal_static_tensorflow_tpu_TraceEvent_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_tpu_TraceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_tpu_TraceEvent_descriptor, new java.lang.String[] { "DeviceId", "ResourceId", "Name", "TimestampPs", "DurationPs", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy