xla.Hlo Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/compiler/xla/service/hlo.proto
package xla;
public final class Hlo {
private Hlo() {}
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 HloInstructionProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloInstructionProto)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* string opcode = 2;
*/
java.lang.String getOpcode();
/**
* string opcode = 2;
*/
com.google.protobuf.ByteString
getOpcodeBytes();
/**
* .xla.Shape shape = 3;
*/
boolean hasShape();
/**
* .xla.Shape shape = 3;
*/
xla.XlaData.Shape getShape();
/**
* .xla.Shape shape = 3;
*/
xla.XlaData.ShapeOrBuilder getShapeOrBuilder();
/**
* .xla.OpMetadata metadata = 7;
*/
boolean hasMetadata();
/**
* .xla.OpMetadata metadata = 7;
*/
xla.XlaData.OpMetadata getMetadata();
/**
* .xla.OpMetadata metadata = 7;
*/
xla.XlaData.OpMetadataOrBuilder getMetadataOrBuilder();
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
boolean hasLiteral();
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
xla.XlaData.LiteralProto getLiteral();
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
xla.XlaData.LiteralProtoOrBuilder getLiteralOrBuilder();
/**
*
* Parameter number is only present for kParameter.
*
*
* int64 parameter_number = 9;
*/
long getParameterNumber();
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
java.lang.String getFusionKind();
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
com.google.protobuf.ByteString
getFusionKindBytes();
/**
*
* Index for kGetTupleElement.
*
*
* int64 tuple_index = 13;
*/
long getTupleIndex();
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
java.util.List getDimensionsList();
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
int getDimensionsCount();
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
long getDimensions(int index);
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
boolean hasWindow();
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
xla.XlaData.Window getWindow();
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
xla.XlaData.WindowOrBuilder getWindowOrBuilder();
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
boolean hasConvolutionDimensionNumbers();
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
xla.XlaData.ConvolutionDimensionNumbers getConvolutionDimensionNumbers();
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
xla.XlaData.ConvolutionDimensionNumbersOrBuilder getConvolutionDimensionNumbersOrBuilder();
/**
*
* The number of feature groups. Used for a convolution. Must be a divisor of
* the input feature dimension and output feature dimension. If not specified,
* it will use a default value of 1.
*
*
* int64 feature_group_count = 50;
*/
long getFeatureGroupCount();
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
java.util.List
getSliceDimensionsList();
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
xla.Hlo.HloInstructionProto.SliceDimensions getSliceDimensions(int index);
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
int getSliceDimensionsCount();
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
java.util.List
getSliceDimensionsOrBuilderList();
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder getSliceDimensionsOrBuilder(
int index);
/**
*
* The bit sizes for a reduce-precision operation.
*
*
* int32 exponent_bits = 18;
*/
int getExponentBits();
/**
* int32 mantissa_bits = 19;
*/
int getMantissaBits();
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
java.util.List getDynamicSliceSizesList();
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
int getDynamicSliceSizesCount();
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
long getDynamicSliceSizes(int index);
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
boolean hasPaddingConfig();
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
xla.XlaData.PaddingConfig getPaddingConfig();
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
xla.XlaData.PaddingConfigOrBuilder getPaddingConfigOrBuilder();
/**
*
* Outfeed configuration information, only present for kOutfeed.
*
*
* bytes outfeed_config = 22;
*/
com.google.protobuf.ByteString getOutfeedConfig();
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
int getDistributionValue();
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
xla.XlaData.RandomDistribution getDistribution();
/**
*
* A small float number added to the variance to avoid divide-by-zero error.
* Only present for kBatchNormTraining.
*
*
* float epsilon = 24;
*/
float getEpsilon();
/**
*
* An integer value representing the index of the feature dimension.
* Only present for kBatchNormTraining.
*
*
* int64 feature_index = 25;
*/
long getFeatureIndex();
/**
*
* Represents a unique identifier for each Send/Recv instruction pair.
* Only present for kSend or kRecv.
*
*
* int64 channel_id = 26;
*/
long getChannelId();
/**
*
* The string representation of the infeed configuration.
*
*
* bytes infeed_config = 27;
*/
com.google.protobuf.ByteString getInfeedConfig();
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
java.lang.String getCustomCallTarget();
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
com.google.protobuf.ByteString
getCustomCallTargetBytes();
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
java.lang.String getCustomCallOpaque();
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
com.google.protobuf.ByteString
getCustomCallOpaqueBytes();
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
boolean hasOutfeedShape();
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
xla.XlaData.Shape getOutfeedShape();
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
xla.XlaData.ShapeOrBuilder getOutfeedShapeOrBuilder();
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
boolean hasDotDimensionNumbers();
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
xla.XlaData.DotDimensionNumbers getDotDimensionNumbers();
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
xla.XlaData.DotDimensionNumbersOrBuilder getDotDimensionNumbersOrBuilder();
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
int getFftTypeValue();
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
xla.XlaData.FftType getFftType();
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
java.util.List getFftLengthList();
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
int getFftLengthCount();
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
long getFftLength(int index);
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
boolean hasGatherDimensionNumbers();
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
xla.XlaData.GatherDimensionNumbers getGatherDimensionNumbers();
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
xla.XlaData.GatherDimensionNumbersOrBuilder getGatherDimensionNumbersOrBuilder();
/**
* repeated int64 gather_slice_sizes = 34;
*/
java.util.List getGatherSliceSizesList();
/**
* repeated int64 gather_slice_sizes = 34;
*/
int getGatherSliceSizesCount();
/**
* repeated int64 gather_slice_sizes = 34;
*/
long getGatherSliceSizes(int index);
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
java.lang.String getChannelName();
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
com.google.protobuf.ByteString
getChannelNameBytes();
/**
* int64 cost_estimate_ns = 42;
*/
long getCostEstimateNs();
/**
*
* The id of this instruction.
*
*
* int64 id = 35;
*/
long getId();
/**
* repeated int64 operand_ids = 36;
*/
java.util.List getOperandIdsList();
/**
* repeated int64 operand_ids = 36;
*/
int getOperandIdsCount();
/**
* repeated int64 operand_ids = 36;
*/
long getOperandIds(int index);
/**
* repeated int64 control_predecessor_ids = 37;
*/
java.util.List getControlPredecessorIdsList();
/**
* repeated int64 control_predecessor_ids = 37;
*/
int getControlPredecessorIdsCount();
/**
* repeated int64 control_predecessor_ids = 37;
*/
long getControlPredecessorIds(int index);
/**
* repeated int64 called_computation_ids = 38;
*/
java.util.List getCalledComputationIdsList();
/**
* repeated int64 called_computation_ids = 38;
*/
int getCalledComputationIdsCount();
/**
* repeated int64 called_computation_ids = 38;
*/
long getCalledComputationIds(int index);
/**
* .xla.OpSharding sharding = 40;
*/
boolean hasSharding();
/**
* .xla.OpSharding sharding = 40;
*/
xla.XlaData.OpSharding getSharding();
/**
* .xla.OpSharding sharding = 40;
*/
xla.XlaData.OpShardingOrBuilder getShardingOrBuilder();
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
java.lang.String getBackendConfig();
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
com.google.protobuf.ByteString
getBackendConfigBytes();
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
java.util.List
getReplicaGroupsList();
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
xla.XlaData.ReplicaGroup getReplicaGroups(int index);
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
int getReplicaGroupsCount();
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
java.util.List
getReplicaGroupsOrBuilderList();
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
xla.XlaData.ReplicaGroupOrBuilder getReplicaGroupsOrBuilder(
int index);
/**
* int64 all_reduce_id = 45;
*/
long getAllReduceId();
/**
* string cross_replica_sum_barrier = 46;
*/
java.lang.String getCrossReplicaSumBarrier();
/**
* string cross_replica_sum_barrier = 46;
*/
com.google.protobuf.ByteString
getCrossReplicaSumBarrierBytes();
/**
*
* Whether this Send/Recv instruction transfers data to/from the host. Only
* present for Send and Recv instructions and their SendDone and RecvDone
* partners.
*
*
* bool is_host_transfer = 47;
*/
boolean getIsHostTransfer();
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
boolean hasScatterDimensionNumbers();
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
xla.XlaData.ScatterDimensionNumbers getScatterDimensionNumbers();
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
xla.XlaData.ScatterDimensionNumbersOrBuilder getScatterDimensionNumbersOrBuilder();
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
boolean hasPrecisionConfig();
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
xla.XlaData.PrecisionConfig getPrecisionConfig();
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
xla.XlaData.PrecisionConfigOrBuilder getPrecisionConfigOrBuilder();
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
java.util.List
getSourceTargetPairsList();
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
xla.XlaData.SourceTarget getSourceTargetPairs(int index);
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
int getSourceTargetPairsCount();
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
java.util.List
getSourceTargetPairsOrBuilderList();
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
xla.XlaData.SourceTargetOrBuilder getSourceTargetPairsOrBuilder(
int index);
}
/**
*
* Serialization of HloInstruction.
* Next ID: 54
*
*
* Protobuf type {@code xla.HloInstructionProto}
*/
public static final class HloInstructionProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloInstructionProto)
HloInstructionProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use HloInstructionProto.newBuilder() to construct.
private HloInstructionProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HloInstructionProto() {
name_ = "";
opcode_ = "";
parameterNumber_ = 0L;
fusionKind_ = "";
tupleIndex_ = 0L;
dimensions_ = java.util.Collections.emptyList();
featureGroupCount_ = 0L;
sliceDimensions_ = java.util.Collections.emptyList();
exponentBits_ = 0;
mantissaBits_ = 0;
dynamicSliceSizes_ = java.util.Collections.emptyList();
outfeedConfig_ = com.google.protobuf.ByteString.EMPTY;
distribution_ = 0;
epsilon_ = 0F;
featureIndex_ = 0L;
channelId_ = 0L;
infeedConfig_ = com.google.protobuf.ByteString.EMPTY;
customCallTarget_ = "";
customCallOpaque_ = "";
fftType_ = 0;
fftLength_ = java.util.Collections.emptyList();
gatherSliceSizes_ = java.util.Collections.emptyList();
channelName_ = "";
costEstimateNs_ = 0L;
id_ = 0L;
operandIds_ = java.util.Collections.emptyList();
controlPredecessorIds_ = java.util.Collections.emptyList();
calledComputationIds_ = java.util.Collections.emptyList();
backendConfig_ = "";
replicaGroups_ = java.util.Collections.emptyList();
allReduceId_ = 0L;
crossReplicaSumBarrier_ = "";
isHostTransfer_ = false;
sourceTargetPairs_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HloInstructionProto(
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;
int mutable_bitField1_ = 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 18: {
java.lang.String s = input.readStringRequireUtf8();
opcode_ = s;
break;
}
case 26: {
xla.XlaData.Shape.Builder subBuilder = null;
if (shape_ != null) {
subBuilder = shape_.toBuilder();
}
shape_ = input.readMessage(xla.XlaData.Shape.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(shape_);
shape_ = subBuilder.buildPartial();
}
break;
}
case 58: {
xla.XlaData.OpMetadata.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(xla.XlaData.OpMetadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
break;
}
case 66: {
xla.XlaData.LiteralProto.Builder subBuilder = null;
if (literal_ != null) {
subBuilder = literal_.toBuilder();
}
literal_ = input.readMessage(xla.XlaData.LiteralProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(literal_);
literal_ = subBuilder.buildPartial();
}
break;
}
case 72: {
parameterNumber_ = input.readInt64();
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
fusionKind_ = s;
break;
}
case 104: {
tupleIndex_ = input.readInt64();
break;
}
case 112: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
dimensions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
dimensions_.add(input.readInt64());
break;
}
case 114: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) {
dimensions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
while (input.getBytesUntilLimit() > 0) {
dimensions_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 122: {
xla.XlaData.Window.Builder subBuilder = null;
if (window_ != null) {
subBuilder = window_.toBuilder();
}
window_ = input.readMessage(xla.XlaData.Window.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(window_);
window_ = subBuilder.buildPartial();
}
break;
}
case 130: {
xla.XlaData.ConvolutionDimensionNumbers.Builder subBuilder = null;
if (convolutionDimensionNumbers_ != null) {
subBuilder = convolutionDimensionNumbers_.toBuilder();
}
convolutionDimensionNumbers_ = input.readMessage(xla.XlaData.ConvolutionDimensionNumbers.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(convolutionDimensionNumbers_);
convolutionDimensionNumbers_ = subBuilder.buildPartial();
}
break;
}
case 138: {
if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
sliceDimensions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00001000;
}
sliceDimensions_.add(
input.readMessage(xla.Hlo.HloInstructionProto.SliceDimensions.parser(), extensionRegistry));
break;
}
case 144: {
exponentBits_ = input.readInt32();
break;
}
case 152: {
mantissaBits_ = input.readInt32();
break;
}
case 160: {
if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) {
dynamicSliceSizes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00008000;
}
dynamicSliceSizes_.add(input.readInt64());
break;
}
case 162: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00008000) == 0x00008000) && input.getBytesUntilLimit() > 0) {
dynamicSliceSizes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00008000;
}
while (input.getBytesUntilLimit() > 0) {
dynamicSliceSizes_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 170: {
xla.XlaData.PaddingConfig.Builder subBuilder = null;
if (paddingConfig_ != null) {
subBuilder = paddingConfig_.toBuilder();
}
paddingConfig_ = input.readMessage(xla.XlaData.PaddingConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(paddingConfig_);
paddingConfig_ = subBuilder.buildPartial();
}
break;
}
case 178: {
outfeedConfig_ = input.readBytes();
break;
}
case 184: {
int rawValue = input.readEnum();
distribution_ = rawValue;
break;
}
case 197: {
epsilon_ = input.readFloat();
break;
}
case 200: {
featureIndex_ = input.readInt64();
break;
}
case 208: {
channelId_ = input.readInt64();
break;
}
case 218: {
infeedConfig_ = input.readBytes();
break;
}
case 226: {
java.lang.String s = input.readStringRequireUtf8();
customCallTarget_ = s;
break;
}
case 234: {
xla.XlaData.Shape.Builder subBuilder = null;
if (outfeedShape_ != null) {
subBuilder = outfeedShape_.toBuilder();
}
outfeedShape_ = input.readMessage(xla.XlaData.Shape.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outfeedShape_);
outfeedShape_ = subBuilder.buildPartial();
}
break;
}
case 242: {
xla.XlaData.DotDimensionNumbers.Builder subBuilder = null;
if (dotDimensionNumbers_ != null) {
subBuilder = dotDimensionNumbers_.toBuilder();
}
dotDimensionNumbers_ = input.readMessage(xla.XlaData.DotDimensionNumbers.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dotDimensionNumbers_);
dotDimensionNumbers_ = subBuilder.buildPartial();
}
break;
}
case 248: {
int rawValue = input.readEnum();
fftType_ = rawValue;
break;
}
case 256: {
if (!((mutable_bitField0_ & 0x10000000) == 0x10000000)) {
fftLength_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x10000000;
}
fftLength_.add(input.readInt64());
break;
}
case 258: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x10000000) == 0x10000000) && input.getBytesUntilLimit() > 0) {
fftLength_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x10000000;
}
while (input.getBytesUntilLimit() > 0) {
fftLength_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 266: {
xla.XlaData.GatherDimensionNumbers.Builder subBuilder = null;
if (gatherDimensionNumbers_ != null) {
subBuilder = gatherDimensionNumbers_.toBuilder();
}
gatherDimensionNumbers_ = input.readMessage(xla.XlaData.GatherDimensionNumbers.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(gatherDimensionNumbers_);
gatherDimensionNumbers_ = subBuilder.buildPartial();
}
break;
}
case 272: {
if (!((mutable_bitField0_ & 0x40000000) == 0x40000000)) {
gatherSliceSizes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x40000000;
}
gatherSliceSizes_.add(input.readInt64());
break;
}
case 274: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x40000000) == 0x40000000) && input.getBytesUntilLimit() > 0) {
gatherSliceSizes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x40000000;
}
while (input.getBytesUntilLimit() > 0) {
gatherSliceSizes_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 280: {
id_ = input.readInt64();
break;
}
case 288: {
if (!((mutable_bitField1_ & 0x00000004) == 0x00000004)) {
operandIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000004;
}
operandIds_.add(input.readInt64());
break;
}
case 290: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField1_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
operandIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
operandIds_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 296: {
if (!((mutable_bitField1_ & 0x00000008) == 0x00000008)) {
controlPredecessorIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000008;
}
controlPredecessorIds_.add(input.readInt64());
break;
}
case 298: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField1_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
controlPredecessorIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000008;
}
while (input.getBytesUntilLimit() > 0) {
controlPredecessorIds_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 304: {
if (!((mutable_bitField1_ & 0x00000010) == 0x00000010)) {
calledComputationIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000010;
}
calledComputationIds_.add(input.readInt64());
break;
}
case 306: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField1_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
calledComputationIds_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000010;
}
while (input.getBytesUntilLimit() > 0) {
calledComputationIds_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 322: {
xla.XlaData.OpSharding.Builder subBuilder = null;
if (sharding_ != null) {
subBuilder = sharding_.toBuilder();
}
sharding_ = input.readMessage(xla.XlaData.OpSharding.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sharding_);
sharding_ = subBuilder.buildPartial();
}
break;
}
case 330: {
java.lang.String s = input.readStringRequireUtf8();
channelName_ = s;
break;
}
case 336: {
costEstimateNs_ = input.readInt64();
break;
}
case 346: {
java.lang.String s = input.readStringRequireUtf8();
backendConfig_ = s;
break;
}
case 360: {
allReduceId_ = input.readInt64();
break;
}
case 370: {
java.lang.String s = input.readStringRequireUtf8();
crossReplicaSumBarrier_ = s;
break;
}
case 376: {
isHostTransfer_ = input.readBool();
break;
}
case 386: {
xla.XlaData.ScatterDimensionNumbers.Builder subBuilder = null;
if (scatterDimensionNumbers_ != null) {
subBuilder = scatterDimensionNumbers_.toBuilder();
}
scatterDimensionNumbers_ = input.readMessage(xla.XlaData.ScatterDimensionNumbers.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scatterDimensionNumbers_);
scatterDimensionNumbers_ = subBuilder.buildPartial();
}
break;
}
case 394: {
if (!((mutable_bitField1_ & 0x00000080) == 0x00000080)) {
replicaGroups_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00000080;
}
replicaGroups_.add(
input.readMessage(xla.XlaData.ReplicaGroup.parser(), extensionRegistry));
break;
}
case 400: {
featureGroupCount_ = input.readInt64();
break;
}
case 410: {
xla.XlaData.PrecisionConfig.Builder subBuilder = null;
if (precisionConfig_ != null) {
subBuilder = precisionConfig_.toBuilder();
}
precisionConfig_ = input.readMessage(xla.XlaData.PrecisionConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(precisionConfig_);
precisionConfig_ = subBuilder.buildPartial();
}
break;
}
case 418: {
if (!((mutable_bitField1_ & 0x00002000) == 0x00002000)) {
sourceTargetPairs_ = new java.util.ArrayList();
mutable_bitField1_ |= 0x00002000;
}
sourceTargetPairs_.add(
input.readMessage(xla.XlaData.SourceTarget.parser(), extensionRegistry));
break;
}
case 426: {
java.lang.String s = input.readStringRequireUtf8();
customCallOpaque_ = s;
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_ & 0x00000100) == 0x00000100)) {
dimensions_ = java.util.Collections.unmodifiableList(dimensions_);
}
if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
sliceDimensions_ = java.util.Collections.unmodifiableList(sliceDimensions_);
}
if (((mutable_bitField0_ & 0x00008000) == 0x00008000)) {
dynamicSliceSizes_ = java.util.Collections.unmodifiableList(dynamicSliceSizes_);
}
if (((mutable_bitField0_ & 0x10000000) == 0x10000000)) {
fftLength_ = java.util.Collections.unmodifiableList(fftLength_);
}
if (((mutable_bitField0_ & 0x40000000) == 0x40000000)) {
gatherSliceSizes_ = java.util.Collections.unmodifiableList(gatherSliceSizes_);
}
if (((mutable_bitField1_ & 0x00000004) == 0x00000004)) {
operandIds_ = java.util.Collections.unmodifiableList(operandIds_);
}
if (((mutable_bitField1_ & 0x00000008) == 0x00000008)) {
controlPredecessorIds_ = java.util.Collections.unmodifiableList(controlPredecessorIds_);
}
if (((mutable_bitField1_ & 0x00000010) == 0x00000010)) {
calledComputationIds_ = java.util.Collections.unmodifiableList(calledComputationIds_);
}
if (((mutable_bitField1_ & 0x00000080) == 0x00000080)) {
replicaGroups_ = java.util.Collections.unmodifiableList(replicaGroups_);
}
if (((mutable_bitField1_ & 0x00002000) == 0x00002000)) {
sourceTargetPairs_ = java.util.Collections.unmodifiableList(sourceTargetPairs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloInstructionProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloInstructionProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloInstructionProto.class, xla.Hlo.HloInstructionProto.Builder.class);
}
public interface SliceDimensionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloInstructionProto.SliceDimensions)
com.google.protobuf.MessageOrBuilder {
/**
* int64 start = 1;
*/
long getStart();
/**
* int64 limit = 2;
*/
long getLimit();
/**
* int64 stride = 3;
*/
long getStride();
}
/**
*
* Describes the [begin, end) index range and stride for slices.
*
*
* Protobuf type {@code xla.HloInstructionProto.SliceDimensions}
*/
public static final class SliceDimensions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloInstructionProto.SliceDimensions)
SliceDimensionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use SliceDimensions.newBuilder() to construct.
private SliceDimensions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SliceDimensions() {
start_ = 0L;
limit_ = 0L;
stride_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SliceDimensions(
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: {
start_ = input.readInt64();
break;
}
case 16: {
limit_ = input.readInt64();
break;
}
case 24: {
stride_ = input.readInt64();
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 xla.Hlo.internal_static_xla_HloInstructionProto_SliceDimensions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloInstructionProto_SliceDimensions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloInstructionProto.SliceDimensions.class, xla.Hlo.HloInstructionProto.SliceDimensions.Builder.class);
}
public static final int START_FIELD_NUMBER = 1;
private long start_;
/**
* int64 start = 1;
*/
public long getStart() {
return start_;
}
public static final int LIMIT_FIELD_NUMBER = 2;
private long limit_;
/**
* int64 limit = 2;
*/
public long getLimit() {
return limit_;
}
public static final int STRIDE_FIELD_NUMBER = 3;
private long stride_;
/**
* int64 stride = 3;
*/
public long getStride() {
return stride_;
}
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 (start_ != 0L) {
output.writeInt64(1, start_);
}
if (limit_ != 0L) {
output.writeInt64(2, limit_);
}
if (stride_ != 0L) {
output.writeInt64(3, stride_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (start_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, start_);
}
if (limit_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, limit_);
}
if (stride_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, stride_);
}
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 xla.Hlo.HloInstructionProto.SliceDimensions)) {
return super.equals(obj);
}
xla.Hlo.HloInstructionProto.SliceDimensions other = (xla.Hlo.HloInstructionProto.SliceDimensions) obj;
boolean result = true;
result = result && (getStart()
== other.getStart());
result = result && (getLimit()
== other.getLimit());
result = result && (getStride()
== other.getStride());
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) + START_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStart());
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLimit());
hash = (37 * hash) + STRIDE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStride());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions 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 xla.Hlo.HloInstructionProto.SliceDimensions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions 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 xla.Hlo.HloInstructionProto.SliceDimensions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto.SliceDimensions 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(xla.Hlo.HloInstructionProto.SliceDimensions 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;
}
/**
*
* Describes the [begin, end) index range and stride for slices.
*
*
* Protobuf type {@code xla.HloInstructionProto.SliceDimensions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloInstructionProto.SliceDimensions)
xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloInstructionProto_SliceDimensions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloInstructionProto_SliceDimensions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloInstructionProto.SliceDimensions.class, xla.Hlo.HloInstructionProto.SliceDimensions.Builder.class);
}
// Construct using xla.Hlo.HloInstructionProto.SliceDimensions.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();
start_ = 0L;
limit_ = 0L;
stride_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloInstructionProto_SliceDimensions_descriptor;
}
@java.lang.Override
public xla.Hlo.HloInstructionProto.SliceDimensions getDefaultInstanceForType() {
return xla.Hlo.HloInstructionProto.SliceDimensions.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloInstructionProto.SliceDimensions build() {
xla.Hlo.HloInstructionProto.SliceDimensions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloInstructionProto.SliceDimensions buildPartial() {
xla.Hlo.HloInstructionProto.SliceDimensions result = new xla.Hlo.HloInstructionProto.SliceDimensions(this);
result.start_ = start_;
result.limit_ = limit_;
result.stride_ = stride_;
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 xla.Hlo.HloInstructionProto.SliceDimensions) {
return mergeFrom((xla.Hlo.HloInstructionProto.SliceDimensions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloInstructionProto.SliceDimensions other) {
if (other == xla.Hlo.HloInstructionProto.SliceDimensions.getDefaultInstance()) return this;
if (other.getStart() != 0L) {
setStart(other.getStart());
}
if (other.getLimit() != 0L) {
setLimit(other.getLimit());
}
if (other.getStride() != 0L) {
setStride(other.getStride());
}
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 {
xla.Hlo.HloInstructionProto.SliceDimensions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloInstructionProto.SliceDimensions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long start_ ;
/**
* int64 start = 1;
*/
public long getStart() {
return start_;
}
/**
* int64 start = 1;
*/
public Builder setStart(long value) {
start_ = value;
onChanged();
return this;
}
/**
* int64 start = 1;
*/
public Builder clearStart() {
start_ = 0L;
onChanged();
return this;
}
private long limit_ ;
/**
* int64 limit = 2;
*/
public long getLimit() {
return limit_;
}
/**
* int64 limit = 2;
*/
public Builder setLimit(long value) {
limit_ = value;
onChanged();
return this;
}
/**
* int64 limit = 2;
*/
public Builder clearLimit() {
limit_ = 0L;
onChanged();
return this;
}
private long stride_ ;
/**
* int64 stride = 3;
*/
public long getStride() {
return stride_;
}
/**
* int64 stride = 3;
*/
public Builder setStride(long value) {
stride_ = value;
onChanged();
return this;
}
/**
* int64 stride = 3;
*/
public Builder clearStride() {
stride_ = 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:xla.HloInstructionProto.SliceDimensions)
}
// @@protoc_insertion_point(class_scope:xla.HloInstructionProto.SliceDimensions)
private static final xla.Hlo.HloInstructionProto.SliceDimensions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloInstructionProto.SliceDimensions();
}
public static xla.Hlo.HloInstructionProto.SliceDimensions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SliceDimensions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SliceDimensions(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 xla.Hlo.HloInstructionProto.SliceDimensions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int bitField1_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* 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;
}
}
/**
* 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 OPCODE_FIELD_NUMBER = 2;
private volatile java.lang.Object opcode_;
/**
* string opcode = 2;
*/
public java.lang.String getOpcode() {
java.lang.Object ref = opcode_;
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();
opcode_ = s;
return s;
}
}
/**
* string opcode = 2;
*/
public com.google.protobuf.ByteString
getOpcodeBytes() {
java.lang.Object ref = opcode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
opcode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHAPE_FIELD_NUMBER = 3;
private xla.XlaData.Shape shape_;
/**
* .xla.Shape shape = 3;
*/
public boolean hasShape() {
return shape_ != null;
}
/**
* .xla.Shape shape = 3;
*/
public xla.XlaData.Shape getShape() {
return shape_ == null ? xla.XlaData.Shape.getDefaultInstance() : shape_;
}
/**
* .xla.Shape shape = 3;
*/
public xla.XlaData.ShapeOrBuilder getShapeOrBuilder() {
return getShape();
}
public static final int METADATA_FIELD_NUMBER = 7;
private xla.XlaData.OpMetadata metadata_;
/**
* .xla.OpMetadata metadata = 7;
*/
public boolean hasMetadata() {
return metadata_ != null;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public xla.XlaData.OpMetadata getMetadata() {
return metadata_ == null ? xla.XlaData.OpMetadata.getDefaultInstance() : metadata_;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public xla.XlaData.OpMetadataOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
public static final int LITERAL_FIELD_NUMBER = 8;
private xla.XlaData.LiteralProto literal_;
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public boolean hasLiteral() {
return literal_ != null;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public xla.XlaData.LiteralProto getLiteral() {
return literal_ == null ? xla.XlaData.LiteralProto.getDefaultInstance() : literal_;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public xla.XlaData.LiteralProtoOrBuilder getLiteralOrBuilder() {
return getLiteral();
}
public static final int PARAMETER_NUMBER_FIELD_NUMBER = 9;
private long parameterNumber_;
/**
*
* Parameter number is only present for kParameter.
*
*
* int64 parameter_number = 9;
*/
public long getParameterNumber() {
return parameterNumber_;
}
public static final int FUSION_KIND_FIELD_NUMBER = 11;
private volatile java.lang.Object fusionKind_;
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public java.lang.String getFusionKind() {
java.lang.Object ref = fusionKind_;
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();
fusionKind_ = s;
return s;
}
}
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public com.google.protobuf.ByteString
getFusionKindBytes() {
java.lang.Object ref = fusionKind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fusionKind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TUPLE_INDEX_FIELD_NUMBER = 13;
private long tupleIndex_;
/**
*
* Index for kGetTupleElement.
*
*
* int64 tuple_index = 13;
*/
public long getTupleIndex() {
return tupleIndex_;
}
public static final int DIMENSIONS_FIELD_NUMBER = 14;
private java.util.List dimensions_;
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public java.util.List
getDimensionsList() {
return dimensions_;
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public int getDimensionsCount() {
return dimensions_.size();
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public long getDimensions(int index) {
return dimensions_.get(index);
}
private int dimensionsMemoizedSerializedSize = -1;
public static final int WINDOW_FIELD_NUMBER = 15;
private xla.XlaData.Window window_;
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public boolean hasWindow() {
return window_ != null;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public xla.XlaData.Window getWindow() {
return window_ == null ? xla.XlaData.Window.getDefaultInstance() : window_;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public xla.XlaData.WindowOrBuilder getWindowOrBuilder() {
return getWindow();
}
public static final int CONVOLUTION_DIMENSION_NUMBERS_FIELD_NUMBER = 16;
private xla.XlaData.ConvolutionDimensionNumbers convolutionDimensionNumbers_;
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public boolean hasConvolutionDimensionNumbers() {
return convolutionDimensionNumbers_ != null;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public xla.XlaData.ConvolutionDimensionNumbers getConvolutionDimensionNumbers() {
return convolutionDimensionNumbers_ == null ? xla.XlaData.ConvolutionDimensionNumbers.getDefaultInstance() : convolutionDimensionNumbers_;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public xla.XlaData.ConvolutionDimensionNumbersOrBuilder getConvolutionDimensionNumbersOrBuilder() {
return getConvolutionDimensionNumbers();
}
public static final int FEATURE_GROUP_COUNT_FIELD_NUMBER = 50;
private long featureGroupCount_;
/**
*
* The number of feature groups. Used for a convolution. Must be a divisor of
* the input feature dimension and output feature dimension. If not specified,
* it will use a default value of 1.
*
*
* int64 feature_group_count = 50;
*/
public long getFeatureGroupCount() {
return featureGroupCount_;
}
public static final int SLICE_DIMENSIONS_FIELD_NUMBER = 17;
private java.util.List sliceDimensions_;
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public java.util.List getSliceDimensionsList() {
return sliceDimensions_;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public java.util.List
getSliceDimensionsOrBuilderList() {
return sliceDimensions_;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public int getSliceDimensionsCount() {
return sliceDimensions_.size();
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensions getSliceDimensions(int index) {
return sliceDimensions_.get(index);
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder getSliceDimensionsOrBuilder(
int index) {
return sliceDimensions_.get(index);
}
public static final int EXPONENT_BITS_FIELD_NUMBER = 18;
private int exponentBits_;
/**
*
* The bit sizes for a reduce-precision operation.
*
*
* int32 exponent_bits = 18;
*/
public int getExponentBits() {
return exponentBits_;
}
public static final int MANTISSA_BITS_FIELD_NUMBER = 19;
private int mantissaBits_;
/**
* int32 mantissa_bits = 19;
*/
public int getMantissaBits() {
return mantissaBits_;
}
public static final int DYNAMIC_SLICE_SIZES_FIELD_NUMBER = 20;
private java.util.List dynamicSliceSizes_;
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public java.util.List
getDynamicSliceSizesList() {
return dynamicSliceSizes_;
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public int getDynamicSliceSizesCount() {
return dynamicSliceSizes_.size();
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public long getDynamicSliceSizes(int index) {
return dynamicSliceSizes_.get(index);
}
private int dynamicSliceSizesMemoizedSerializedSize = -1;
public static final int PADDING_CONFIG_FIELD_NUMBER = 21;
private xla.XlaData.PaddingConfig paddingConfig_;
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public boolean hasPaddingConfig() {
return paddingConfig_ != null;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public xla.XlaData.PaddingConfig getPaddingConfig() {
return paddingConfig_ == null ? xla.XlaData.PaddingConfig.getDefaultInstance() : paddingConfig_;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public xla.XlaData.PaddingConfigOrBuilder getPaddingConfigOrBuilder() {
return getPaddingConfig();
}
public static final int OUTFEED_CONFIG_FIELD_NUMBER = 22;
private com.google.protobuf.ByteString outfeedConfig_;
/**
*
* Outfeed configuration information, only present for kOutfeed.
*
*
* bytes outfeed_config = 22;
*/
public com.google.protobuf.ByteString getOutfeedConfig() {
return outfeedConfig_;
}
public static final int DISTRIBUTION_FIELD_NUMBER = 23;
private int distribution_;
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public int getDistributionValue() {
return distribution_;
}
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public xla.XlaData.RandomDistribution getDistribution() {
@SuppressWarnings("deprecation")
xla.XlaData.RandomDistribution result = xla.XlaData.RandomDistribution.valueOf(distribution_);
return result == null ? xla.XlaData.RandomDistribution.UNRECOGNIZED : result;
}
public static final int EPSILON_FIELD_NUMBER = 24;
private float epsilon_;
/**
*
* A small float number added to the variance to avoid divide-by-zero error.
* Only present for kBatchNormTraining.
*
*
* float epsilon = 24;
*/
public float getEpsilon() {
return epsilon_;
}
public static final int FEATURE_INDEX_FIELD_NUMBER = 25;
private long featureIndex_;
/**
*
* An integer value representing the index of the feature dimension.
* Only present for kBatchNormTraining.
*
*
* int64 feature_index = 25;
*/
public long getFeatureIndex() {
return featureIndex_;
}
public static final int CHANNEL_ID_FIELD_NUMBER = 26;
private long channelId_;
/**
*
* Represents a unique identifier for each Send/Recv instruction pair.
* Only present for kSend or kRecv.
*
*
* int64 channel_id = 26;
*/
public long getChannelId() {
return channelId_;
}
public static final int INFEED_CONFIG_FIELD_NUMBER = 27;
private com.google.protobuf.ByteString infeedConfig_;
/**
*
* The string representation of the infeed configuration.
*
*
* bytes infeed_config = 27;
*/
public com.google.protobuf.ByteString getInfeedConfig() {
return infeedConfig_;
}
public static final int CUSTOM_CALL_TARGET_FIELD_NUMBER = 28;
private volatile java.lang.Object customCallTarget_;
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public java.lang.String getCustomCallTarget() {
java.lang.Object ref = customCallTarget_;
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();
customCallTarget_ = s;
return s;
}
}
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public com.google.protobuf.ByteString
getCustomCallTargetBytes() {
java.lang.Object ref = customCallTarget_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customCallTarget_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CUSTOM_CALL_OPAQUE_FIELD_NUMBER = 53;
private volatile java.lang.Object customCallOpaque_;
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public java.lang.String getCustomCallOpaque() {
java.lang.Object ref = customCallOpaque_;
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();
customCallOpaque_ = s;
return s;
}
}
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public com.google.protobuf.ByteString
getCustomCallOpaqueBytes() {
java.lang.Object ref = customCallOpaque_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customCallOpaque_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OUTFEED_SHAPE_FIELD_NUMBER = 29;
private xla.XlaData.Shape outfeedShape_;
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public boolean hasOutfeedShape() {
return outfeedShape_ != null;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public xla.XlaData.Shape getOutfeedShape() {
return outfeedShape_ == null ? xla.XlaData.Shape.getDefaultInstance() : outfeedShape_;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public xla.XlaData.ShapeOrBuilder getOutfeedShapeOrBuilder() {
return getOutfeedShape();
}
public static final int DOT_DIMENSION_NUMBERS_FIELD_NUMBER = 30;
private xla.XlaData.DotDimensionNumbers dotDimensionNumbers_;
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public boolean hasDotDimensionNumbers() {
return dotDimensionNumbers_ != null;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public xla.XlaData.DotDimensionNumbers getDotDimensionNumbers() {
return dotDimensionNumbers_ == null ? xla.XlaData.DotDimensionNumbers.getDefaultInstance() : dotDimensionNumbers_;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public xla.XlaData.DotDimensionNumbersOrBuilder getDotDimensionNumbersOrBuilder() {
return getDotDimensionNumbers();
}
public static final int FFT_TYPE_FIELD_NUMBER = 31;
private int fftType_;
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public int getFftTypeValue() {
return fftType_;
}
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public xla.XlaData.FftType getFftType() {
@SuppressWarnings("deprecation")
xla.XlaData.FftType result = xla.XlaData.FftType.valueOf(fftType_);
return result == null ? xla.XlaData.FftType.UNRECOGNIZED : result;
}
public static final int FFT_LENGTH_FIELD_NUMBER = 32;
private java.util.List fftLength_;
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public java.util.List
getFftLengthList() {
return fftLength_;
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public int getFftLengthCount() {
return fftLength_.size();
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public long getFftLength(int index) {
return fftLength_.get(index);
}
private int fftLengthMemoizedSerializedSize = -1;
public static final int GATHER_DIMENSION_NUMBERS_FIELD_NUMBER = 33;
private xla.XlaData.GatherDimensionNumbers gatherDimensionNumbers_;
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public boolean hasGatherDimensionNumbers() {
return gatherDimensionNumbers_ != null;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public xla.XlaData.GatherDimensionNumbers getGatherDimensionNumbers() {
return gatherDimensionNumbers_ == null ? xla.XlaData.GatherDimensionNumbers.getDefaultInstance() : gatherDimensionNumbers_;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public xla.XlaData.GatherDimensionNumbersOrBuilder getGatherDimensionNumbersOrBuilder() {
return getGatherDimensionNumbers();
}
public static final int GATHER_SLICE_SIZES_FIELD_NUMBER = 34;
private java.util.List gatherSliceSizes_;
/**
* repeated int64 gather_slice_sizes = 34;
*/
public java.util.List
getGatherSliceSizesList() {
return gatherSliceSizes_;
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public int getGatherSliceSizesCount() {
return gatherSliceSizes_.size();
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public long getGatherSliceSizes(int index) {
return gatherSliceSizes_.get(index);
}
private int gatherSliceSizesMemoizedSerializedSize = -1;
public static final int CHANNEL_NAME_FIELD_NUMBER = 41;
private volatile java.lang.Object channelName_;
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public java.lang.String getChannelName() {
java.lang.Object ref = channelName_;
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();
channelName_ = s;
return s;
}
}
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public com.google.protobuf.ByteString
getChannelNameBytes() {
java.lang.Object ref = channelName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int COST_ESTIMATE_NS_FIELD_NUMBER = 42;
private long costEstimateNs_;
/**
* int64 cost_estimate_ns = 42;
*/
public long getCostEstimateNs() {
return costEstimateNs_;
}
public static final int ID_FIELD_NUMBER = 35;
private long id_;
/**
*
* The id of this instruction.
*
*
* int64 id = 35;
*/
public long getId() {
return id_;
}
public static final int OPERAND_IDS_FIELD_NUMBER = 36;
private java.util.List operandIds_;
/**
* repeated int64 operand_ids = 36;
*/
public java.util.List
getOperandIdsList() {
return operandIds_;
}
/**
* repeated int64 operand_ids = 36;
*/
public int getOperandIdsCount() {
return operandIds_.size();
}
/**
* repeated int64 operand_ids = 36;
*/
public long getOperandIds(int index) {
return operandIds_.get(index);
}
private int operandIdsMemoizedSerializedSize = -1;
public static final int CONTROL_PREDECESSOR_IDS_FIELD_NUMBER = 37;
private java.util.List controlPredecessorIds_;
/**
* repeated int64 control_predecessor_ids = 37;
*/
public java.util.List
getControlPredecessorIdsList() {
return controlPredecessorIds_;
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public int getControlPredecessorIdsCount() {
return controlPredecessorIds_.size();
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public long getControlPredecessorIds(int index) {
return controlPredecessorIds_.get(index);
}
private int controlPredecessorIdsMemoizedSerializedSize = -1;
public static final int CALLED_COMPUTATION_IDS_FIELD_NUMBER = 38;
private java.util.List calledComputationIds_;
/**
* repeated int64 called_computation_ids = 38;
*/
public java.util.List
getCalledComputationIdsList() {
return calledComputationIds_;
}
/**
* repeated int64 called_computation_ids = 38;
*/
public int getCalledComputationIdsCount() {
return calledComputationIds_.size();
}
/**
* repeated int64 called_computation_ids = 38;
*/
public long getCalledComputationIds(int index) {
return calledComputationIds_.get(index);
}
private int calledComputationIdsMemoizedSerializedSize = -1;
public static final int SHARDING_FIELD_NUMBER = 40;
private xla.XlaData.OpSharding sharding_;
/**
* .xla.OpSharding sharding = 40;
*/
public boolean hasSharding() {
return sharding_ != null;
}
/**
* .xla.OpSharding sharding = 40;
*/
public xla.XlaData.OpSharding getSharding() {
return sharding_ == null ? xla.XlaData.OpSharding.getDefaultInstance() : sharding_;
}
/**
* .xla.OpSharding sharding = 40;
*/
public xla.XlaData.OpShardingOrBuilder getShardingOrBuilder() {
return getSharding();
}
public static final int BACKEND_CONFIG_FIELD_NUMBER = 43;
private volatile java.lang.Object backendConfig_;
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public java.lang.String getBackendConfig() {
java.lang.Object ref = backendConfig_;
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();
backendConfig_ = s;
return s;
}
}
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public com.google.protobuf.ByteString
getBackendConfigBytes() {
java.lang.Object ref = backendConfig_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
backendConfig_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REPLICA_GROUPS_FIELD_NUMBER = 49;
private java.util.List replicaGroups_;
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public java.util.List getReplicaGroupsList() {
return replicaGroups_;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public java.util.List
getReplicaGroupsOrBuilderList() {
return replicaGroups_;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public int getReplicaGroupsCount() {
return replicaGroups_.size();
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroup getReplicaGroups(int index) {
return replicaGroups_.get(index);
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroupOrBuilder getReplicaGroupsOrBuilder(
int index) {
return replicaGroups_.get(index);
}
public static final int ALL_REDUCE_ID_FIELD_NUMBER = 45;
private long allReduceId_;
/**
* int64 all_reduce_id = 45;
*/
public long getAllReduceId() {
return allReduceId_;
}
public static final int CROSS_REPLICA_SUM_BARRIER_FIELD_NUMBER = 46;
private volatile java.lang.Object crossReplicaSumBarrier_;
/**
* string cross_replica_sum_barrier = 46;
*/
public java.lang.String getCrossReplicaSumBarrier() {
java.lang.Object ref = crossReplicaSumBarrier_;
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();
crossReplicaSumBarrier_ = s;
return s;
}
}
/**
* string cross_replica_sum_barrier = 46;
*/
public com.google.protobuf.ByteString
getCrossReplicaSumBarrierBytes() {
java.lang.Object ref = crossReplicaSumBarrier_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
crossReplicaSumBarrier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_HOST_TRANSFER_FIELD_NUMBER = 47;
private boolean isHostTransfer_;
/**
*
* Whether this Send/Recv instruction transfers data to/from the host. Only
* present for Send and Recv instructions and their SendDone and RecvDone
* partners.
*
*
* bool is_host_transfer = 47;
*/
public boolean getIsHostTransfer() {
return isHostTransfer_;
}
public static final int SCATTER_DIMENSION_NUMBERS_FIELD_NUMBER = 48;
private xla.XlaData.ScatterDimensionNumbers scatterDimensionNumbers_;
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public boolean hasScatterDimensionNumbers() {
return scatterDimensionNumbers_ != null;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public xla.XlaData.ScatterDimensionNumbers getScatterDimensionNumbers() {
return scatterDimensionNumbers_ == null ? xla.XlaData.ScatterDimensionNumbers.getDefaultInstance() : scatterDimensionNumbers_;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public xla.XlaData.ScatterDimensionNumbersOrBuilder getScatterDimensionNumbersOrBuilder() {
return getScatterDimensionNumbers();
}
public static final int PRECISION_CONFIG_FIELD_NUMBER = 51;
private xla.XlaData.PrecisionConfig precisionConfig_;
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public boolean hasPrecisionConfig() {
return precisionConfig_ != null;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public xla.XlaData.PrecisionConfig getPrecisionConfig() {
return precisionConfig_ == null ? xla.XlaData.PrecisionConfig.getDefaultInstance() : precisionConfig_;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public xla.XlaData.PrecisionConfigOrBuilder getPrecisionConfigOrBuilder() {
return getPrecisionConfig();
}
public static final int SOURCE_TARGET_PAIRS_FIELD_NUMBER = 52;
private java.util.List sourceTargetPairs_;
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public java.util.List getSourceTargetPairsList() {
return sourceTargetPairs_;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public java.util.List
getSourceTargetPairsOrBuilderList() {
return sourceTargetPairs_;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public int getSourceTargetPairsCount() {
return sourceTargetPairs_.size();
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTarget getSourceTargetPairs(int index) {
return sourceTargetPairs_.get(index);
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTargetOrBuilder getSourceTargetPairsOrBuilder(
int index) {
return sourceTargetPairs_.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 {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getOpcodeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, opcode_);
}
if (shape_ != null) {
output.writeMessage(3, getShape());
}
if (metadata_ != null) {
output.writeMessage(7, getMetadata());
}
if (literal_ != null) {
output.writeMessage(8, getLiteral());
}
if (parameterNumber_ != 0L) {
output.writeInt64(9, parameterNumber_);
}
if (!getFusionKindBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, fusionKind_);
}
if (tupleIndex_ != 0L) {
output.writeInt64(13, tupleIndex_);
}
if (getDimensionsList().size() > 0) {
output.writeUInt32NoTag(114);
output.writeUInt32NoTag(dimensionsMemoizedSerializedSize);
}
for (int i = 0; i < dimensions_.size(); i++) {
output.writeInt64NoTag(dimensions_.get(i));
}
if (window_ != null) {
output.writeMessage(15, getWindow());
}
if (convolutionDimensionNumbers_ != null) {
output.writeMessage(16, getConvolutionDimensionNumbers());
}
for (int i = 0; i < sliceDimensions_.size(); i++) {
output.writeMessage(17, sliceDimensions_.get(i));
}
if (exponentBits_ != 0) {
output.writeInt32(18, exponentBits_);
}
if (mantissaBits_ != 0) {
output.writeInt32(19, mantissaBits_);
}
if (getDynamicSliceSizesList().size() > 0) {
output.writeUInt32NoTag(162);
output.writeUInt32NoTag(dynamicSliceSizesMemoizedSerializedSize);
}
for (int i = 0; i < dynamicSliceSizes_.size(); i++) {
output.writeInt64NoTag(dynamicSliceSizes_.get(i));
}
if (paddingConfig_ != null) {
output.writeMessage(21, getPaddingConfig());
}
if (!outfeedConfig_.isEmpty()) {
output.writeBytes(22, outfeedConfig_);
}
if (distribution_ != xla.XlaData.RandomDistribution.RNG_INVALID.getNumber()) {
output.writeEnum(23, distribution_);
}
if (epsilon_ != 0F) {
output.writeFloat(24, epsilon_);
}
if (featureIndex_ != 0L) {
output.writeInt64(25, featureIndex_);
}
if (channelId_ != 0L) {
output.writeInt64(26, channelId_);
}
if (!infeedConfig_.isEmpty()) {
output.writeBytes(27, infeedConfig_);
}
if (!getCustomCallTargetBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 28, customCallTarget_);
}
if (outfeedShape_ != null) {
output.writeMessage(29, getOutfeedShape());
}
if (dotDimensionNumbers_ != null) {
output.writeMessage(30, getDotDimensionNumbers());
}
if (fftType_ != xla.XlaData.FftType.FFT.getNumber()) {
output.writeEnum(31, fftType_);
}
if (getFftLengthList().size() > 0) {
output.writeUInt32NoTag(258);
output.writeUInt32NoTag(fftLengthMemoizedSerializedSize);
}
for (int i = 0; i < fftLength_.size(); i++) {
output.writeInt64NoTag(fftLength_.get(i));
}
if (gatherDimensionNumbers_ != null) {
output.writeMessage(33, getGatherDimensionNumbers());
}
if (getGatherSliceSizesList().size() > 0) {
output.writeUInt32NoTag(274);
output.writeUInt32NoTag(gatherSliceSizesMemoizedSerializedSize);
}
for (int i = 0; i < gatherSliceSizes_.size(); i++) {
output.writeInt64NoTag(gatherSliceSizes_.get(i));
}
if (id_ != 0L) {
output.writeInt64(35, id_);
}
if (getOperandIdsList().size() > 0) {
output.writeUInt32NoTag(290);
output.writeUInt32NoTag(operandIdsMemoizedSerializedSize);
}
for (int i = 0; i < operandIds_.size(); i++) {
output.writeInt64NoTag(operandIds_.get(i));
}
if (getControlPredecessorIdsList().size() > 0) {
output.writeUInt32NoTag(298);
output.writeUInt32NoTag(controlPredecessorIdsMemoizedSerializedSize);
}
for (int i = 0; i < controlPredecessorIds_.size(); i++) {
output.writeInt64NoTag(controlPredecessorIds_.get(i));
}
if (getCalledComputationIdsList().size() > 0) {
output.writeUInt32NoTag(306);
output.writeUInt32NoTag(calledComputationIdsMemoizedSerializedSize);
}
for (int i = 0; i < calledComputationIds_.size(); i++) {
output.writeInt64NoTag(calledComputationIds_.get(i));
}
if (sharding_ != null) {
output.writeMessage(40, getSharding());
}
if (!getChannelNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 41, channelName_);
}
if (costEstimateNs_ != 0L) {
output.writeInt64(42, costEstimateNs_);
}
if (!getBackendConfigBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 43, backendConfig_);
}
if (allReduceId_ != 0L) {
output.writeInt64(45, allReduceId_);
}
if (!getCrossReplicaSumBarrierBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 46, crossReplicaSumBarrier_);
}
if (isHostTransfer_ != false) {
output.writeBool(47, isHostTransfer_);
}
if (scatterDimensionNumbers_ != null) {
output.writeMessage(48, getScatterDimensionNumbers());
}
for (int i = 0; i < replicaGroups_.size(); i++) {
output.writeMessage(49, replicaGroups_.get(i));
}
if (featureGroupCount_ != 0L) {
output.writeInt64(50, featureGroupCount_);
}
if (precisionConfig_ != null) {
output.writeMessage(51, getPrecisionConfig());
}
for (int i = 0; i < sourceTargetPairs_.size(); i++) {
output.writeMessage(52, sourceTargetPairs_.get(i));
}
if (!getCustomCallOpaqueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 53, customCallOpaque_);
}
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 (!getOpcodeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, opcode_);
}
if (shape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getShape());
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getMetadata());
}
if (literal_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getLiteral());
}
if (parameterNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, parameterNumber_);
}
if (!getFusionKindBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, fusionKind_);
}
if (tupleIndex_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, tupleIndex_);
}
{
int dataSize = 0;
for (int i = 0; i < dimensions_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(dimensions_.get(i));
}
size += dataSize;
if (!getDimensionsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
dimensionsMemoizedSerializedSize = dataSize;
}
if (window_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getWindow());
}
if (convolutionDimensionNumbers_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getConvolutionDimensionNumbers());
}
for (int i = 0; i < sliceDimensions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, sliceDimensions_.get(i));
}
if (exponentBits_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(18, exponentBits_);
}
if (mantissaBits_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(19, mantissaBits_);
}
{
int dataSize = 0;
for (int i = 0; i < dynamicSliceSizes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(dynamicSliceSizes_.get(i));
}
size += dataSize;
if (!getDynamicSliceSizesList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
dynamicSliceSizesMemoizedSerializedSize = dataSize;
}
if (paddingConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, getPaddingConfig());
}
if (!outfeedConfig_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(22, outfeedConfig_);
}
if (distribution_ != xla.XlaData.RandomDistribution.RNG_INVALID.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(23, distribution_);
}
if (epsilon_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(24, epsilon_);
}
if (featureIndex_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(25, featureIndex_);
}
if (channelId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(26, channelId_);
}
if (!infeedConfig_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(27, infeedConfig_);
}
if (!getCustomCallTargetBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, customCallTarget_);
}
if (outfeedShape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(29, getOutfeedShape());
}
if (dotDimensionNumbers_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(30, getDotDimensionNumbers());
}
if (fftType_ != xla.XlaData.FftType.FFT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(31, fftType_);
}
{
int dataSize = 0;
for (int i = 0; i < fftLength_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(fftLength_.get(i));
}
size += dataSize;
if (!getFftLengthList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
fftLengthMemoizedSerializedSize = dataSize;
}
if (gatherDimensionNumbers_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(33, getGatherDimensionNumbers());
}
{
int dataSize = 0;
for (int i = 0; i < gatherSliceSizes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(gatherSliceSizes_.get(i));
}
size += dataSize;
if (!getGatherSliceSizesList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
gatherSliceSizesMemoizedSerializedSize = dataSize;
}
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(35, id_);
}
{
int dataSize = 0;
for (int i = 0; i < operandIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(operandIds_.get(i));
}
size += dataSize;
if (!getOperandIdsList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
operandIdsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < controlPredecessorIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(controlPredecessorIds_.get(i));
}
size += dataSize;
if (!getControlPredecessorIdsList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
controlPredecessorIdsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < calledComputationIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(calledComputationIds_.get(i));
}
size += dataSize;
if (!getCalledComputationIdsList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
calledComputationIdsMemoizedSerializedSize = dataSize;
}
if (sharding_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(40, getSharding());
}
if (!getChannelNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(41, channelName_);
}
if (costEstimateNs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(42, costEstimateNs_);
}
if (!getBackendConfigBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(43, backendConfig_);
}
if (allReduceId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(45, allReduceId_);
}
if (!getCrossReplicaSumBarrierBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(46, crossReplicaSumBarrier_);
}
if (isHostTransfer_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(47, isHostTransfer_);
}
if (scatterDimensionNumbers_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(48, getScatterDimensionNumbers());
}
for (int i = 0; i < replicaGroups_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(49, replicaGroups_.get(i));
}
if (featureGroupCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(50, featureGroupCount_);
}
if (precisionConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(51, getPrecisionConfig());
}
for (int i = 0; i < sourceTargetPairs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(52, sourceTargetPairs_.get(i));
}
if (!getCustomCallOpaqueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(53, customCallOpaque_);
}
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 xla.Hlo.HloInstructionProto)) {
return super.equals(obj);
}
xla.Hlo.HloInstructionProto other = (xla.Hlo.HloInstructionProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getOpcode()
.equals(other.getOpcode());
result = result && (hasShape() == other.hasShape());
if (hasShape()) {
result = result && getShape()
.equals(other.getShape());
}
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata()
.equals(other.getMetadata());
}
result = result && (hasLiteral() == other.hasLiteral());
if (hasLiteral()) {
result = result && getLiteral()
.equals(other.getLiteral());
}
result = result && (getParameterNumber()
== other.getParameterNumber());
result = result && getFusionKind()
.equals(other.getFusionKind());
result = result && (getTupleIndex()
== other.getTupleIndex());
result = result && getDimensionsList()
.equals(other.getDimensionsList());
result = result && (hasWindow() == other.hasWindow());
if (hasWindow()) {
result = result && getWindow()
.equals(other.getWindow());
}
result = result && (hasConvolutionDimensionNumbers() == other.hasConvolutionDimensionNumbers());
if (hasConvolutionDimensionNumbers()) {
result = result && getConvolutionDimensionNumbers()
.equals(other.getConvolutionDimensionNumbers());
}
result = result && (getFeatureGroupCount()
== other.getFeatureGroupCount());
result = result && getSliceDimensionsList()
.equals(other.getSliceDimensionsList());
result = result && (getExponentBits()
== other.getExponentBits());
result = result && (getMantissaBits()
== other.getMantissaBits());
result = result && getDynamicSliceSizesList()
.equals(other.getDynamicSliceSizesList());
result = result && (hasPaddingConfig() == other.hasPaddingConfig());
if (hasPaddingConfig()) {
result = result && getPaddingConfig()
.equals(other.getPaddingConfig());
}
result = result && getOutfeedConfig()
.equals(other.getOutfeedConfig());
result = result && distribution_ == other.distribution_;
result = result && (
java.lang.Float.floatToIntBits(getEpsilon())
== java.lang.Float.floatToIntBits(
other.getEpsilon()));
result = result && (getFeatureIndex()
== other.getFeatureIndex());
result = result && (getChannelId()
== other.getChannelId());
result = result && getInfeedConfig()
.equals(other.getInfeedConfig());
result = result && getCustomCallTarget()
.equals(other.getCustomCallTarget());
result = result && getCustomCallOpaque()
.equals(other.getCustomCallOpaque());
result = result && (hasOutfeedShape() == other.hasOutfeedShape());
if (hasOutfeedShape()) {
result = result && getOutfeedShape()
.equals(other.getOutfeedShape());
}
result = result && (hasDotDimensionNumbers() == other.hasDotDimensionNumbers());
if (hasDotDimensionNumbers()) {
result = result && getDotDimensionNumbers()
.equals(other.getDotDimensionNumbers());
}
result = result && fftType_ == other.fftType_;
result = result && getFftLengthList()
.equals(other.getFftLengthList());
result = result && (hasGatherDimensionNumbers() == other.hasGatherDimensionNumbers());
if (hasGatherDimensionNumbers()) {
result = result && getGatherDimensionNumbers()
.equals(other.getGatherDimensionNumbers());
}
result = result && getGatherSliceSizesList()
.equals(other.getGatherSliceSizesList());
result = result && getChannelName()
.equals(other.getChannelName());
result = result && (getCostEstimateNs()
== other.getCostEstimateNs());
result = result && (getId()
== other.getId());
result = result && getOperandIdsList()
.equals(other.getOperandIdsList());
result = result && getControlPredecessorIdsList()
.equals(other.getControlPredecessorIdsList());
result = result && getCalledComputationIdsList()
.equals(other.getCalledComputationIdsList());
result = result && (hasSharding() == other.hasSharding());
if (hasSharding()) {
result = result && getSharding()
.equals(other.getSharding());
}
result = result && getBackendConfig()
.equals(other.getBackendConfig());
result = result && getReplicaGroupsList()
.equals(other.getReplicaGroupsList());
result = result && (getAllReduceId()
== other.getAllReduceId());
result = result && getCrossReplicaSumBarrier()
.equals(other.getCrossReplicaSumBarrier());
result = result && (getIsHostTransfer()
== other.getIsHostTransfer());
result = result && (hasScatterDimensionNumbers() == other.hasScatterDimensionNumbers());
if (hasScatterDimensionNumbers()) {
result = result && getScatterDimensionNumbers()
.equals(other.getScatterDimensionNumbers());
}
result = result && (hasPrecisionConfig() == other.hasPrecisionConfig());
if (hasPrecisionConfig()) {
result = result && getPrecisionConfig()
.equals(other.getPrecisionConfig());
}
result = result && getSourceTargetPairsList()
.equals(other.getSourceTargetPairsList());
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) + OPCODE_FIELD_NUMBER;
hash = (53 * hash) + getOpcode().hashCode();
if (hasShape()) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShape().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (hasLiteral()) {
hash = (37 * hash) + LITERAL_FIELD_NUMBER;
hash = (53 * hash) + getLiteral().hashCode();
}
hash = (37 * hash) + PARAMETER_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getParameterNumber());
hash = (37 * hash) + FUSION_KIND_FIELD_NUMBER;
hash = (53 * hash) + getFusionKind().hashCode();
hash = (37 * hash) + TUPLE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTupleIndex());
if (getDimensionsCount() > 0) {
hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER;
hash = (53 * hash) + getDimensionsList().hashCode();
}
if (hasWindow()) {
hash = (37 * hash) + WINDOW_FIELD_NUMBER;
hash = (53 * hash) + getWindow().hashCode();
}
if (hasConvolutionDimensionNumbers()) {
hash = (37 * hash) + CONVOLUTION_DIMENSION_NUMBERS_FIELD_NUMBER;
hash = (53 * hash) + getConvolutionDimensionNumbers().hashCode();
}
hash = (37 * hash) + FEATURE_GROUP_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFeatureGroupCount());
if (getSliceDimensionsCount() > 0) {
hash = (37 * hash) + SLICE_DIMENSIONS_FIELD_NUMBER;
hash = (53 * hash) + getSliceDimensionsList().hashCode();
}
hash = (37 * hash) + EXPONENT_BITS_FIELD_NUMBER;
hash = (53 * hash) + getExponentBits();
hash = (37 * hash) + MANTISSA_BITS_FIELD_NUMBER;
hash = (53 * hash) + getMantissaBits();
if (getDynamicSliceSizesCount() > 0) {
hash = (37 * hash) + DYNAMIC_SLICE_SIZES_FIELD_NUMBER;
hash = (53 * hash) + getDynamicSliceSizesList().hashCode();
}
if (hasPaddingConfig()) {
hash = (37 * hash) + PADDING_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getPaddingConfig().hashCode();
}
hash = (37 * hash) + OUTFEED_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getOutfeedConfig().hashCode();
hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER;
hash = (53 * hash) + distribution_;
hash = (37 * hash) + EPSILON_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getEpsilon());
hash = (37 * hash) + FEATURE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFeatureIndex());
hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getChannelId());
hash = (37 * hash) + INFEED_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getInfeedConfig().hashCode();
hash = (37 * hash) + CUSTOM_CALL_TARGET_FIELD_NUMBER;
hash = (53 * hash) + getCustomCallTarget().hashCode();
hash = (37 * hash) + CUSTOM_CALL_OPAQUE_FIELD_NUMBER;
hash = (53 * hash) + getCustomCallOpaque().hashCode();
if (hasOutfeedShape()) {
hash = (37 * hash) + OUTFEED_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getOutfeedShape().hashCode();
}
if (hasDotDimensionNumbers()) {
hash = (37 * hash) + DOT_DIMENSION_NUMBERS_FIELD_NUMBER;
hash = (53 * hash) + getDotDimensionNumbers().hashCode();
}
hash = (37 * hash) + FFT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + fftType_;
if (getFftLengthCount() > 0) {
hash = (37 * hash) + FFT_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + getFftLengthList().hashCode();
}
if (hasGatherDimensionNumbers()) {
hash = (37 * hash) + GATHER_DIMENSION_NUMBERS_FIELD_NUMBER;
hash = (53 * hash) + getGatherDimensionNumbers().hashCode();
}
if (getGatherSliceSizesCount() > 0) {
hash = (37 * hash) + GATHER_SLICE_SIZES_FIELD_NUMBER;
hash = (53 * hash) + getGatherSliceSizesList().hashCode();
}
hash = (37 * hash) + CHANNEL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getChannelName().hashCode();
hash = (37 * hash) + COST_ESTIMATE_NS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCostEstimateNs());
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
if (getOperandIdsCount() > 0) {
hash = (37 * hash) + OPERAND_IDS_FIELD_NUMBER;
hash = (53 * hash) + getOperandIdsList().hashCode();
}
if (getControlPredecessorIdsCount() > 0) {
hash = (37 * hash) + CONTROL_PREDECESSOR_IDS_FIELD_NUMBER;
hash = (53 * hash) + getControlPredecessorIdsList().hashCode();
}
if (getCalledComputationIdsCount() > 0) {
hash = (37 * hash) + CALLED_COMPUTATION_IDS_FIELD_NUMBER;
hash = (53 * hash) + getCalledComputationIdsList().hashCode();
}
if (hasSharding()) {
hash = (37 * hash) + SHARDING_FIELD_NUMBER;
hash = (53 * hash) + getSharding().hashCode();
}
hash = (37 * hash) + BACKEND_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getBackendConfig().hashCode();
if (getReplicaGroupsCount() > 0) {
hash = (37 * hash) + REPLICA_GROUPS_FIELD_NUMBER;
hash = (53 * hash) + getReplicaGroupsList().hashCode();
}
hash = (37 * hash) + ALL_REDUCE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAllReduceId());
hash = (37 * hash) + CROSS_REPLICA_SUM_BARRIER_FIELD_NUMBER;
hash = (53 * hash) + getCrossReplicaSumBarrier().hashCode();
hash = (37 * hash) + IS_HOST_TRANSFER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsHostTransfer());
if (hasScatterDimensionNumbers()) {
hash = (37 * hash) + SCATTER_DIMENSION_NUMBERS_FIELD_NUMBER;
hash = (53 * hash) + getScatterDimensionNumbers().hashCode();
}
if (hasPrecisionConfig()) {
hash = (37 * hash) + PRECISION_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getPrecisionConfig().hashCode();
}
if (getSourceTargetPairsCount() > 0) {
hash = (37 * hash) + SOURCE_TARGET_PAIRS_FIELD_NUMBER;
hash = (53 * hash) + getSourceTargetPairsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloInstructionProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloInstructionProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloInstructionProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto 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 xla.Hlo.HloInstructionProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto 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 xla.Hlo.HloInstructionProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloInstructionProto 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(xla.Hlo.HloInstructionProto 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;
}
/**
*
* Serialization of HloInstruction.
* Next ID: 54
*
*
* Protobuf type {@code xla.HloInstructionProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloInstructionProto)
xla.Hlo.HloInstructionProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloInstructionProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloInstructionProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloInstructionProto.class, xla.Hlo.HloInstructionProto.Builder.class);
}
// Construct using xla.Hlo.HloInstructionProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSliceDimensionsFieldBuilder();
getReplicaGroupsFieldBuilder();
getSourceTargetPairsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
opcode_ = "";
if (shapeBuilder_ == null) {
shape_ = null;
} else {
shape_ = null;
shapeBuilder_ = null;
}
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
if (literalBuilder_ == null) {
literal_ = null;
} else {
literal_ = null;
literalBuilder_ = null;
}
parameterNumber_ = 0L;
fusionKind_ = "";
tupleIndex_ = 0L;
dimensions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
if (windowBuilder_ == null) {
window_ = null;
} else {
window_ = null;
windowBuilder_ = null;
}
if (convolutionDimensionNumbersBuilder_ == null) {
convolutionDimensionNumbers_ = null;
} else {
convolutionDimensionNumbers_ = null;
convolutionDimensionNumbersBuilder_ = null;
}
featureGroupCount_ = 0L;
if (sliceDimensionsBuilder_ == null) {
sliceDimensions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
} else {
sliceDimensionsBuilder_.clear();
}
exponentBits_ = 0;
mantissaBits_ = 0;
dynamicSliceSizes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00008000);
if (paddingConfigBuilder_ == null) {
paddingConfig_ = null;
} else {
paddingConfig_ = null;
paddingConfigBuilder_ = null;
}
outfeedConfig_ = com.google.protobuf.ByteString.EMPTY;
distribution_ = 0;
epsilon_ = 0F;
featureIndex_ = 0L;
channelId_ = 0L;
infeedConfig_ = com.google.protobuf.ByteString.EMPTY;
customCallTarget_ = "";
customCallOpaque_ = "";
if (outfeedShapeBuilder_ == null) {
outfeedShape_ = null;
} else {
outfeedShape_ = null;
outfeedShapeBuilder_ = null;
}
if (dotDimensionNumbersBuilder_ == null) {
dotDimensionNumbers_ = null;
} else {
dotDimensionNumbers_ = null;
dotDimensionNumbersBuilder_ = null;
}
fftType_ = 0;
fftLength_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x10000000);
if (gatherDimensionNumbersBuilder_ == null) {
gatherDimensionNumbers_ = null;
} else {
gatherDimensionNumbers_ = null;
gatherDimensionNumbersBuilder_ = null;
}
gatherSliceSizes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x40000000);
channelName_ = "";
costEstimateNs_ = 0L;
id_ = 0L;
operandIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000004);
controlPredecessorIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000008);
calledComputationIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000010);
if (shardingBuilder_ == null) {
sharding_ = null;
} else {
sharding_ = null;
shardingBuilder_ = null;
}
backendConfig_ = "";
if (replicaGroupsBuilder_ == null) {
replicaGroups_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000080);
} else {
replicaGroupsBuilder_.clear();
}
allReduceId_ = 0L;
crossReplicaSumBarrier_ = "";
isHostTransfer_ = false;
if (scatterDimensionNumbersBuilder_ == null) {
scatterDimensionNumbers_ = null;
} else {
scatterDimensionNumbers_ = null;
scatterDimensionNumbersBuilder_ = null;
}
if (precisionConfigBuilder_ == null) {
precisionConfig_ = null;
} else {
precisionConfig_ = null;
precisionConfigBuilder_ = null;
}
if (sourceTargetPairsBuilder_ == null) {
sourceTargetPairs_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00002000);
} else {
sourceTargetPairsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloInstructionProto_descriptor;
}
@java.lang.Override
public xla.Hlo.HloInstructionProto getDefaultInstanceForType() {
return xla.Hlo.HloInstructionProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloInstructionProto build() {
xla.Hlo.HloInstructionProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloInstructionProto buildPartial() {
xla.Hlo.HloInstructionProto result = new xla.Hlo.HloInstructionProto(this);
int from_bitField0_ = bitField0_;
int from_bitField1_ = bitField1_;
int to_bitField0_ = 0;
int to_bitField1_ = 0;
result.name_ = name_;
result.opcode_ = opcode_;
if (shapeBuilder_ == null) {
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (literalBuilder_ == null) {
result.literal_ = literal_;
} else {
result.literal_ = literalBuilder_.build();
}
result.parameterNumber_ = parameterNumber_;
result.fusionKind_ = fusionKind_;
result.tupleIndex_ = tupleIndex_;
if (((bitField0_ & 0x00000100) == 0x00000100)) {
dimensions_ = java.util.Collections.unmodifiableList(dimensions_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.dimensions_ = dimensions_;
if (windowBuilder_ == null) {
result.window_ = window_;
} else {
result.window_ = windowBuilder_.build();
}
if (convolutionDimensionNumbersBuilder_ == null) {
result.convolutionDimensionNumbers_ = convolutionDimensionNumbers_;
} else {
result.convolutionDimensionNumbers_ = convolutionDimensionNumbersBuilder_.build();
}
result.featureGroupCount_ = featureGroupCount_;
if (sliceDimensionsBuilder_ == null) {
if (((bitField0_ & 0x00001000) == 0x00001000)) {
sliceDimensions_ = java.util.Collections.unmodifiableList(sliceDimensions_);
bitField0_ = (bitField0_ & ~0x00001000);
}
result.sliceDimensions_ = sliceDimensions_;
} else {
result.sliceDimensions_ = sliceDimensionsBuilder_.build();
}
result.exponentBits_ = exponentBits_;
result.mantissaBits_ = mantissaBits_;
if (((bitField0_ & 0x00008000) == 0x00008000)) {
dynamicSliceSizes_ = java.util.Collections.unmodifiableList(dynamicSliceSizes_);
bitField0_ = (bitField0_ & ~0x00008000);
}
result.dynamicSliceSizes_ = dynamicSliceSizes_;
if (paddingConfigBuilder_ == null) {
result.paddingConfig_ = paddingConfig_;
} else {
result.paddingConfig_ = paddingConfigBuilder_.build();
}
result.outfeedConfig_ = outfeedConfig_;
result.distribution_ = distribution_;
result.epsilon_ = epsilon_;
result.featureIndex_ = featureIndex_;
result.channelId_ = channelId_;
result.infeedConfig_ = infeedConfig_;
result.customCallTarget_ = customCallTarget_;
result.customCallOpaque_ = customCallOpaque_;
if (outfeedShapeBuilder_ == null) {
result.outfeedShape_ = outfeedShape_;
} else {
result.outfeedShape_ = outfeedShapeBuilder_.build();
}
if (dotDimensionNumbersBuilder_ == null) {
result.dotDimensionNumbers_ = dotDimensionNumbers_;
} else {
result.dotDimensionNumbers_ = dotDimensionNumbersBuilder_.build();
}
result.fftType_ = fftType_;
if (((bitField0_ & 0x10000000) == 0x10000000)) {
fftLength_ = java.util.Collections.unmodifiableList(fftLength_);
bitField0_ = (bitField0_ & ~0x10000000);
}
result.fftLength_ = fftLength_;
if (gatherDimensionNumbersBuilder_ == null) {
result.gatherDimensionNumbers_ = gatherDimensionNumbers_;
} else {
result.gatherDimensionNumbers_ = gatherDimensionNumbersBuilder_.build();
}
if (((bitField0_ & 0x40000000) == 0x40000000)) {
gatherSliceSizes_ = java.util.Collections.unmodifiableList(gatherSliceSizes_);
bitField0_ = (bitField0_ & ~0x40000000);
}
result.gatherSliceSizes_ = gatherSliceSizes_;
result.channelName_ = channelName_;
result.costEstimateNs_ = costEstimateNs_;
result.id_ = id_;
if (((bitField1_ & 0x00000004) == 0x00000004)) {
operandIds_ = java.util.Collections.unmodifiableList(operandIds_);
bitField1_ = (bitField1_ & ~0x00000004);
}
result.operandIds_ = operandIds_;
if (((bitField1_ & 0x00000008) == 0x00000008)) {
controlPredecessorIds_ = java.util.Collections.unmodifiableList(controlPredecessorIds_);
bitField1_ = (bitField1_ & ~0x00000008);
}
result.controlPredecessorIds_ = controlPredecessorIds_;
if (((bitField1_ & 0x00000010) == 0x00000010)) {
calledComputationIds_ = java.util.Collections.unmodifiableList(calledComputationIds_);
bitField1_ = (bitField1_ & ~0x00000010);
}
result.calledComputationIds_ = calledComputationIds_;
if (shardingBuilder_ == null) {
result.sharding_ = sharding_;
} else {
result.sharding_ = shardingBuilder_.build();
}
result.backendConfig_ = backendConfig_;
if (replicaGroupsBuilder_ == null) {
if (((bitField1_ & 0x00000080) == 0x00000080)) {
replicaGroups_ = java.util.Collections.unmodifiableList(replicaGroups_);
bitField1_ = (bitField1_ & ~0x00000080);
}
result.replicaGroups_ = replicaGroups_;
} else {
result.replicaGroups_ = replicaGroupsBuilder_.build();
}
result.allReduceId_ = allReduceId_;
result.crossReplicaSumBarrier_ = crossReplicaSumBarrier_;
result.isHostTransfer_ = isHostTransfer_;
if (scatterDimensionNumbersBuilder_ == null) {
result.scatterDimensionNumbers_ = scatterDimensionNumbers_;
} else {
result.scatterDimensionNumbers_ = scatterDimensionNumbersBuilder_.build();
}
if (precisionConfigBuilder_ == null) {
result.precisionConfig_ = precisionConfig_;
} else {
result.precisionConfig_ = precisionConfigBuilder_.build();
}
if (sourceTargetPairsBuilder_ == null) {
if (((bitField1_ & 0x00002000) == 0x00002000)) {
sourceTargetPairs_ = java.util.Collections.unmodifiableList(sourceTargetPairs_);
bitField1_ = (bitField1_ & ~0x00002000);
}
result.sourceTargetPairs_ = sourceTargetPairs_;
} else {
result.sourceTargetPairs_ = sourceTargetPairsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
result.bitField1_ = to_bitField1_;
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 xla.Hlo.HloInstructionProto) {
return mergeFrom((xla.Hlo.HloInstructionProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloInstructionProto other) {
if (other == xla.Hlo.HloInstructionProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getOpcode().isEmpty()) {
opcode_ = other.opcode_;
onChanged();
}
if (other.hasShape()) {
mergeShape(other.getShape());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (other.hasLiteral()) {
mergeLiteral(other.getLiteral());
}
if (other.getParameterNumber() != 0L) {
setParameterNumber(other.getParameterNumber());
}
if (!other.getFusionKind().isEmpty()) {
fusionKind_ = other.fusionKind_;
onChanged();
}
if (other.getTupleIndex() != 0L) {
setTupleIndex(other.getTupleIndex());
}
if (!other.dimensions_.isEmpty()) {
if (dimensions_.isEmpty()) {
dimensions_ = other.dimensions_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureDimensionsIsMutable();
dimensions_.addAll(other.dimensions_);
}
onChanged();
}
if (other.hasWindow()) {
mergeWindow(other.getWindow());
}
if (other.hasConvolutionDimensionNumbers()) {
mergeConvolutionDimensionNumbers(other.getConvolutionDimensionNumbers());
}
if (other.getFeatureGroupCount() != 0L) {
setFeatureGroupCount(other.getFeatureGroupCount());
}
if (sliceDimensionsBuilder_ == null) {
if (!other.sliceDimensions_.isEmpty()) {
if (sliceDimensions_.isEmpty()) {
sliceDimensions_ = other.sliceDimensions_;
bitField0_ = (bitField0_ & ~0x00001000);
} else {
ensureSliceDimensionsIsMutable();
sliceDimensions_.addAll(other.sliceDimensions_);
}
onChanged();
}
} else {
if (!other.sliceDimensions_.isEmpty()) {
if (sliceDimensionsBuilder_.isEmpty()) {
sliceDimensionsBuilder_.dispose();
sliceDimensionsBuilder_ = null;
sliceDimensions_ = other.sliceDimensions_;
bitField0_ = (bitField0_ & ~0x00001000);
sliceDimensionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSliceDimensionsFieldBuilder() : null;
} else {
sliceDimensionsBuilder_.addAllMessages(other.sliceDimensions_);
}
}
}
if (other.getExponentBits() != 0) {
setExponentBits(other.getExponentBits());
}
if (other.getMantissaBits() != 0) {
setMantissaBits(other.getMantissaBits());
}
if (!other.dynamicSliceSizes_.isEmpty()) {
if (dynamicSliceSizes_.isEmpty()) {
dynamicSliceSizes_ = other.dynamicSliceSizes_;
bitField0_ = (bitField0_ & ~0x00008000);
} else {
ensureDynamicSliceSizesIsMutable();
dynamicSliceSizes_.addAll(other.dynamicSliceSizes_);
}
onChanged();
}
if (other.hasPaddingConfig()) {
mergePaddingConfig(other.getPaddingConfig());
}
if (other.getOutfeedConfig() != com.google.protobuf.ByteString.EMPTY) {
setOutfeedConfig(other.getOutfeedConfig());
}
if (other.distribution_ != 0) {
setDistributionValue(other.getDistributionValue());
}
if (other.getEpsilon() != 0F) {
setEpsilon(other.getEpsilon());
}
if (other.getFeatureIndex() != 0L) {
setFeatureIndex(other.getFeatureIndex());
}
if (other.getChannelId() != 0L) {
setChannelId(other.getChannelId());
}
if (other.getInfeedConfig() != com.google.protobuf.ByteString.EMPTY) {
setInfeedConfig(other.getInfeedConfig());
}
if (!other.getCustomCallTarget().isEmpty()) {
customCallTarget_ = other.customCallTarget_;
onChanged();
}
if (!other.getCustomCallOpaque().isEmpty()) {
customCallOpaque_ = other.customCallOpaque_;
onChanged();
}
if (other.hasOutfeedShape()) {
mergeOutfeedShape(other.getOutfeedShape());
}
if (other.hasDotDimensionNumbers()) {
mergeDotDimensionNumbers(other.getDotDimensionNumbers());
}
if (other.fftType_ != 0) {
setFftTypeValue(other.getFftTypeValue());
}
if (!other.fftLength_.isEmpty()) {
if (fftLength_.isEmpty()) {
fftLength_ = other.fftLength_;
bitField0_ = (bitField0_ & ~0x10000000);
} else {
ensureFftLengthIsMutable();
fftLength_.addAll(other.fftLength_);
}
onChanged();
}
if (other.hasGatherDimensionNumbers()) {
mergeGatherDimensionNumbers(other.getGatherDimensionNumbers());
}
if (!other.gatherSliceSizes_.isEmpty()) {
if (gatherSliceSizes_.isEmpty()) {
gatherSliceSizes_ = other.gatherSliceSizes_;
bitField0_ = (bitField0_ & ~0x40000000);
} else {
ensureGatherSliceSizesIsMutable();
gatherSliceSizes_.addAll(other.gatherSliceSizes_);
}
onChanged();
}
if (!other.getChannelName().isEmpty()) {
channelName_ = other.channelName_;
onChanged();
}
if (other.getCostEstimateNs() != 0L) {
setCostEstimateNs(other.getCostEstimateNs());
}
if (other.getId() != 0L) {
setId(other.getId());
}
if (!other.operandIds_.isEmpty()) {
if (operandIds_.isEmpty()) {
operandIds_ = other.operandIds_;
bitField1_ = (bitField1_ & ~0x00000004);
} else {
ensureOperandIdsIsMutable();
operandIds_.addAll(other.operandIds_);
}
onChanged();
}
if (!other.controlPredecessorIds_.isEmpty()) {
if (controlPredecessorIds_.isEmpty()) {
controlPredecessorIds_ = other.controlPredecessorIds_;
bitField1_ = (bitField1_ & ~0x00000008);
} else {
ensureControlPredecessorIdsIsMutable();
controlPredecessorIds_.addAll(other.controlPredecessorIds_);
}
onChanged();
}
if (!other.calledComputationIds_.isEmpty()) {
if (calledComputationIds_.isEmpty()) {
calledComputationIds_ = other.calledComputationIds_;
bitField1_ = (bitField1_ & ~0x00000010);
} else {
ensureCalledComputationIdsIsMutable();
calledComputationIds_.addAll(other.calledComputationIds_);
}
onChanged();
}
if (other.hasSharding()) {
mergeSharding(other.getSharding());
}
if (!other.getBackendConfig().isEmpty()) {
backendConfig_ = other.backendConfig_;
onChanged();
}
if (replicaGroupsBuilder_ == null) {
if (!other.replicaGroups_.isEmpty()) {
if (replicaGroups_.isEmpty()) {
replicaGroups_ = other.replicaGroups_;
bitField1_ = (bitField1_ & ~0x00000080);
} else {
ensureReplicaGroupsIsMutable();
replicaGroups_.addAll(other.replicaGroups_);
}
onChanged();
}
} else {
if (!other.replicaGroups_.isEmpty()) {
if (replicaGroupsBuilder_.isEmpty()) {
replicaGroupsBuilder_.dispose();
replicaGroupsBuilder_ = null;
replicaGroups_ = other.replicaGroups_;
bitField1_ = (bitField1_ & ~0x00000080);
replicaGroupsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getReplicaGroupsFieldBuilder() : null;
} else {
replicaGroupsBuilder_.addAllMessages(other.replicaGroups_);
}
}
}
if (other.getAllReduceId() != 0L) {
setAllReduceId(other.getAllReduceId());
}
if (!other.getCrossReplicaSumBarrier().isEmpty()) {
crossReplicaSumBarrier_ = other.crossReplicaSumBarrier_;
onChanged();
}
if (other.getIsHostTransfer() != false) {
setIsHostTransfer(other.getIsHostTransfer());
}
if (other.hasScatterDimensionNumbers()) {
mergeScatterDimensionNumbers(other.getScatterDimensionNumbers());
}
if (other.hasPrecisionConfig()) {
mergePrecisionConfig(other.getPrecisionConfig());
}
if (sourceTargetPairsBuilder_ == null) {
if (!other.sourceTargetPairs_.isEmpty()) {
if (sourceTargetPairs_.isEmpty()) {
sourceTargetPairs_ = other.sourceTargetPairs_;
bitField1_ = (bitField1_ & ~0x00002000);
} else {
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.addAll(other.sourceTargetPairs_);
}
onChanged();
}
} else {
if (!other.sourceTargetPairs_.isEmpty()) {
if (sourceTargetPairsBuilder_.isEmpty()) {
sourceTargetPairsBuilder_.dispose();
sourceTargetPairsBuilder_ = null;
sourceTargetPairs_ = other.sourceTargetPairs_;
bitField1_ = (bitField1_ & ~0x00002000);
sourceTargetPairsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSourceTargetPairsFieldBuilder() : null;
} else {
sourceTargetPairsBuilder_.addAllMessages(other.sourceTargetPairs_);
}
}
}
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 {
xla.Hlo.HloInstructionProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloInstructionProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int bitField1_;
private java.lang.Object name_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* 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 java.lang.Object opcode_ = "";
/**
* string opcode = 2;
*/
public java.lang.String getOpcode() {
java.lang.Object ref = opcode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
opcode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string opcode = 2;
*/
public com.google.protobuf.ByteString
getOpcodeBytes() {
java.lang.Object ref = opcode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
opcode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string opcode = 2;
*/
public Builder setOpcode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
opcode_ = value;
onChanged();
return this;
}
/**
* string opcode = 2;
*/
public Builder clearOpcode() {
opcode_ = getDefaultInstance().getOpcode();
onChanged();
return this;
}
/**
* string opcode = 2;
*/
public Builder setOpcodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
opcode_ = value;
onChanged();
return this;
}
private xla.XlaData.Shape shape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder> shapeBuilder_;
/**
* .xla.Shape shape = 3;
*/
public boolean hasShape() {
return shapeBuilder_ != null || shape_ != null;
}
/**
* .xla.Shape shape = 3;
*/
public xla.XlaData.Shape getShape() {
if (shapeBuilder_ == null) {
return shape_ == null ? xla.XlaData.Shape.getDefaultInstance() : shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
* .xla.Shape shape = 3;
*/
public Builder setShape(xla.XlaData.Shape value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
return this;
}
/**
* .xla.Shape shape = 3;
*/
public Builder setShape(
xla.XlaData.Shape.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .xla.Shape shape = 3;
*/
public Builder mergeShape(xla.XlaData.Shape value) {
if (shapeBuilder_ == null) {
if (shape_ != null) {
shape_ =
xla.XlaData.Shape.newBuilder(shape_).mergeFrom(value).buildPartial();
} else {
shape_ = value;
}
onChanged();
} else {
shapeBuilder_.mergeFrom(value);
}
return this;
}
/**
* .xla.Shape shape = 3;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = null;
onChanged();
} else {
shape_ = null;
shapeBuilder_ = null;
}
return this;
}
/**
* .xla.Shape shape = 3;
*/
public xla.XlaData.Shape.Builder getShapeBuilder() {
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
* .xla.Shape shape = 3;
*/
public xla.XlaData.ShapeOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_ == null ?
xla.XlaData.Shape.getDefaultInstance() : shape_;
}
}
/**
* .xla.Shape shape = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder>(
getShape(),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
private xla.XlaData.OpMetadata metadata_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpMetadata, xla.XlaData.OpMetadata.Builder, xla.XlaData.OpMetadataOrBuilder> metadataBuilder_;
/**
* .xla.OpMetadata metadata = 7;
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public xla.XlaData.OpMetadata getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? xla.XlaData.OpMetadata.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
* .xla.OpMetadata metadata = 7;
*/
public Builder setMetadata(xla.XlaData.OpMetadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public Builder setMetadata(
xla.XlaData.OpMetadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public Builder mergeMetadata(xla.XlaData.OpMetadata value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
xla.XlaData.OpMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
* .xla.OpMetadata metadata = 7;
*/
public xla.XlaData.OpMetadata.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
* .xla.OpMetadata metadata = 7;
*/
public xla.XlaData.OpMetadataOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
xla.XlaData.OpMetadata.getDefaultInstance() : metadata_;
}
}
/**
* .xla.OpMetadata metadata = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpMetadata, xla.XlaData.OpMetadata.Builder, xla.XlaData.OpMetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpMetadata, xla.XlaData.OpMetadata.Builder, xla.XlaData.OpMetadataOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private xla.XlaData.LiteralProto literal_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.LiteralProto, xla.XlaData.LiteralProto.Builder, xla.XlaData.LiteralProtoOrBuilder> literalBuilder_;
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public boolean hasLiteral() {
return literalBuilder_ != null || literal_ != null;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public xla.XlaData.LiteralProto getLiteral() {
if (literalBuilder_ == null) {
return literal_ == null ? xla.XlaData.LiteralProto.getDefaultInstance() : literal_;
} else {
return literalBuilder_.getMessage();
}
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public Builder setLiteral(xla.XlaData.LiteralProto value) {
if (literalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
literal_ = value;
onChanged();
} else {
literalBuilder_.setMessage(value);
}
return this;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public Builder setLiteral(
xla.XlaData.LiteralProto.Builder builderForValue) {
if (literalBuilder_ == null) {
literal_ = builderForValue.build();
onChanged();
} else {
literalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public Builder mergeLiteral(xla.XlaData.LiteralProto value) {
if (literalBuilder_ == null) {
if (literal_ != null) {
literal_ =
xla.XlaData.LiteralProto.newBuilder(literal_).mergeFrom(value).buildPartial();
} else {
literal_ = value;
}
onChanged();
} else {
literalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public Builder clearLiteral() {
if (literalBuilder_ == null) {
literal_ = null;
onChanged();
} else {
literal_ = null;
literalBuilder_ = null;
}
return this;
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public xla.XlaData.LiteralProto.Builder getLiteralBuilder() {
onChanged();
return getLiteralFieldBuilder().getBuilder();
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
public xla.XlaData.LiteralProtoOrBuilder getLiteralOrBuilder() {
if (literalBuilder_ != null) {
return literalBuilder_.getMessageOrBuilder();
} else {
return literal_ == null ?
xla.XlaData.LiteralProto.getDefaultInstance() : literal_;
}
}
/**
*
* Literal, only present for kConstant.
*
*
* .xla.LiteralProto literal = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.LiteralProto, xla.XlaData.LiteralProto.Builder, xla.XlaData.LiteralProtoOrBuilder>
getLiteralFieldBuilder() {
if (literalBuilder_ == null) {
literalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.LiteralProto, xla.XlaData.LiteralProto.Builder, xla.XlaData.LiteralProtoOrBuilder>(
getLiteral(),
getParentForChildren(),
isClean());
literal_ = null;
}
return literalBuilder_;
}
private long parameterNumber_ ;
/**
*
* Parameter number is only present for kParameter.
*
*
* int64 parameter_number = 9;
*/
public long getParameterNumber() {
return parameterNumber_;
}
/**
*
* Parameter number is only present for kParameter.
*
*
* int64 parameter_number = 9;
*/
public Builder setParameterNumber(long value) {
parameterNumber_ = value;
onChanged();
return this;
}
/**
*
* Parameter number is only present for kParameter.
*
*
* int64 parameter_number = 9;
*/
public Builder clearParameterNumber() {
parameterNumber_ = 0L;
onChanged();
return this;
}
private java.lang.Object fusionKind_ = "";
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public java.lang.String getFusionKind() {
java.lang.Object ref = fusionKind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fusionKind_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public com.google.protobuf.ByteString
getFusionKindBytes() {
java.lang.Object ref = fusionKind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fusionKind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public Builder setFusionKind(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fusionKind_ = value;
onChanged();
return this;
}
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public Builder clearFusionKind() {
fusionKind_ = getDefaultInstance().getFusionKind();
onChanged();
return this;
}
/**
*
* Fusion state, only present for kFusion.
*
*
* string fusion_kind = 11;
*/
public Builder setFusionKindBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fusionKind_ = value;
onChanged();
return this;
}
private long tupleIndex_ ;
/**
*
* Index for kGetTupleElement.
*
*
* int64 tuple_index = 13;
*/
public long getTupleIndex() {
return tupleIndex_;
}
/**
*
* Index for kGetTupleElement.
*
*
* int64 tuple_index = 13;
*/
public Builder setTupleIndex(long value) {
tupleIndex_ = value;
onChanged();
return this;
}
/**
*
* Index for kGetTupleElement.
*
*
* int64 tuple_index = 13;
*/
public Builder clearTupleIndex() {
tupleIndex_ = 0L;
onChanged();
return this;
}
private java.util.List dimensions_ = java.util.Collections.emptyList();
private void ensureDimensionsIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
dimensions_ = new java.util.ArrayList(dimensions_);
bitField0_ |= 0x00000100;
}
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public java.util.List
getDimensionsList() {
return java.util.Collections.unmodifiableList(dimensions_);
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public int getDimensionsCount() {
return dimensions_.size();
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public long getDimensions(int index) {
return dimensions_.get(index);
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public Builder setDimensions(
int index, long value) {
ensureDimensionsIsMutable();
dimensions_.set(index, value);
onChanged();
return this;
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public Builder addDimensions(long value) {
ensureDimensionsIsMutable();
dimensions_.add(value);
onChanged();
return this;
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public Builder addAllDimensions(
java.lang.Iterable values) {
ensureDimensionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, dimensions_);
onChanged();
return this;
}
/**
*
* Dimensions present for some operations that require reshaping or
* broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.
*
*
* repeated int64 dimensions = 14;
*/
public Builder clearDimensions() {
dimensions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
private xla.XlaData.Window window_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Window, xla.XlaData.Window.Builder, xla.XlaData.WindowOrBuilder> windowBuilder_;
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public boolean hasWindow() {
return windowBuilder_ != null || window_ != null;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public xla.XlaData.Window getWindow() {
if (windowBuilder_ == null) {
return window_ == null ? xla.XlaData.Window.getDefaultInstance() : window_;
} else {
return windowBuilder_.getMessage();
}
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public Builder setWindow(xla.XlaData.Window value) {
if (windowBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
window_ = value;
onChanged();
} else {
windowBuilder_.setMessage(value);
}
return this;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public Builder setWindow(
xla.XlaData.Window.Builder builderForValue) {
if (windowBuilder_ == null) {
window_ = builderForValue.build();
onChanged();
} else {
windowBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public Builder mergeWindow(xla.XlaData.Window value) {
if (windowBuilder_ == null) {
if (window_ != null) {
window_ =
xla.XlaData.Window.newBuilder(window_).mergeFrom(value).buildPartial();
} else {
window_ = value;
}
onChanged();
} else {
windowBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public Builder clearWindow() {
if (windowBuilder_ == null) {
window_ = null;
onChanged();
} else {
window_ = null;
windowBuilder_ = null;
}
return this;
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public xla.XlaData.Window.Builder getWindowBuilder() {
onChanged();
return getWindowFieldBuilder().getBuilder();
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
public xla.XlaData.WindowOrBuilder getWindowOrBuilder() {
if (windowBuilder_ != null) {
return windowBuilder_.getMessageOrBuilder();
} else {
return window_ == null ?
xla.XlaData.Window.getDefaultInstance() : window_;
}
}
/**
*
* Describes the window in a windowed operation such as convolution.
*
*
* .xla.Window window = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Window, xla.XlaData.Window.Builder, xla.XlaData.WindowOrBuilder>
getWindowFieldBuilder() {
if (windowBuilder_ == null) {
windowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Window, xla.XlaData.Window.Builder, xla.XlaData.WindowOrBuilder>(
getWindow(),
getParentForChildren(),
isClean());
window_ = null;
}
return windowBuilder_;
}
private xla.XlaData.ConvolutionDimensionNumbers convolutionDimensionNumbers_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ConvolutionDimensionNumbers, xla.XlaData.ConvolutionDimensionNumbers.Builder, xla.XlaData.ConvolutionDimensionNumbersOrBuilder> convolutionDimensionNumbersBuilder_;
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public boolean hasConvolutionDimensionNumbers() {
return convolutionDimensionNumbersBuilder_ != null || convolutionDimensionNumbers_ != null;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public xla.XlaData.ConvolutionDimensionNumbers getConvolutionDimensionNumbers() {
if (convolutionDimensionNumbersBuilder_ == null) {
return convolutionDimensionNumbers_ == null ? xla.XlaData.ConvolutionDimensionNumbers.getDefaultInstance() : convolutionDimensionNumbers_;
} else {
return convolutionDimensionNumbersBuilder_.getMessage();
}
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public Builder setConvolutionDimensionNumbers(xla.XlaData.ConvolutionDimensionNumbers value) {
if (convolutionDimensionNumbersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
convolutionDimensionNumbers_ = value;
onChanged();
} else {
convolutionDimensionNumbersBuilder_.setMessage(value);
}
return this;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public Builder setConvolutionDimensionNumbers(
xla.XlaData.ConvolutionDimensionNumbers.Builder builderForValue) {
if (convolutionDimensionNumbersBuilder_ == null) {
convolutionDimensionNumbers_ = builderForValue.build();
onChanged();
} else {
convolutionDimensionNumbersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public Builder mergeConvolutionDimensionNumbers(xla.XlaData.ConvolutionDimensionNumbers value) {
if (convolutionDimensionNumbersBuilder_ == null) {
if (convolutionDimensionNumbers_ != null) {
convolutionDimensionNumbers_ =
xla.XlaData.ConvolutionDimensionNumbers.newBuilder(convolutionDimensionNumbers_).mergeFrom(value).buildPartial();
} else {
convolutionDimensionNumbers_ = value;
}
onChanged();
} else {
convolutionDimensionNumbersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public Builder clearConvolutionDimensionNumbers() {
if (convolutionDimensionNumbersBuilder_ == null) {
convolutionDimensionNumbers_ = null;
onChanged();
} else {
convolutionDimensionNumbers_ = null;
convolutionDimensionNumbersBuilder_ = null;
}
return this;
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public xla.XlaData.ConvolutionDimensionNumbers.Builder getConvolutionDimensionNumbersBuilder() {
onChanged();
return getConvolutionDimensionNumbersFieldBuilder().getBuilder();
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
public xla.XlaData.ConvolutionDimensionNumbersOrBuilder getConvolutionDimensionNumbersOrBuilder() {
if (convolutionDimensionNumbersBuilder_ != null) {
return convolutionDimensionNumbersBuilder_.getMessageOrBuilder();
} else {
return convolutionDimensionNumbers_ == null ?
xla.XlaData.ConvolutionDimensionNumbers.getDefaultInstance() : convolutionDimensionNumbers_;
}
}
/**
*
* Describes the dimension numbers used for a convolution.
*
*
* .xla.ConvolutionDimensionNumbers convolution_dimension_numbers = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ConvolutionDimensionNumbers, xla.XlaData.ConvolutionDimensionNumbers.Builder, xla.XlaData.ConvolutionDimensionNumbersOrBuilder>
getConvolutionDimensionNumbersFieldBuilder() {
if (convolutionDimensionNumbersBuilder_ == null) {
convolutionDimensionNumbersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ConvolutionDimensionNumbers, xla.XlaData.ConvolutionDimensionNumbers.Builder, xla.XlaData.ConvolutionDimensionNumbersOrBuilder>(
getConvolutionDimensionNumbers(),
getParentForChildren(),
isClean());
convolutionDimensionNumbers_ = null;
}
return convolutionDimensionNumbersBuilder_;
}
private long featureGroupCount_ ;
/**
*
* The number of feature groups. Used for a convolution. Must be a divisor of
* the input feature dimension and output feature dimension. If not specified,
* it will use a default value of 1.
*
*
* int64 feature_group_count = 50;
*/
public long getFeatureGroupCount() {
return featureGroupCount_;
}
/**
*
* The number of feature groups. Used for a convolution. Must be a divisor of
* the input feature dimension and output feature dimension. If not specified,
* it will use a default value of 1.
*
*
* int64 feature_group_count = 50;
*/
public Builder setFeatureGroupCount(long value) {
featureGroupCount_ = value;
onChanged();
return this;
}
/**
*
* The number of feature groups. Used for a convolution. Must be a divisor of
* the input feature dimension and output feature dimension. If not specified,
* it will use a default value of 1.
*
*
* int64 feature_group_count = 50;
*/
public Builder clearFeatureGroupCount() {
featureGroupCount_ = 0L;
onChanged();
return this;
}
private java.util.List sliceDimensions_ =
java.util.Collections.emptyList();
private void ensureSliceDimensionsIsMutable() {
if (!((bitField0_ & 0x00001000) == 0x00001000)) {
sliceDimensions_ = new java.util.ArrayList(sliceDimensions_);
bitField0_ |= 0x00001000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto.SliceDimensions, xla.Hlo.HloInstructionProto.SliceDimensions.Builder, xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder> sliceDimensionsBuilder_;
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public java.util.List getSliceDimensionsList() {
if (sliceDimensionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(sliceDimensions_);
} else {
return sliceDimensionsBuilder_.getMessageList();
}
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public int getSliceDimensionsCount() {
if (sliceDimensionsBuilder_ == null) {
return sliceDimensions_.size();
} else {
return sliceDimensionsBuilder_.getCount();
}
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensions getSliceDimensions(int index) {
if (sliceDimensionsBuilder_ == null) {
return sliceDimensions_.get(index);
} else {
return sliceDimensionsBuilder_.getMessage(index);
}
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder setSliceDimensions(
int index, xla.Hlo.HloInstructionProto.SliceDimensions value) {
if (sliceDimensionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSliceDimensionsIsMutable();
sliceDimensions_.set(index, value);
onChanged();
} else {
sliceDimensionsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder setSliceDimensions(
int index, xla.Hlo.HloInstructionProto.SliceDimensions.Builder builderForValue) {
if (sliceDimensionsBuilder_ == null) {
ensureSliceDimensionsIsMutable();
sliceDimensions_.set(index, builderForValue.build());
onChanged();
} else {
sliceDimensionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder addSliceDimensions(xla.Hlo.HloInstructionProto.SliceDimensions value) {
if (sliceDimensionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSliceDimensionsIsMutable();
sliceDimensions_.add(value);
onChanged();
} else {
sliceDimensionsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder addSliceDimensions(
int index, xla.Hlo.HloInstructionProto.SliceDimensions value) {
if (sliceDimensionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSliceDimensionsIsMutable();
sliceDimensions_.add(index, value);
onChanged();
} else {
sliceDimensionsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder addSliceDimensions(
xla.Hlo.HloInstructionProto.SliceDimensions.Builder builderForValue) {
if (sliceDimensionsBuilder_ == null) {
ensureSliceDimensionsIsMutable();
sliceDimensions_.add(builderForValue.build());
onChanged();
} else {
sliceDimensionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder addSliceDimensions(
int index, xla.Hlo.HloInstructionProto.SliceDimensions.Builder builderForValue) {
if (sliceDimensionsBuilder_ == null) {
ensureSliceDimensionsIsMutable();
sliceDimensions_.add(index, builderForValue.build());
onChanged();
} else {
sliceDimensionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder addAllSliceDimensions(
java.lang.Iterable values) {
if (sliceDimensionsBuilder_ == null) {
ensureSliceDimensionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sliceDimensions_);
onChanged();
} else {
sliceDimensionsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder clearSliceDimensions() {
if (sliceDimensionsBuilder_ == null) {
sliceDimensions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
} else {
sliceDimensionsBuilder_.clear();
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public Builder removeSliceDimensions(int index) {
if (sliceDimensionsBuilder_ == null) {
ensureSliceDimensionsIsMutable();
sliceDimensions_.remove(index);
onChanged();
} else {
sliceDimensionsBuilder_.remove(index);
}
return this;
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensions.Builder getSliceDimensionsBuilder(
int index) {
return getSliceDimensionsFieldBuilder().getBuilder(index);
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder getSliceDimensionsOrBuilder(
int index) {
if (sliceDimensionsBuilder_ == null) {
return sliceDimensions_.get(index); } else {
return sliceDimensionsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public java.util.List
getSliceDimensionsOrBuilderList() {
if (sliceDimensionsBuilder_ != null) {
return sliceDimensionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sliceDimensions_);
}
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensions.Builder addSliceDimensionsBuilder() {
return getSliceDimensionsFieldBuilder().addBuilder(
xla.Hlo.HloInstructionProto.SliceDimensions.getDefaultInstance());
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public xla.Hlo.HloInstructionProto.SliceDimensions.Builder addSliceDimensionsBuilder(
int index) {
return getSliceDimensionsFieldBuilder().addBuilder(
index, xla.Hlo.HloInstructionProto.SliceDimensions.getDefaultInstance());
}
/**
* repeated .xla.HloInstructionProto.SliceDimensions slice_dimensions = 17;
*/
public java.util.List
getSliceDimensionsBuilderList() {
return getSliceDimensionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto.SliceDimensions, xla.Hlo.HloInstructionProto.SliceDimensions.Builder, xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder>
getSliceDimensionsFieldBuilder() {
if (sliceDimensionsBuilder_ == null) {
sliceDimensionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto.SliceDimensions, xla.Hlo.HloInstructionProto.SliceDimensions.Builder, xla.Hlo.HloInstructionProto.SliceDimensionsOrBuilder>(
sliceDimensions_,
((bitField0_ & 0x00001000) == 0x00001000),
getParentForChildren(),
isClean());
sliceDimensions_ = null;
}
return sliceDimensionsBuilder_;
}
private int exponentBits_ ;
/**
*
* The bit sizes for a reduce-precision operation.
*
*
* int32 exponent_bits = 18;
*/
public int getExponentBits() {
return exponentBits_;
}
/**
*
* The bit sizes for a reduce-precision operation.
*
*
* int32 exponent_bits = 18;
*/
public Builder setExponentBits(int value) {
exponentBits_ = value;
onChanged();
return this;
}
/**
*
* The bit sizes for a reduce-precision operation.
*
*
* int32 exponent_bits = 18;
*/
public Builder clearExponentBits() {
exponentBits_ = 0;
onChanged();
return this;
}
private int mantissaBits_ ;
/**
* int32 mantissa_bits = 19;
*/
public int getMantissaBits() {
return mantissaBits_;
}
/**
* int32 mantissa_bits = 19;
*/
public Builder setMantissaBits(int value) {
mantissaBits_ = value;
onChanged();
return this;
}
/**
* int32 mantissa_bits = 19;
*/
public Builder clearMantissaBits() {
mantissaBits_ = 0;
onChanged();
return this;
}
private java.util.List dynamicSliceSizes_ = java.util.Collections.emptyList();
private void ensureDynamicSliceSizesIsMutable() {
if (!((bitField0_ & 0x00008000) == 0x00008000)) {
dynamicSliceSizes_ = new java.util.ArrayList(dynamicSliceSizes_);
bitField0_ |= 0x00008000;
}
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public java.util.List
getDynamicSliceSizesList() {
return java.util.Collections.unmodifiableList(dynamicSliceSizes_);
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public int getDynamicSliceSizesCount() {
return dynamicSliceSizes_.size();
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public long getDynamicSliceSizes(int index) {
return dynamicSliceSizes_.get(index);
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public Builder setDynamicSliceSizes(
int index, long value) {
ensureDynamicSliceSizesIsMutable();
dynamicSliceSizes_.set(index, value);
onChanged();
return this;
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public Builder addDynamicSliceSizes(long value) {
ensureDynamicSliceSizesIsMutable();
dynamicSliceSizes_.add(value);
onChanged();
return this;
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public Builder addAllDynamicSliceSizes(
java.lang.Iterable values) {
ensureDynamicSliceSizesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, dynamicSliceSizes_);
onChanged();
return this;
}
/**
*
* Describes the [start, start + size) range size for a dynamic slice
* ('start' is specified dynamically in the second operand of the operation).
*
*
* repeated int64 dynamic_slice_sizes = 20;
*/
public Builder clearDynamicSliceSizes() {
dynamicSliceSizes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00008000);
onChanged();
return this;
}
private xla.XlaData.PaddingConfig paddingConfig_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PaddingConfig, xla.XlaData.PaddingConfig.Builder, xla.XlaData.PaddingConfigOrBuilder> paddingConfigBuilder_;
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public boolean hasPaddingConfig() {
return paddingConfigBuilder_ != null || paddingConfig_ != null;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public xla.XlaData.PaddingConfig getPaddingConfig() {
if (paddingConfigBuilder_ == null) {
return paddingConfig_ == null ? xla.XlaData.PaddingConfig.getDefaultInstance() : paddingConfig_;
} else {
return paddingConfigBuilder_.getMessage();
}
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public Builder setPaddingConfig(xla.XlaData.PaddingConfig value) {
if (paddingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
paddingConfig_ = value;
onChanged();
} else {
paddingConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public Builder setPaddingConfig(
xla.XlaData.PaddingConfig.Builder builderForValue) {
if (paddingConfigBuilder_ == null) {
paddingConfig_ = builderForValue.build();
onChanged();
} else {
paddingConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public Builder mergePaddingConfig(xla.XlaData.PaddingConfig value) {
if (paddingConfigBuilder_ == null) {
if (paddingConfig_ != null) {
paddingConfig_ =
xla.XlaData.PaddingConfig.newBuilder(paddingConfig_).mergeFrom(value).buildPartial();
} else {
paddingConfig_ = value;
}
onChanged();
} else {
paddingConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public Builder clearPaddingConfig() {
if (paddingConfigBuilder_ == null) {
paddingConfig_ = null;
onChanged();
} else {
paddingConfig_ = null;
paddingConfigBuilder_ = null;
}
return this;
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public xla.XlaData.PaddingConfig.Builder getPaddingConfigBuilder() {
onChanged();
return getPaddingConfigFieldBuilder().getBuilder();
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
public xla.XlaData.PaddingConfigOrBuilder getPaddingConfigOrBuilder() {
if (paddingConfigBuilder_ != null) {
return paddingConfigBuilder_.getMessageOrBuilder();
} else {
return paddingConfig_ == null ?
xla.XlaData.PaddingConfig.getDefaultInstance() : paddingConfig_;
}
}
/**
*
* The padding configuration that describes the edge padding and interior
* padding of this pad instruction. Only set for pad instructions.
*
*
* .xla.PaddingConfig padding_config = 21;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PaddingConfig, xla.XlaData.PaddingConfig.Builder, xla.XlaData.PaddingConfigOrBuilder>
getPaddingConfigFieldBuilder() {
if (paddingConfigBuilder_ == null) {
paddingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PaddingConfig, xla.XlaData.PaddingConfig.Builder, xla.XlaData.PaddingConfigOrBuilder>(
getPaddingConfig(),
getParentForChildren(),
isClean());
paddingConfig_ = null;
}
return paddingConfigBuilder_;
}
private com.google.protobuf.ByteString outfeedConfig_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Outfeed configuration information, only present for kOutfeed.
*
*
* bytes outfeed_config = 22;
*/
public com.google.protobuf.ByteString getOutfeedConfig() {
return outfeedConfig_;
}
/**
*
* Outfeed configuration information, only present for kOutfeed.
*
*
* bytes outfeed_config = 22;
*/
public Builder setOutfeedConfig(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
outfeedConfig_ = value;
onChanged();
return this;
}
/**
*
* Outfeed configuration information, only present for kOutfeed.
*
*
* bytes outfeed_config = 22;
*/
public Builder clearOutfeedConfig() {
outfeedConfig_ = getDefaultInstance().getOutfeedConfig();
onChanged();
return this;
}
private int distribution_ = 0;
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public int getDistributionValue() {
return distribution_;
}
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public Builder setDistributionValue(int value) {
distribution_ = value;
onChanged();
return this;
}
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public xla.XlaData.RandomDistribution getDistribution() {
@SuppressWarnings("deprecation")
xla.XlaData.RandomDistribution result = xla.XlaData.RandomDistribution.valueOf(distribution_);
return result == null ? xla.XlaData.RandomDistribution.UNRECOGNIZED : result;
}
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public Builder setDistribution(xla.XlaData.RandomDistribution value) {
if (value == null) {
throw new NullPointerException();
}
distribution_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The distribution requested for random number generation.
* Only present for kRng.
*
*
* .xla.RandomDistribution distribution = 23;
*/
public Builder clearDistribution() {
distribution_ = 0;
onChanged();
return this;
}
private float epsilon_ ;
/**
*
* A small float number added to the variance to avoid divide-by-zero error.
* Only present for kBatchNormTraining.
*
*
* float epsilon = 24;
*/
public float getEpsilon() {
return epsilon_;
}
/**
*
* A small float number added to the variance to avoid divide-by-zero error.
* Only present for kBatchNormTraining.
*
*
* float epsilon = 24;
*/
public Builder setEpsilon(float value) {
epsilon_ = value;
onChanged();
return this;
}
/**
*
* A small float number added to the variance to avoid divide-by-zero error.
* Only present for kBatchNormTraining.
*
*
* float epsilon = 24;
*/
public Builder clearEpsilon() {
epsilon_ = 0F;
onChanged();
return this;
}
private long featureIndex_ ;
/**
*
* An integer value representing the index of the feature dimension.
* Only present for kBatchNormTraining.
*
*
* int64 feature_index = 25;
*/
public long getFeatureIndex() {
return featureIndex_;
}
/**
*
* An integer value representing the index of the feature dimension.
* Only present for kBatchNormTraining.
*
*
* int64 feature_index = 25;
*/
public Builder setFeatureIndex(long value) {
featureIndex_ = value;
onChanged();
return this;
}
/**
*
* An integer value representing the index of the feature dimension.
* Only present for kBatchNormTraining.
*
*
* int64 feature_index = 25;
*/
public Builder clearFeatureIndex() {
featureIndex_ = 0L;
onChanged();
return this;
}
private long channelId_ ;
/**
*
* Represents a unique identifier for each Send/Recv instruction pair.
* Only present for kSend or kRecv.
*
*
* int64 channel_id = 26;
*/
public long getChannelId() {
return channelId_;
}
/**
*
* Represents a unique identifier for each Send/Recv instruction pair.
* Only present for kSend or kRecv.
*
*
* int64 channel_id = 26;
*/
public Builder setChannelId(long value) {
channelId_ = value;
onChanged();
return this;
}
/**
*
* Represents a unique identifier for each Send/Recv instruction pair.
* Only present for kSend or kRecv.
*
*
* int64 channel_id = 26;
*/
public Builder clearChannelId() {
channelId_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString infeedConfig_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* The string representation of the infeed configuration.
*
*
* bytes infeed_config = 27;
*/
public com.google.protobuf.ByteString getInfeedConfig() {
return infeedConfig_;
}
/**
*
* The string representation of the infeed configuration.
*
*
* bytes infeed_config = 27;
*/
public Builder setInfeedConfig(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
infeedConfig_ = value;
onChanged();
return this;
}
/**
*
* The string representation of the infeed configuration.
*
*
* bytes infeed_config = 27;
*/
public Builder clearInfeedConfig() {
infeedConfig_ = getDefaultInstance().getInfeedConfig();
onChanged();
return this;
}
private java.lang.Object customCallTarget_ = "";
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public java.lang.String getCustomCallTarget() {
java.lang.Object ref = customCallTarget_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customCallTarget_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public com.google.protobuf.ByteString
getCustomCallTargetBytes() {
java.lang.Object ref = customCallTarget_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customCallTarget_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public Builder setCustomCallTarget(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
customCallTarget_ = value;
onChanged();
return this;
}
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public Builder clearCustomCallTarget() {
customCallTarget_ = getDefaultInstance().getCustomCallTarget();
onChanged();
return this;
}
/**
*
* Name of a external target (eg, global symbol) to call, only present for
* kCustomCall.
*
*
* string custom_call_target = 28;
*/
public Builder setCustomCallTargetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
customCallTarget_ = value;
onChanged();
return this;
}
private java.lang.Object customCallOpaque_ = "";
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public java.lang.String getCustomCallOpaque() {
java.lang.Object ref = customCallOpaque_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customCallOpaque_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public com.google.protobuf.ByteString
getCustomCallOpaqueBytes() {
java.lang.Object ref = customCallOpaque_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customCallOpaque_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public Builder setCustomCallOpaque(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
customCallOpaque_ = value;
onChanged();
return this;
}
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public Builder clearCustomCallOpaque() {
customCallOpaque_ = getDefaultInstance().getCustomCallOpaque();
onChanged();
return this;
}
/**
*
* Opaque string, only present for kCustomCall.
*
*
* string custom_call_opaque = 53;
*/
public Builder setCustomCallOpaqueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
customCallOpaque_ = value;
onChanged();
return this;
}
private xla.XlaData.Shape outfeedShape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder> outfeedShapeBuilder_;
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public boolean hasOutfeedShape() {
return outfeedShapeBuilder_ != null || outfeedShape_ != null;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public xla.XlaData.Shape getOutfeedShape() {
if (outfeedShapeBuilder_ == null) {
return outfeedShape_ == null ? xla.XlaData.Shape.getDefaultInstance() : outfeedShape_;
} else {
return outfeedShapeBuilder_.getMessage();
}
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public Builder setOutfeedShape(xla.XlaData.Shape value) {
if (outfeedShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outfeedShape_ = value;
onChanged();
} else {
outfeedShapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public Builder setOutfeedShape(
xla.XlaData.Shape.Builder builderForValue) {
if (outfeedShapeBuilder_ == null) {
outfeedShape_ = builderForValue.build();
onChanged();
} else {
outfeedShapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public Builder mergeOutfeedShape(xla.XlaData.Shape value) {
if (outfeedShapeBuilder_ == null) {
if (outfeedShape_ != null) {
outfeedShape_ =
xla.XlaData.Shape.newBuilder(outfeedShape_).mergeFrom(value).buildPartial();
} else {
outfeedShape_ = value;
}
onChanged();
} else {
outfeedShapeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public Builder clearOutfeedShape() {
if (outfeedShapeBuilder_ == null) {
outfeedShape_ = null;
onChanged();
} else {
outfeedShape_ = null;
outfeedShapeBuilder_ = null;
}
return this;
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public xla.XlaData.Shape.Builder getOutfeedShapeBuilder() {
onChanged();
return getOutfeedShapeFieldBuilder().getBuilder();
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
public xla.XlaData.ShapeOrBuilder getOutfeedShapeOrBuilder() {
if (outfeedShapeBuilder_ != null) {
return outfeedShapeBuilder_.getMessageOrBuilder();
} else {
return outfeedShape_ == null ?
xla.XlaData.Shape.getDefaultInstance() : outfeedShape_;
}
}
/**
*
* Shape of outfeed request.
*
*
* .xla.Shape outfeed_shape = 29;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder>
getOutfeedShapeFieldBuilder() {
if (outfeedShapeBuilder_ == null) {
outfeedShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.Shape, xla.XlaData.Shape.Builder, xla.XlaData.ShapeOrBuilder>(
getOutfeedShape(),
getParentForChildren(),
isClean());
outfeedShape_ = null;
}
return outfeedShapeBuilder_;
}
private xla.XlaData.DotDimensionNumbers dotDimensionNumbers_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.DotDimensionNumbers, xla.XlaData.DotDimensionNumbers.Builder, xla.XlaData.DotDimensionNumbersOrBuilder> dotDimensionNumbersBuilder_;
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public boolean hasDotDimensionNumbers() {
return dotDimensionNumbersBuilder_ != null || dotDimensionNumbers_ != null;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public xla.XlaData.DotDimensionNumbers getDotDimensionNumbers() {
if (dotDimensionNumbersBuilder_ == null) {
return dotDimensionNumbers_ == null ? xla.XlaData.DotDimensionNumbers.getDefaultInstance() : dotDimensionNumbers_;
} else {
return dotDimensionNumbersBuilder_.getMessage();
}
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public Builder setDotDimensionNumbers(xla.XlaData.DotDimensionNumbers value) {
if (dotDimensionNumbersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dotDimensionNumbers_ = value;
onChanged();
} else {
dotDimensionNumbersBuilder_.setMessage(value);
}
return this;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public Builder setDotDimensionNumbers(
xla.XlaData.DotDimensionNumbers.Builder builderForValue) {
if (dotDimensionNumbersBuilder_ == null) {
dotDimensionNumbers_ = builderForValue.build();
onChanged();
} else {
dotDimensionNumbersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public Builder mergeDotDimensionNumbers(xla.XlaData.DotDimensionNumbers value) {
if (dotDimensionNumbersBuilder_ == null) {
if (dotDimensionNumbers_ != null) {
dotDimensionNumbers_ =
xla.XlaData.DotDimensionNumbers.newBuilder(dotDimensionNumbers_).mergeFrom(value).buildPartial();
} else {
dotDimensionNumbers_ = value;
}
onChanged();
} else {
dotDimensionNumbersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public Builder clearDotDimensionNumbers() {
if (dotDimensionNumbersBuilder_ == null) {
dotDimensionNumbers_ = null;
onChanged();
} else {
dotDimensionNumbers_ = null;
dotDimensionNumbersBuilder_ = null;
}
return this;
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public xla.XlaData.DotDimensionNumbers.Builder getDotDimensionNumbersBuilder() {
onChanged();
return getDotDimensionNumbersFieldBuilder().getBuilder();
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
public xla.XlaData.DotDimensionNumbersOrBuilder getDotDimensionNumbersOrBuilder() {
if (dotDimensionNumbersBuilder_ != null) {
return dotDimensionNumbersBuilder_.getMessageOrBuilder();
} else {
return dotDimensionNumbers_ == null ?
xla.XlaData.DotDimensionNumbers.getDefaultInstance() : dotDimensionNumbers_;
}
}
/**
*
* Describes the dimension numbers used for a dot operation
*
*
* .xla.DotDimensionNumbers dot_dimension_numbers = 30;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.DotDimensionNumbers, xla.XlaData.DotDimensionNumbers.Builder, xla.XlaData.DotDimensionNumbersOrBuilder>
getDotDimensionNumbersFieldBuilder() {
if (dotDimensionNumbersBuilder_ == null) {
dotDimensionNumbersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.DotDimensionNumbers, xla.XlaData.DotDimensionNumbers.Builder, xla.XlaData.DotDimensionNumbersOrBuilder>(
getDotDimensionNumbers(),
getParentForChildren(),
isClean());
dotDimensionNumbers_ = null;
}
return dotDimensionNumbersBuilder_;
}
private int fftType_ = 0;
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public int getFftTypeValue() {
return fftType_;
}
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public Builder setFftTypeValue(int value) {
fftType_ = value;
onChanged();
return this;
}
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public xla.XlaData.FftType getFftType() {
@SuppressWarnings("deprecation")
xla.XlaData.FftType result = xla.XlaData.FftType.valueOf(fftType_);
return result == null ? xla.XlaData.FftType.UNRECOGNIZED : result;
}
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public Builder setFftType(xla.XlaData.FftType value) {
if (value == null) {
throw new NullPointerException();
}
fftType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* FFT type (FFT, IFFT, etc).
*
*
* .xla.FftType fft_type = 31;
*/
public Builder clearFftType() {
fftType_ = 0;
onChanged();
return this;
}
private java.util.List fftLength_ = java.util.Collections.emptyList();
private void ensureFftLengthIsMutable() {
if (!((bitField0_ & 0x10000000) == 0x10000000)) {
fftLength_ = new java.util.ArrayList(fftLength_);
bitField0_ |= 0x10000000;
}
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public java.util.List
getFftLengthList() {
return java.util.Collections.unmodifiableList(fftLength_);
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public int getFftLengthCount() {
return fftLength_.size();
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public long getFftLength(int index) {
return fftLength_.get(index);
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public Builder setFftLength(
int index, long value) {
ensureFftLengthIsMutable();
fftLength_.set(index, value);
onChanged();
return this;
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public Builder addFftLength(long value) {
ensureFftLengthIsMutable();
fftLength_.add(value);
onChanged();
return this;
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public Builder addAllFftLength(
java.lang.Iterable values) {
ensureFftLengthIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fftLength_);
onChanged();
return this;
}
/**
*
* FFT length.
*
*
* repeated int64 fft_length = 32;
*/
public Builder clearFftLength() {
fftLength_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x10000000);
onChanged();
return this;
}
private xla.XlaData.GatherDimensionNumbers gatherDimensionNumbers_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.GatherDimensionNumbers, xla.XlaData.GatherDimensionNumbers.Builder, xla.XlaData.GatherDimensionNumbersOrBuilder> gatherDimensionNumbersBuilder_;
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public boolean hasGatherDimensionNumbers() {
return gatherDimensionNumbersBuilder_ != null || gatherDimensionNumbers_ != null;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public xla.XlaData.GatherDimensionNumbers getGatherDimensionNumbers() {
if (gatherDimensionNumbersBuilder_ == null) {
return gatherDimensionNumbers_ == null ? xla.XlaData.GatherDimensionNumbers.getDefaultInstance() : gatherDimensionNumbers_;
} else {
return gatherDimensionNumbersBuilder_.getMessage();
}
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public Builder setGatherDimensionNumbers(xla.XlaData.GatherDimensionNumbers value) {
if (gatherDimensionNumbersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
gatherDimensionNumbers_ = value;
onChanged();
} else {
gatherDimensionNumbersBuilder_.setMessage(value);
}
return this;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public Builder setGatherDimensionNumbers(
xla.XlaData.GatherDimensionNumbers.Builder builderForValue) {
if (gatherDimensionNumbersBuilder_ == null) {
gatherDimensionNumbers_ = builderForValue.build();
onChanged();
} else {
gatherDimensionNumbersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public Builder mergeGatherDimensionNumbers(xla.XlaData.GatherDimensionNumbers value) {
if (gatherDimensionNumbersBuilder_ == null) {
if (gatherDimensionNumbers_ != null) {
gatherDimensionNumbers_ =
xla.XlaData.GatherDimensionNumbers.newBuilder(gatherDimensionNumbers_).mergeFrom(value).buildPartial();
} else {
gatherDimensionNumbers_ = value;
}
onChanged();
} else {
gatherDimensionNumbersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public Builder clearGatherDimensionNumbers() {
if (gatherDimensionNumbersBuilder_ == null) {
gatherDimensionNumbers_ = null;
onChanged();
} else {
gatherDimensionNumbers_ = null;
gatherDimensionNumbersBuilder_ = null;
}
return this;
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public xla.XlaData.GatherDimensionNumbers.Builder getGatherDimensionNumbersBuilder() {
onChanged();
return getGatherDimensionNumbersFieldBuilder().getBuilder();
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
public xla.XlaData.GatherDimensionNumbersOrBuilder getGatherDimensionNumbersOrBuilder() {
if (gatherDimensionNumbersBuilder_ != null) {
return gatherDimensionNumbersBuilder_.getMessageOrBuilder();
} else {
return gatherDimensionNumbers_ == null ?
xla.XlaData.GatherDimensionNumbers.getDefaultInstance() : gatherDimensionNumbers_;
}
}
/**
*
* Gather dimension numbers.
*
*
* .xla.GatherDimensionNumbers gather_dimension_numbers = 33;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.GatherDimensionNumbers, xla.XlaData.GatherDimensionNumbers.Builder, xla.XlaData.GatherDimensionNumbersOrBuilder>
getGatherDimensionNumbersFieldBuilder() {
if (gatherDimensionNumbersBuilder_ == null) {
gatherDimensionNumbersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.GatherDimensionNumbers, xla.XlaData.GatherDimensionNumbers.Builder, xla.XlaData.GatherDimensionNumbersOrBuilder>(
getGatherDimensionNumbers(),
getParentForChildren(),
isClean());
gatherDimensionNumbers_ = null;
}
return gatherDimensionNumbersBuilder_;
}
private java.util.List gatherSliceSizes_ = java.util.Collections.emptyList();
private void ensureGatherSliceSizesIsMutable() {
if (!((bitField0_ & 0x40000000) == 0x40000000)) {
gatherSliceSizes_ = new java.util.ArrayList(gatherSliceSizes_);
bitField0_ |= 0x40000000;
}
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public java.util.List
getGatherSliceSizesList() {
return java.util.Collections.unmodifiableList(gatherSliceSizes_);
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public int getGatherSliceSizesCount() {
return gatherSliceSizes_.size();
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public long getGatherSliceSizes(int index) {
return gatherSliceSizes_.get(index);
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public Builder setGatherSliceSizes(
int index, long value) {
ensureGatherSliceSizesIsMutable();
gatherSliceSizes_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public Builder addGatherSliceSizes(long value) {
ensureGatherSliceSizesIsMutable();
gatherSliceSizes_.add(value);
onChanged();
return this;
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public Builder addAllGatherSliceSizes(
java.lang.Iterable values) {
ensureGatherSliceSizesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, gatherSliceSizes_);
onChanged();
return this;
}
/**
* repeated int64 gather_slice_sizes = 34;
*/
public Builder clearGatherSliceSizes() {
gatherSliceSizes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x40000000);
onChanged();
return this;
}
private java.lang.Object channelName_ = "";
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public java.lang.String getChannelName() {
java.lang.Object ref = channelName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
channelName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public com.google.protobuf.ByteString
getChannelNameBytes() {
java.lang.Object ref = channelName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
channelName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public Builder setChannelName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
channelName_ = value;
onChanged();
return this;
}
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public Builder clearChannelName() {
channelName_ = getDefaultInstance().getChannelName();
onChanged();
return this;
}
/**
*
* Compute Host.
*
*
* string channel_name = 41;
*/
public Builder setChannelNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
channelName_ = value;
onChanged();
return this;
}
private long costEstimateNs_ ;
/**
* int64 cost_estimate_ns = 42;
*/
public long getCostEstimateNs() {
return costEstimateNs_;
}
/**
* int64 cost_estimate_ns = 42;
*/
public Builder setCostEstimateNs(long value) {
costEstimateNs_ = value;
onChanged();
return this;
}
/**
* int64 cost_estimate_ns = 42;
*/
public Builder clearCostEstimateNs() {
costEstimateNs_ = 0L;
onChanged();
return this;
}
private long id_ ;
/**
*
* The id of this instruction.
*
*
* int64 id = 35;
*/
public long getId() {
return id_;
}
/**
*
* The id of this instruction.
*
*
* int64 id = 35;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
*
* The id of this instruction.
*
*
* int64 id = 35;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private java.util.List operandIds_ = java.util.Collections.emptyList();
private void ensureOperandIdsIsMutable() {
if (!((bitField1_ & 0x00000004) == 0x00000004)) {
operandIds_ = new java.util.ArrayList(operandIds_);
bitField1_ |= 0x00000004;
}
}
/**
* repeated int64 operand_ids = 36;
*/
public java.util.List
getOperandIdsList() {
return java.util.Collections.unmodifiableList(operandIds_);
}
/**
* repeated int64 operand_ids = 36;
*/
public int getOperandIdsCount() {
return operandIds_.size();
}
/**
* repeated int64 operand_ids = 36;
*/
public long getOperandIds(int index) {
return operandIds_.get(index);
}
/**
* repeated int64 operand_ids = 36;
*/
public Builder setOperandIds(
int index, long value) {
ensureOperandIdsIsMutable();
operandIds_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 operand_ids = 36;
*/
public Builder addOperandIds(long value) {
ensureOperandIdsIsMutable();
operandIds_.add(value);
onChanged();
return this;
}
/**
* repeated int64 operand_ids = 36;
*/
public Builder addAllOperandIds(
java.lang.Iterable values) {
ensureOperandIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, operandIds_);
onChanged();
return this;
}
/**
* repeated int64 operand_ids = 36;
*/
public Builder clearOperandIds() {
operandIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000004);
onChanged();
return this;
}
private java.util.List controlPredecessorIds_ = java.util.Collections.emptyList();
private void ensureControlPredecessorIdsIsMutable() {
if (!((bitField1_ & 0x00000008) == 0x00000008)) {
controlPredecessorIds_ = new java.util.ArrayList(controlPredecessorIds_);
bitField1_ |= 0x00000008;
}
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public java.util.List
getControlPredecessorIdsList() {
return java.util.Collections.unmodifiableList(controlPredecessorIds_);
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public int getControlPredecessorIdsCount() {
return controlPredecessorIds_.size();
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public long getControlPredecessorIds(int index) {
return controlPredecessorIds_.get(index);
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public Builder setControlPredecessorIds(
int index, long value) {
ensureControlPredecessorIdsIsMutable();
controlPredecessorIds_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public Builder addControlPredecessorIds(long value) {
ensureControlPredecessorIdsIsMutable();
controlPredecessorIds_.add(value);
onChanged();
return this;
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public Builder addAllControlPredecessorIds(
java.lang.Iterable values) {
ensureControlPredecessorIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, controlPredecessorIds_);
onChanged();
return this;
}
/**
* repeated int64 control_predecessor_ids = 37;
*/
public Builder clearControlPredecessorIds() {
controlPredecessorIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000008);
onChanged();
return this;
}
private java.util.List calledComputationIds_ = java.util.Collections.emptyList();
private void ensureCalledComputationIdsIsMutable() {
if (!((bitField1_ & 0x00000010) == 0x00000010)) {
calledComputationIds_ = new java.util.ArrayList(calledComputationIds_);
bitField1_ |= 0x00000010;
}
}
/**
* repeated int64 called_computation_ids = 38;
*/
public java.util.List
getCalledComputationIdsList() {
return java.util.Collections.unmodifiableList(calledComputationIds_);
}
/**
* repeated int64 called_computation_ids = 38;
*/
public int getCalledComputationIdsCount() {
return calledComputationIds_.size();
}
/**
* repeated int64 called_computation_ids = 38;
*/
public long getCalledComputationIds(int index) {
return calledComputationIds_.get(index);
}
/**
* repeated int64 called_computation_ids = 38;
*/
public Builder setCalledComputationIds(
int index, long value) {
ensureCalledComputationIdsIsMutable();
calledComputationIds_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 called_computation_ids = 38;
*/
public Builder addCalledComputationIds(long value) {
ensureCalledComputationIdsIsMutable();
calledComputationIds_.add(value);
onChanged();
return this;
}
/**
* repeated int64 called_computation_ids = 38;
*/
public Builder addAllCalledComputationIds(
java.lang.Iterable values) {
ensureCalledComputationIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, calledComputationIds_);
onChanged();
return this;
}
/**
* repeated int64 called_computation_ids = 38;
*/
public Builder clearCalledComputationIds() {
calledComputationIds_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000010);
onChanged();
return this;
}
private xla.XlaData.OpSharding sharding_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpSharding, xla.XlaData.OpSharding.Builder, xla.XlaData.OpShardingOrBuilder> shardingBuilder_;
/**
* .xla.OpSharding sharding = 40;
*/
public boolean hasSharding() {
return shardingBuilder_ != null || sharding_ != null;
}
/**
* .xla.OpSharding sharding = 40;
*/
public xla.XlaData.OpSharding getSharding() {
if (shardingBuilder_ == null) {
return sharding_ == null ? xla.XlaData.OpSharding.getDefaultInstance() : sharding_;
} else {
return shardingBuilder_.getMessage();
}
}
/**
* .xla.OpSharding sharding = 40;
*/
public Builder setSharding(xla.XlaData.OpSharding value) {
if (shardingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sharding_ = value;
onChanged();
} else {
shardingBuilder_.setMessage(value);
}
return this;
}
/**
* .xla.OpSharding sharding = 40;
*/
public Builder setSharding(
xla.XlaData.OpSharding.Builder builderForValue) {
if (shardingBuilder_ == null) {
sharding_ = builderForValue.build();
onChanged();
} else {
shardingBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .xla.OpSharding sharding = 40;
*/
public Builder mergeSharding(xla.XlaData.OpSharding value) {
if (shardingBuilder_ == null) {
if (sharding_ != null) {
sharding_ =
xla.XlaData.OpSharding.newBuilder(sharding_).mergeFrom(value).buildPartial();
} else {
sharding_ = value;
}
onChanged();
} else {
shardingBuilder_.mergeFrom(value);
}
return this;
}
/**
* .xla.OpSharding sharding = 40;
*/
public Builder clearSharding() {
if (shardingBuilder_ == null) {
sharding_ = null;
onChanged();
} else {
sharding_ = null;
shardingBuilder_ = null;
}
return this;
}
/**
* .xla.OpSharding sharding = 40;
*/
public xla.XlaData.OpSharding.Builder getShardingBuilder() {
onChanged();
return getShardingFieldBuilder().getBuilder();
}
/**
* .xla.OpSharding sharding = 40;
*/
public xla.XlaData.OpShardingOrBuilder getShardingOrBuilder() {
if (shardingBuilder_ != null) {
return shardingBuilder_.getMessageOrBuilder();
} else {
return sharding_ == null ?
xla.XlaData.OpSharding.getDefaultInstance() : sharding_;
}
}
/**
* .xla.OpSharding sharding = 40;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpSharding, xla.XlaData.OpSharding.Builder, xla.XlaData.OpShardingOrBuilder>
getShardingFieldBuilder() {
if (shardingBuilder_ == null) {
shardingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.OpSharding, xla.XlaData.OpSharding.Builder, xla.XlaData.OpShardingOrBuilder>(
getSharding(),
getParentForChildren(),
isClean());
sharding_ = null;
}
return shardingBuilder_;
}
private java.lang.Object backendConfig_ = "";
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public java.lang.String getBackendConfig() {
java.lang.Object ref = backendConfig_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
backendConfig_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public com.google.protobuf.ByteString
getBackendConfigBytes() {
java.lang.Object ref = backendConfig_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
backendConfig_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public Builder setBackendConfig(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
backendConfig_ = value;
onChanged();
return this;
}
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public Builder clearBackendConfig() {
backendConfig_ = getDefaultInstance().getBackendConfig();
onChanged();
return this;
}
/**
*
* Backend configuration for the instruction. Has backend-specific meaning.
*
*
* string backend_config = 43;
*/
public Builder setBackendConfigBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
backendConfig_ = value;
onChanged();
return this;
}
private java.util.List replicaGroups_ =
java.util.Collections.emptyList();
private void ensureReplicaGroupsIsMutable() {
if (!((bitField1_ & 0x00000080) == 0x00000080)) {
replicaGroups_ = new java.util.ArrayList(replicaGroups_);
bitField1_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.ReplicaGroup, xla.XlaData.ReplicaGroup.Builder, xla.XlaData.ReplicaGroupOrBuilder> replicaGroupsBuilder_;
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public java.util.List getReplicaGroupsList() {
if (replicaGroupsBuilder_ == null) {
return java.util.Collections.unmodifiableList(replicaGroups_);
} else {
return replicaGroupsBuilder_.getMessageList();
}
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public int getReplicaGroupsCount() {
if (replicaGroupsBuilder_ == null) {
return replicaGroups_.size();
} else {
return replicaGroupsBuilder_.getCount();
}
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroup getReplicaGroups(int index) {
if (replicaGroupsBuilder_ == null) {
return replicaGroups_.get(index);
} else {
return replicaGroupsBuilder_.getMessage(index);
}
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder setReplicaGroups(
int index, xla.XlaData.ReplicaGroup value) {
if (replicaGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReplicaGroupsIsMutable();
replicaGroups_.set(index, value);
onChanged();
} else {
replicaGroupsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder setReplicaGroups(
int index, xla.XlaData.ReplicaGroup.Builder builderForValue) {
if (replicaGroupsBuilder_ == null) {
ensureReplicaGroupsIsMutable();
replicaGroups_.set(index, builderForValue.build());
onChanged();
} else {
replicaGroupsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder addReplicaGroups(xla.XlaData.ReplicaGroup value) {
if (replicaGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReplicaGroupsIsMutable();
replicaGroups_.add(value);
onChanged();
} else {
replicaGroupsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder addReplicaGroups(
int index, xla.XlaData.ReplicaGroup value) {
if (replicaGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReplicaGroupsIsMutable();
replicaGroups_.add(index, value);
onChanged();
} else {
replicaGroupsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder addReplicaGroups(
xla.XlaData.ReplicaGroup.Builder builderForValue) {
if (replicaGroupsBuilder_ == null) {
ensureReplicaGroupsIsMutable();
replicaGroups_.add(builderForValue.build());
onChanged();
} else {
replicaGroupsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder addReplicaGroups(
int index, xla.XlaData.ReplicaGroup.Builder builderForValue) {
if (replicaGroupsBuilder_ == null) {
ensureReplicaGroupsIsMutable();
replicaGroups_.add(index, builderForValue.build());
onChanged();
} else {
replicaGroupsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder addAllReplicaGroups(
java.lang.Iterable values) {
if (replicaGroupsBuilder_ == null) {
ensureReplicaGroupsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, replicaGroups_);
onChanged();
} else {
replicaGroupsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder clearReplicaGroups() {
if (replicaGroupsBuilder_ == null) {
replicaGroups_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00000080);
onChanged();
} else {
replicaGroupsBuilder_.clear();
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public Builder removeReplicaGroups(int index) {
if (replicaGroupsBuilder_ == null) {
ensureReplicaGroupsIsMutable();
replicaGroups_.remove(index);
onChanged();
} else {
replicaGroupsBuilder_.remove(index);
}
return this;
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroup.Builder getReplicaGroupsBuilder(
int index) {
return getReplicaGroupsFieldBuilder().getBuilder(index);
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroupOrBuilder getReplicaGroupsOrBuilder(
int index) {
if (replicaGroupsBuilder_ == null) {
return replicaGroups_.get(index); } else {
return replicaGroupsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public java.util.List
getReplicaGroupsOrBuilderList() {
if (replicaGroupsBuilder_ != null) {
return replicaGroupsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(replicaGroups_);
}
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroup.Builder addReplicaGroupsBuilder() {
return getReplicaGroupsFieldBuilder().addBuilder(
xla.XlaData.ReplicaGroup.getDefaultInstance());
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public xla.XlaData.ReplicaGroup.Builder addReplicaGroupsBuilder(
int index) {
return getReplicaGroupsFieldBuilder().addBuilder(
index, xla.XlaData.ReplicaGroup.getDefaultInstance());
}
/**
*
* Cross replica op fields.
*
*
* repeated .xla.ReplicaGroup replica_groups = 49;
*/
public java.util.List
getReplicaGroupsBuilderList() {
return getReplicaGroupsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.ReplicaGroup, xla.XlaData.ReplicaGroup.Builder, xla.XlaData.ReplicaGroupOrBuilder>
getReplicaGroupsFieldBuilder() {
if (replicaGroupsBuilder_ == null) {
replicaGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.ReplicaGroup, xla.XlaData.ReplicaGroup.Builder, xla.XlaData.ReplicaGroupOrBuilder>(
replicaGroups_,
((bitField1_ & 0x00000080) == 0x00000080),
getParentForChildren(),
isClean());
replicaGroups_ = null;
}
return replicaGroupsBuilder_;
}
private long allReduceId_ ;
/**
* int64 all_reduce_id = 45;
*/
public long getAllReduceId() {
return allReduceId_;
}
/**
* int64 all_reduce_id = 45;
*/
public Builder setAllReduceId(long value) {
allReduceId_ = value;
onChanged();
return this;
}
/**
* int64 all_reduce_id = 45;
*/
public Builder clearAllReduceId() {
allReduceId_ = 0L;
onChanged();
return this;
}
private java.lang.Object crossReplicaSumBarrier_ = "";
/**
* string cross_replica_sum_barrier = 46;
*/
public java.lang.String getCrossReplicaSumBarrier() {
java.lang.Object ref = crossReplicaSumBarrier_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
crossReplicaSumBarrier_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string cross_replica_sum_barrier = 46;
*/
public com.google.protobuf.ByteString
getCrossReplicaSumBarrierBytes() {
java.lang.Object ref = crossReplicaSumBarrier_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
crossReplicaSumBarrier_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string cross_replica_sum_barrier = 46;
*/
public Builder setCrossReplicaSumBarrier(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
crossReplicaSumBarrier_ = value;
onChanged();
return this;
}
/**
* string cross_replica_sum_barrier = 46;
*/
public Builder clearCrossReplicaSumBarrier() {
crossReplicaSumBarrier_ = getDefaultInstance().getCrossReplicaSumBarrier();
onChanged();
return this;
}
/**
* string cross_replica_sum_barrier = 46;
*/
public Builder setCrossReplicaSumBarrierBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
crossReplicaSumBarrier_ = value;
onChanged();
return this;
}
private boolean isHostTransfer_ ;
/**
*
* Whether this Send/Recv instruction transfers data to/from the host. Only
* present for Send and Recv instructions and their SendDone and RecvDone
* partners.
*
*
* bool is_host_transfer = 47;
*/
public boolean getIsHostTransfer() {
return isHostTransfer_;
}
/**
*
* Whether this Send/Recv instruction transfers data to/from the host. Only
* present for Send and Recv instructions and their SendDone and RecvDone
* partners.
*
*
* bool is_host_transfer = 47;
*/
public Builder setIsHostTransfer(boolean value) {
isHostTransfer_ = value;
onChanged();
return this;
}
/**
*
* Whether this Send/Recv instruction transfers data to/from the host. Only
* present for Send and Recv instructions and their SendDone and RecvDone
* partners.
*
*
* bool is_host_transfer = 47;
*/
public Builder clearIsHostTransfer() {
isHostTransfer_ = false;
onChanged();
return this;
}
private xla.XlaData.ScatterDimensionNumbers scatterDimensionNumbers_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ScatterDimensionNumbers, xla.XlaData.ScatterDimensionNumbers.Builder, xla.XlaData.ScatterDimensionNumbersOrBuilder> scatterDimensionNumbersBuilder_;
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public boolean hasScatterDimensionNumbers() {
return scatterDimensionNumbersBuilder_ != null || scatterDimensionNumbers_ != null;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public xla.XlaData.ScatterDimensionNumbers getScatterDimensionNumbers() {
if (scatterDimensionNumbersBuilder_ == null) {
return scatterDimensionNumbers_ == null ? xla.XlaData.ScatterDimensionNumbers.getDefaultInstance() : scatterDimensionNumbers_;
} else {
return scatterDimensionNumbersBuilder_.getMessage();
}
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public Builder setScatterDimensionNumbers(xla.XlaData.ScatterDimensionNumbers value) {
if (scatterDimensionNumbersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scatterDimensionNumbers_ = value;
onChanged();
} else {
scatterDimensionNumbersBuilder_.setMessage(value);
}
return this;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public Builder setScatterDimensionNumbers(
xla.XlaData.ScatterDimensionNumbers.Builder builderForValue) {
if (scatterDimensionNumbersBuilder_ == null) {
scatterDimensionNumbers_ = builderForValue.build();
onChanged();
} else {
scatterDimensionNumbersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public Builder mergeScatterDimensionNumbers(xla.XlaData.ScatterDimensionNumbers value) {
if (scatterDimensionNumbersBuilder_ == null) {
if (scatterDimensionNumbers_ != null) {
scatterDimensionNumbers_ =
xla.XlaData.ScatterDimensionNumbers.newBuilder(scatterDimensionNumbers_).mergeFrom(value).buildPartial();
} else {
scatterDimensionNumbers_ = value;
}
onChanged();
} else {
scatterDimensionNumbersBuilder_.mergeFrom(value);
}
return this;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public Builder clearScatterDimensionNumbers() {
if (scatterDimensionNumbersBuilder_ == null) {
scatterDimensionNumbers_ = null;
onChanged();
} else {
scatterDimensionNumbers_ = null;
scatterDimensionNumbersBuilder_ = null;
}
return this;
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public xla.XlaData.ScatterDimensionNumbers.Builder getScatterDimensionNumbersBuilder() {
onChanged();
return getScatterDimensionNumbersFieldBuilder().getBuilder();
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
public xla.XlaData.ScatterDimensionNumbersOrBuilder getScatterDimensionNumbersOrBuilder() {
if (scatterDimensionNumbersBuilder_ != null) {
return scatterDimensionNumbersBuilder_.getMessageOrBuilder();
} else {
return scatterDimensionNumbers_ == null ?
xla.XlaData.ScatterDimensionNumbers.getDefaultInstance() : scatterDimensionNumbers_;
}
}
/**
* .xla.ScatterDimensionNumbers scatter_dimension_numbers = 48;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ScatterDimensionNumbers, xla.XlaData.ScatterDimensionNumbers.Builder, xla.XlaData.ScatterDimensionNumbersOrBuilder>
getScatterDimensionNumbersFieldBuilder() {
if (scatterDimensionNumbersBuilder_ == null) {
scatterDimensionNumbersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ScatterDimensionNumbers, xla.XlaData.ScatterDimensionNumbers.Builder, xla.XlaData.ScatterDimensionNumbersOrBuilder>(
getScatterDimensionNumbers(),
getParentForChildren(),
isClean());
scatterDimensionNumbers_ = null;
}
return scatterDimensionNumbersBuilder_;
}
private xla.XlaData.PrecisionConfig precisionConfig_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PrecisionConfig, xla.XlaData.PrecisionConfig.Builder, xla.XlaData.PrecisionConfigOrBuilder> precisionConfigBuilder_;
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public boolean hasPrecisionConfig() {
return precisionConfigBuilder_ != null || precisionConfig_ != null;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public xla.XlaData.PrecisionConfig getPrecisionConfig() {
if (precisionConfigBuilder_ == null) {
return precisionConfig_ == null ? xla.XlaData.PrecisionConfig.getDefaultInstance() : precisionConfig_;
} else {
return precisionConfigBuilder_.getMessage();
}
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public Builder setPrecisionConfig(xla.XlaData.PrecisionConfig value) {
if (precisionConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
precisionConfig_ = value;
onChanged();
} else {
precisionConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public Builder setPrecisionConfig(
xla.XlaData.PrecisionConfig.Builder builderForValue) {
if (precisionConfigBuilder_ == null) {
precisionConfig_ = builderForValue.build();
onChanged();
} else {
precisionConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public Builder mergePrecisionConfig(xla.XlaData.PrecisionConfig value) {
if (precisionConfigBuilder_ == null) {
if (precisionConfig_ != null) {
precisionConfig_ =
xla.XlaData.PrecisionConfig.newBuilder(precisionConfig_).mergeFrom(value).buildPartial();
} else {
precisionConfig_ = value;
}
onChanged();
} else {
precisionConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public Builder clearPrecisionConfig() {
if (precisionConfigBuilder_ == null) {
precisionConfig_ = null;
onChanged();
} else {
precisionConfig_ = null;
precisionConfigBuilder_ = null;
}
return this;
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public xla.XlaData.PrecisionConfig.Builder getPrecisionConfigBuilder() {
onChanged();
return getPrecisionConfigFieldBuilder().getBuilder();
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
public xla.XlaData.PrecisionConfigOrBuilder getPrecisionConfigOrBuilder() {
if (precisionConfigBuilder_ != null) {
return precisionConfigBuilder_.getMessageOrBuilder();
} else {
return precisionConfig_ == null ?
xla.XlaData.PrecisionConfig.getDefaultInstance() : precisionConfig_;
}
}
/**
*
* Precision configuration for the instruction. Has backend-specific meaning.
*
*
* .xla.PrecisionConfig precision_config = 51;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PrecisionConfig, xla.XlaData.PrecisionConfig.Builder, xla.XlaData.PrecisionConfigOrBuilder>
getPrecisionConfigFieldBuilder() {
if (precisionConfigBuilder_ == null) {
precisionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.PrecisionConfig, xla.XlaData.PrecisionConfig.Builder, xla.XlaData.PrecisionConfigOrBuilder>(
getPrecisionConfig(),
getParentForChildren(),
isClean());
precisionConfig_ = null;
}
return precisionConfigBuilder_;
}
private java.util.List sourceTargetPairs_ =
java.util.Collections.emptyList();
private void ensureSourceTargetPairsIsMutable() {
if (!((bitField1_ & 0x00002000) == 0x00002000)) {
sourceTargetPairs_ = new java.util.ArrayList(sourceTargetPairs_);
bitField1_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.SourceTarget, xla.XlaData.SourceTarget.Builder, xla.XlaData.SourceTargetOrBuilder> sourceTargetPairsBuilder_;
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public java.util.List getSourceTargetPairsList() {
if (sourceTargetPairsBuilder_ == null) {
return java.util.Collections.unmodifiableList(sourceTargetPairs_);
} else {
return sourceTargetPairsBuilder_.getMessageList();
}
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public int getSourceTargetPairsCount() {
if (sourceTargetPairsBuilder_ == null) {
return sourceTargetPairs_.size();
} else {
return sourceTargetPairsBuilder_.getCount();
}
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTarget getSourceTargetPairs(int index) {
if (sourceTargetPairsBuilder_ == null) {
return sourceTargetPairs_.get(index);
} else {
return sourceTargetPairsBuilder_.getMessage(index);
}
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder setSourceTargetPairs(
int index, xla.XlaData.SourceTarget value) {
if (sourceTargetPairsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.set(index, value);
onChanged();
} else {
sourceTargetPairsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder setSourceTargetPairs(
int index, xla.XlaData.SourceTarget.Builder builderForValue) {
if (sourceTargetPairsBuilder_ == null) {
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.set(index, builderForValue.build());
onChanged();
} else {
sourceTargetPairsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder addSourceTargetPairs(xla.XlaData.SourceTarget value) {
if (sourceTargetPairsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.add(value);
onChanged();
} else {
sourceTargetPairsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder addSourceTargetPairs(
int index, xla.XlaData.SourceTarget value) {
if (sourceTargetPairsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.add(index, value);
onChanged();
} else {
sourceTargetPairsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder addSourceTargetPairs(
xla.XlaData.SourceTarget.Builder builderForValue) {
if (sourceTargetPairsBuilder_ == null) {
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.add(builderForValue.build());
onChanged();
} else {
sourceTargetPairsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder addSourceTargetPairs(
int index, xla.XlaData.SourceTarget.Builder builderForValue) {
if (sourceTargetPairsBuilder_ == null) {
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.add(index, builderForValue.build());
onChanged();
} else {
sourceTargetPairsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder addAllSourceTargetPairs(
java.lang.Iterable values) {
if (sourceTargetPairsBuilder_ == null) {
ensureSourceTargetPairsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sourceTargetPairs_);
onChanged();
} else {
sourceTargetPairsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder clearSourceTargetPairs() {
if (sourceTargetPairsBuilder_ == null) {
sourceTargetPairs_ = java.util.Collections.emptyList();
bitField1_ = (bitField1_ & ~0x00002000);
onChanged();
} else {
sourceTargetPairsBuilder_.clear();
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public Builder removeSourceTargetPairs(int index) {
if (sourceTargetPairsBuilder_ == null) {
ensureSourceTargetPairsIsMutable();
sourceTargetPairs_.remove(index);
onChanged();
} else {
sourceTargetPairsBuilder_.remove(index);
}
return this;
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTarget.Builder getSourceTargetPairsBuilder(
int index) {
return getSourceTargetPairsFieldBuilder().getBuilder(index);
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTargetOrBuilder getSourceTargetPairsOrBuilder(
int index) {
if (sourceTargetPairsBuilder_ == null) {
return sourceTargetPairs_.get(index); } else {
return sourceTargetPairsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public java.util.List
getSourceTargetPairsOrBuilderList() {
if (sourceTargetPairsBuilder_ != null) {
return sourceTargetPairsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sourceTargetPairs_);
}
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTarget.Builder addSourceTargetPairsBuilder() {
return getSourceTargetPairsFieldBuilder().addBuilder(
xla.XlaData.SourceTarget.getDefaultInstance());
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public xla.XlaData.SourceTarget.Builder addSourceTargetPairsBuilder(
int index) {
return getSourceTargetPairsFieldBuilder().addBuilder(
index, xla.XlaData.SourceTarget.getDefaultInstance());
}
/**
*
* Collective permute field.
*
*
* repeated .xla.SourceTarget source_target_pairs = 52;
*/
public java.util.List
getSourceTargetPairsBuilderList() {
return getSourceTargetPairsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.SourceTarget, xla.XlaData.SourceTarget.Builder, xla.XlaData.SourceTargetOrBuilder>
getSourceTargetPairsFieldBuilder() {
if (sourceTargetPairsBuilder_ == null) {
sourceTargetPairsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.XlaData.SourceTarget, xla.XlaData.SourceTarget.Builder, xla.XlaData.SourceTargetOrBuilder>(
sourceTargetPairs_,
((bitField1_ & 0x00002000) == 0x00002000),
getParentForChildren(),
isClean());
sourceTargetPairs_ = null;
}
return sourceTargetPairsBuilder_;
}
@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:xla.HloInstructionProto)
}
// @@protoc_insertion_point(class_scope:xla.HloInstructionProto)
private static final xla.Hlo.HloInstructionProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloInstructionProto();
}
public static xla.Hlo.HloInstructionProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HloInstructionProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HloInstructionProto(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 xla.Hlo.HloInstructionProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HloComputationProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloComputationProto)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
java.util.List
getInstructionsList();
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
xla.Hlo.HloInstructionProto getInstructions(int index);
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
int getInstructionsCount();
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
java.util.List
getInstructionsOrBuilderList();
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
xla.Hlo.HloInstructionProtoOrBuilder getInstructionsOrBuilder(
int index);
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
boolean hasProgramShape();
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
xla.XlaData.ProgramShape getProgramShape();
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder();
/**
*
* The id of this computation.
*
*
* int64 id = 5;
*/
long getId();
/**
*
* The id of the root of the computation.
*
*
* int64 root_id = 6;
*/
long getRootId();
}
/**
*
* Serialization of HloComputation.
*
*
* Protobuf type {@code xla.HloComputationProto}
*/
public static final class HloComputationProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloComputationProto)
HloComputationProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use HloComputationProto.newBuilder() to construct.
private HloComputationProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HloComputationProto() {
name_ = "";
instructions_ = java.util.Collections.emptyList();
id_ = 0L;
rootId_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HloComputationProto(
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 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
instructions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
instructions_.add(
input.readMessage(xla.Hlo.HloInstructionProto.parser(), extensionRegistry));
break;
}
case 34: {
xla.XlaData.ProgramShape.Builder subBuilder = null;
if (programShape_ != null) {
subBuilder = programShape_.toBuilder();
}
programShape_ = input.readMessage(xla.XlaData.ProgramShape.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(programShape_);
programShape_ = subBuilder.buildPartial();
}
break;
}
case 40: {
id_ = input.readInt64();
break;
}
case 48: {
rootId_ = input.readInt64();
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)) {
instructions_ = java.util.Collections.unmodifiableList(instructions_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloComputationProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloComputationProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloComputationProto.class, xla.Hlo.HloComputationProto.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* 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;
}
}
/**
* 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 INSTRUCTIONS_FIELD_NUMBER = 2;
private java.util.List instructions_;
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public java.util.List getInstructionsList() {
return instructions_;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public java.util.List
getInstructionsOrBuilderList() {
return instructions_;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public int getInstructionsCount() {
return instructions_.size();
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProto getInstructions(int index) {
return instructions_.get(index);
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProtoOrBuilder getInstructionsOrBuilder(
int index) {
return instructions_.get(index);
}
public static final int PROGRAM_SHAPE_FIELD_NUMBER = 4;
private xla.XlaData.ProgramShape programShape_;
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public boolean hasProgramShape() {
return programShape_ != null;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape getProgramShape() {
return programShape_ == null ? xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder() {
return getProgramShape();
}
public static final int ID_FIELD_NUMBER = 5;
private long id_;
/**
*
* The id of this computation.
*
*
* int64 id = 5;
*/
public long getId() {
return id_;
}
public static final int ROOT_ID_FIELD_NUMBER = 6;
private long rootId_;
/**
*
* The id of the root of the computation.
*
*
* int64 root_id = 6;
*/
public long getRootId() {
return rootId_;
}
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_);
}
for (int i = 0; i < instructions_.size(); i++) {
output.writeMessage(2, instructions_.get(i));
}
if (programShape_ != null) {
output.writeMessage(4, getProgramShape());
}
if (id_ != 0L) {
output.writeInt64(5, id_);
}
if (rootId_ != 0L) {
output.writeInt64(6, rootId_);
}
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_);
}
for (int i = 0; i < instructions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, instructions_.get(i));
}
if (programShape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getProgramShape());
}
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, id_);
}
if (rootId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, rootId_);
}
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 xla.Hlo.HloComputationProto)) {
return super.equals(obj);
}
xla.Hlo.HloComputationProto other = (xla.Hlo.HloComputationProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getInstructionsList()
.equals(other.getInstructionsList());
result = result && (hasProgramShape() == other.hasProgramShape());
if (hasProgramShape()) {
result = result && getProgramShape()
.equals(other.getProgramShape());
}
result = result && (getId()
== other.getId());
result = result && (getRootId()
== other.getRootId());
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();
if (getInstructionsCount() > 0) {
hash = (37 * hash) + INSTRUCTIONS_FIELD_NUMBER;
hash = (53 * hash) + getInstructionsList().hashCode();
}
if (hasProgramShape()) {
hash = (37 * hash) + PROGRAM_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getProgramShape().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + ROOT_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRootId());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloComputationProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloComputationProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloComputationProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloComputationProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloComputationProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloComputationProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloComputationProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloComputationProto 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 xla.Hlo.HloComputationProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloComputationProto 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 xla.Hlo.HloComputationProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloComputationProto 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(xla.Hlo.HloComputationProto 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;
}
/**
*
* Serialization of HloComputation.
*
*
* Protobuf type {@code xla.HloComputationProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloComputationProto)
xla.Hlo.HloComputationProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloComputationProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloComputationProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloComputationProto.class, xla.Hlo.HloComputationProto.Builder.class);
}
// Construct using xla.Hlo.HloComputationProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getInstructionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
if (instructionsBuilder_ == null) {
instructions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
instructionsBuilder_.clear();
}
if (programShapeBuilder_ == null) {
programShape_ = null;
} else {
programShape_ = null;
programShapeBuilder_ = null;
}
id_ = 0L;
rootId_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloComputationProto_descriptor;
}
@java.lang.Override
public xla.Hlo.HloComputationProto getDefaultInstanceForType() {
return xla.Hlo.HloComputationProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloComputationProto build() {
xla.Hlo.HloComputationProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloComputationProto buildPartial() {
xla.Hlo.HloComputationProto result = new xla.Hlo.HloComputationProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
if (instructionsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
instructions_ = java.util.Collections.unmodifiableList(instructions_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.instructions_ = instructions_;
} else {
result.instructions_ = instructionsBuilder_.build();
}
if (programShapeBuilder_ == null) {
result.programShape_ = programShape_;
} else {
result.programShape_ = programShapeBuilder_.build();
}
result.id_ = id_;
result.rootId_ = rootId_;
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 xla.Hlo.HloComputationProto) {
return mergeFrom((xla.Hlo.HloComputationProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloComputationProto other) {
if (other == xla.Hlo.HloComputationProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (instructionsBuilder_ == null) {
if (!other.instructions_.isEmpty()) {
if (instructions_.isEmpty()) {
instructions_ = other.instructions_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureInstructionsIsMutable();
instructions_.addAll(other.instructions_);
}
onChanged();
}
} else {
if (!other.instructions_.isEmpty()) {
if (instructionsBuilder_.isEmpty()) {
instructionsBuilder_.dispose();
instructionsBuilder_ = null;
instructions_ = other.instructions_;
bitField0_ = (bitField0_ & ~0x00000002);
instructionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getInstructionsFieldBuilder() : null;
} else {
instructionsBuilder_.addAllMessages(other.instructions_);
}
}
}
if (other.hasProgramShape()) {
mergeProgramShape(other.getProgramShape());
}
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.getRootId() != 0L) {
setRootId(other.getRootId());
}
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 {
xla.Hlo.HloComputationProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloComputationProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* 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 java.util.List instructions_ =
java.util.Collections.emptyList();
private void ensureInstructionsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
instructions_ = new java.util.ArrayList(instructions_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto, xla.Hlo.HloInstructionProto.Builder, xla.Hlo.HloInstructionProtoOrBuilder> instructionsBuilder_;
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public java.util.List getInstructionsList() {
if (instructionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(instructions_);
} else {
return instructionsBuilder_.getMessageList();
}
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public int getInstructionsCount() {
if (instructionsBuilder_ == null) {
return instructions_.size();
} else {
return instructionsBuilder_.getCount();
}
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProto getInstructions(int index) {
if (instructionsBuilder_ == null) {
return instructions_.get(index);
} else {
return instructionsBuilder_.getMessage(index);
}
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder setInstructions(
int index, xla.Hlo.HloInstructionProto value) {
if (instructionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstructionsIsMutable();
instructions_.set(index, value);
onChanged();
} else {
instructionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder setInstructions(
int index, xla.Hlo.HloInstructionProto.Builder builderForValue) {
if (instructionsBuilder_ == null) {
ensureInstructionsIsMutable();
instructions_.set(index, builderForValue.build());
onChanged();
} else {
instructionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder addInstructions(xla.Hlo.HloInstructionProto value) {
if (instructionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstructionsIsMutable();
instructions_.add(value);
onChanged();
} else {
instructionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder addInstructions(
int index, xla.Hlo.HloInstructionProto value) {
if (instructionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstructionsIsMutable();
instructions_.add(index, value);
onChanged();
} else {
instructionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder addInstructions(
xla.Hlo.HloInstructionProto.Builder builderForValue) {
if (instructionsBuilder_ == null) {
ensureInstructionsIsMutable();
instructions_.add(builderForValue.build());
onChanged();
} else {
instructionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder addInstructions(
int index, xla.Hlo.HloInstructionProto.Builder builderForValue) {
if (instructionsBuilder_ == null) {
ensureInstructionsIsMutable();
instructions_.add(index, builderForValue.build());
onChanged();
} else {
instructionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder addAllInstructions(
java.lang.Iterable values) {
if (instructionsBuilder_ == null) {
ensureInstructionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, instructions_);
onChanged();
} else {
instructionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder clearInstructions() {
if (instructionsBuilder_ == null) {
instructions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
instructionsBuilder_.clear();
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public Builder removeInstructions(int index) {
if (instructionsBuilder_ == null) {
ensureInstructionsIsMutable();
instructions_.remove(index);
onChanged();
} else {
instructionsBuilder_.remove(index);
}
return this;
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProto.Builder getInstructionsBuilder(
int index) {
return getInstructionsFieldBuilder().getBuilder(index);
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProtoOrBuilder getInstructionsOrBuilder(
int index) {
if (instructionsBuilder_ == null) {
return instructions_.get(index); } else {
return instructionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public java.util.List
getInstructionsOrBuilderList() {
if (instructionsBuilder_ != null) {
return instructionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(instructions_);
}
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProto.Builder addInstructionsBuilder() {
return getInstructionsFieldBuilder().addBuilder(
xla.Hlo.HloInstructionProto.getDefaultInstance());
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public xla.Hlo.HloInstructionProto.Builder addInstructionsBuilder(
int index) {
return getInstructionsFieldBuilder().addBuilder(
index, xla.Hlo.HloInstructionProto.getDefaultInstance());
}
/**
*
* The array of instructions is always in a valid dependency order, where
* operands appear before their users.
*
*
* repeated .xla.HloInstructionProto instructions = 2;
*/
public java.util.List
getInstructionsBuilderList() {
return getInstructionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto, xla.Hlo.HloInstructionProto.Builder, xla.Hlo.HloInstructionProtoOrBuilder>
getInstructionsFieldBuilder() {
if (instructionsBuilder_ == null) {
instructionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloInstructionProto, xla.Hlo.HloInstructionProto.Builder, xla.Hlo.HloInstructionProtoOrBuilder>(
instructions_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
instructions_ = null;
}
return instructionsBuilder_;
}
private xla.XlaData.ProgramShape programShape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder> programShapeBuilder_;
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public boolean hasProgramShape() {
return programShapeBuilder_ != null || programShape_ != null;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape getProgramShape() {
if (programShapeBuilder_ == null) {
return programShape_ == null ? xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
} else {
return programShapeBuilder_.getMessage();
}
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder setProgramShape(xla.XlaData.ProgramShape value) {
if (programShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
programShape_ = value;
onChanged();
} else {
programShapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder setProgramShape(
xla.XlaData.ProgramShape.Builder builderForValue) {
if (programShapeBuilder_ == null) {
programShape_ = builderForValue.build();
onChanged();
} else {
programShapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder mergeProgramShape(xla.XlaData.ProgramShape value) {
if (programShapeBuilder_ == null) {
if (programShape_ != null) {
programShape_ =
xla.XlaData.ProgramShape.newBuilder(programShape_).mergeFrom(value).buildPartial();
} else {
programShape_ = value;
}
onChanged();
} else {
programShapeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder clearProgramShape() {
if (programShapeBuilder_ == null) {
programShape_ = null;
onChanged();
} else {
programShape_ = null;
programShapeBuilder_ = null;
}
return this;
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape.Builder getProgramShapeBuilder() {
onChanged();
return getProgramShapeFieldBuilder().getBuilder();
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder() {
if (programShapeBuilder_ != null) {
return programShapeBuilder_.getMessageOrBuilder();
} else {
return programShape_ == null ?
xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
}
}
/**
*
* The program shape (with layout) of this computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder>
getProgramShapeFieldBuilder() {
if (programShapeBuilder_ == null) {
programShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder>(
getProgramShape(),
getParentForChildren(),
isClean());
programShape_ = null;
}
return programShapeBuilder_;
}
private long id_ ;
/**
*
* The id of this computation.
*
*
* int64 id = 5;
*/
public long getId() {
return id_;
}
/**
*
* The id of this computation.
*
*
* int64 id = 5;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
*
* The id of this computation.
*
*
* int64 id = 5;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private long rootId_ ;
/**
*
* The id of the root of the computation.
*
*
* int64 root_id = 6;
*/
public long getRootId() {
return rootId_;
}
/**
*
* The id of the root of the computation.
*
*
* int64 root_id = 6;
*/
public Builder setRootId(long value) {
rootId_ = value;
onChanged();
return this;
}
/**
*
* The id of the root of the computation.
*
*
* int64 root_id = 6;
*/
public Builder clearRootId() {
rootId_ = 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:xla.HloComputationProto)
}
// @@protoc_insertion_point(class_scope:xla.HloComputationProto)
private static final xla.Hlo.HloComputationProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloComputationProto();
}
public static xla.Hlo.HloComputationProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HloComputationProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HloComputationProto(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 xla.Hlo.HloComputationProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HloScheduleProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloScheduleProto)
com.google.protobuf.MessageOrBuilder {
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
int getSequencesCount();
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
boolean containsSequences(
long key);
/**
* Use {@link #getSequencesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getSequences();
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
java.util.Map
getSequencesMap();
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrDefault(
long key,
xla.Hlo.HloScheduleProto.InstructionSequence defaultValue);
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrThrow(
long key);
}
/**
*
* Serialization of an HLO schedule. An HLO schedule contains a total order of
* instructions for each non-fusion computation in the module.
*
*
* Protobuf type {@code xla.HloScheduleProto}
*/
public static final class HloScheduleProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloScheduleProto)
HloScheduleProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use HloScheduleProto.newBuilder() to construct.
private HloScheduleProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HloScheduleProto() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HloScheduleProto(
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)) {
sequences_ = com.google.protobuf.MapField.newMapField(
SequencesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
sequences__ = input.readMessage(
SequencesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
sequences_.getMutableMap().put(
sequences__.getKey(), sequences__.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 xla.Hlo.internal_static_xla_HloScheduleProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetSequences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloScheduleProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloScheduleProto.class, xla.Hlo.HloScheduleProto.Builder.class);
}
public interface InstructionSequenceOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloScheduleProto.InstructionSequence)
com.google.protobuf.MessageOrBuilder {
/**
* repeated int64 instruction_ids = 1;
*/
java.util.List getInstructionIdsList();
/**
* repeated int64 instruction_ids = 1;
*/
int getInstructionIdsCount();
/**
* repeated int64 instruction_ids = 1;
*/
long getInstructionIds(int index);
}
/**
* Protobuf type {@code xla.HloScheduleProto.InstructionSequence}
*/
public static final class InstructionSequence extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloScheduleProto.InstructionSequence)
InstructionSequenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstructionSequence.newBuilder() to construct.
private InstructionSequence(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private InstructionSequence() {
instructionIds_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InstructionSequence(
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: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
instructionIds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
instructionIds_.add(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
instructionIds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
instructionIds_.add(input.readInt64());
}
input.popLimit(limit);
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_ & 0x00000001) == 0x00000001)) {
instructionIds_ = java.util.Collections.unmodifiableList(instructionIds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloScheduleProto_InstructionSequence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloScheduleProto_InstructionSequence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloScheduleProto.InstructionSequence.class, xla.Hlo.HloScheduleProto.InstructionSequence.Builder.class);
}
public static final int INSTRUCTION_IDS_FIELD_NUMBER = 1;
private java.util.List instructionIds_;
/**
* repeated int64 instruction_ids = 1;
*/
public java.util.List
getInstructionIdsList() {
return instructionIds_;
}
/**
* repeated int64 instruction_ids = 1;
*/
public int getInstructionIdsCount() {
return instructionIds_.size();
}
/**
* repeated int64 instruction_ids = 1;
*/
public long getInstructionIds(int index) {
return instructionIds_.get(index);
}
private int instructionIdsMemoizedSerializedSize = -1;
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 {
getSerializedSize();
if (getInstructionIdsList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(instructionIdsMemoizedSerializedSize);
}
for (int i = 0; i < instructionIds_.size(); i++) {
output.writeInt64NoTag(instructionIds_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < instructionIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(instructionIds_.get(i));
}
size += dataSize;
if (!getInstructionIdsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
instructionIdsMemoizedSerializedSize = dataSize;
}
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 xla.Hlo.HloScheduleProto.InstructionSequence)) {
return super.equals(obj);
}
xla.Hlo.HloScheduleProto.InstructionSequence other = (xla.Hlo.HloScheduleProto.InstructionSequence) obj;
boolean result = true;
result = result && getInstructionIdsList()
.equals(other.getInstructionIdsList());
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 (getInstructionIdsCount() > 0) {
hash = (37 * hash) + INSTRUCTION_IDS_FIELD_NUMBER;
hash = (53 * hash) + getInstructionIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence 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 xla.Hlo.HloScheduleProto.InstructionSequence parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence 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 xla.Hlo.HloScheduleProto.InstructionSequence parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto.InstructionSequence 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(xla.Hlo.HloScheduleProto.InstructionSequence 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 xla.HloScheduleProto.InstructionSequence}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloScheduleProto.InstructionSequence)
xla.Hlo.HloScheduleProto.InstructionSequenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloScheduleProto_InstructionSequence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloScheduleProto_InstructionSequence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloScheduleProto.InstructionSequence.class, xla.Hlo.HloScheduleProto.InstructionSequence.Builder.class);
}
// Construct using xla.Hlo.HloScheduleProto.InstructionSequence.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();
instructionIds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloScheduleProto_InstructionSequence_descriptor;
}
@java.lang.Override
public xla.Hlo.HloScheduleProto.InstructionSequence getDefaultInstanceForType() {
return xla.Hlo.HloScheduleProto.InstructionSequence.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloScheduleProto.InstructionSequence build() {
xla.Hlo.HloScheduleProto.InstructionSequence result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloScheduleProto.InstructionSequence buildPartial() {
xla.Hlo.HloScheduleProto.InstructionSequence result = new xla.Hlo.HloScheduleProto.InstructionSequence(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
instructionIds_ = java.util.Collections.unmodifiableList(instructionIds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.instructionIds_ = instructionIds_;
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 xla.Hlo.HloScheduleProto.InstructionSequence) {
return mergeFrom((xla.Hlo.HloScheduleProto.InstructionSequence)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloScheduleProto.InstructionSequence other) {
if (other == xla.Hlo.HloScheduleProto.InstructionSequence.getDefaultInstance()) return this;
if (!other.instructionIds_.isEmpty()) {
if (instructionIds_.isEmpty()) {
instructionIds_ = other.instructionIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureInstructionIdsIsMutable();
instructionIds_.addAll(other.instructionIds_);
}
onChanged();
}
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 {
xla.Hlo.HloScheduleProto.InstructionSequence parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloScheduleProto.InstructionSequence) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List instructionIds_ = java.util.Collections.emptyList();
private void ensureInstructionIdsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
instructionIds_ = new java.util.ArrayList(instructionIds_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated int64 instruction_ids = 1;
*/
public java.util.List
getInstructionIdsList() {
return java.util.Collections.unmodifiableList(instructionIds_);
}
/**
* repeated int64 instruction_ids = 1;
*/
public int getInstructionIdsCount() {
return instructionIds_.size();
}
/**
* repeated int64 instruction_ids = 1;
*/
public long getInstructionIds(int index) {
return instructionIds_.get(index);
}
/**
* repeated int64 instruction_ids = 1;
*/
public Builder setInstructionIds(
int index, long value) {
ensureInstructionIdsIsMutable();
instructionIds_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 instruction_ids = 1;
*/
public Builder addInstructionIds(long value) {
ensureInstructionIdsIsMutable();
instructionIds_.add(value);
onChanged();
return this;
}
/**
* repeated int64 instruction_ids = 1;
*/
public Builder addAllInstructionIds(
java.lang.Iterable values) {
ensureInstructionIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, instructionIds_);
onChanged();
return this;
}
/**
* repeated int64 instruction_ids = 1;
*/
public Builder clearInstructionIds() {
instructionIds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
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:xla.HloScheduleProto.InstructionSequence)
}
// @@protoc_insertion_point(class_scope:xla.HloScheduleProto.InstructionSequence)
private static final xla.Hlo.HloScheduleProto.InstructionSequence DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloScheduleProto.InstructionSequence();
}
public static xla.Hlo.HloScheduleProto.InstructionSequence getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstructionSequence parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InstructionSequence(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 xla.Hlo.HloScheduleProto.InstructionSequence getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int SEQUENCES_FIELD_NUMBER = 1;
private static final class SequencesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, xla.Hlo.HloScheduleProto.InstructionSequence> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
xla.Hlo.internal_static_xla_HloScheduleProto_SequencesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
xla.Hlo.HloScheduleProto.InstructionSequence.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, xla.Hlo.HloScheduleProto.InstructionSequence> sequences_;
private com.google.protobuf.MapField
internalGetSequences() {
if (sequences_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SequencesDefaultEntryHolder.defaultEntry);
}
return sequences_;
}
public int getSequencesCount() {
return internalGetSequences().getMap().size();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public boolean containsSequences(
long key) {
return internalGetSequences().getMap().containsKey(key);
}
/**
* Use {@link #getSequencesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSequences() {
return getSequencesMap();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public java.util.Map getSequencesMap() {
return internalGetSequences().getMap();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrDefault(
long key,
xla.Hlo.HloScheduleProto.InstructionSequence defaultValue) {
java.util.Map map =
internalGetSequences().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrThrow(
long key) {
java.util.Map map =
internalGetSequences().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 {
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetSequences(),
SequencesDefaultEntryHolder.defaultEntry,
1);
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
: internalGetSequences().getMap().entrySet()) {
com.google.protobuf.MapEntry
sequences__ = SequencesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, sequences__);
}
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 xla.Hlo.HloScheduleProto)) {
return super.equals(obj);
}
xla.Hlo.HloScheduleProto other = (xla.Hlo.HloScheduleProto) obj;
boolean result = true;
result = result && internalGetSequences().equals(
other.internalGetSequences());
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 (!internalGetSequences().getMap().isEmpty()) {
hash = (37 * hash) + SEQUENCES_FIELD_NUMBER;
hash = (53 * hash) + internalGetSequences().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloScheduleProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloScheduleProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloScheduleProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto 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 xla.Hlo.HloScheduleProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto 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 xla.Hlo.HloScheduleProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloScheduleProto 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(xla.Hlo.HloScheduleProto 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;
}
/**
*
* Serialization of an HLO schedule. An HLO schedule contains a total order of
* instructions for each non-fusion computation in the module.
*
*
* Protobuf type {@code xla.HloScheduleProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloScheduleProto)
xla.Hlo.HloScheduleProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloScheduleProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetSequences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableSequences();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloScheduleProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloScheduleProto.class, xla.Hlo.HloScheduleProto.Builder.class);
}
// Construct using xla.Hlo.HloScheduleProto.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();
internalGetMutableSequences().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloScheduleProto_descriptor;
}
@java.lang.Override
public xla.Hlo.HloScheduleProto getDefaultInstanceForType() {
return xla.Hlo.HloScheduleProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloScheduleProto build() {
xla.Hlo.HloScheduleProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloScheduleProto buildPartial() {
xla.Hlo.HloScheduleProto result = new xla.Hlo.HloScheduleProto(this);
int from_bitField0_ = bitField0_;
result.sequences_ = internalGetSequences();
result.sequences_.makeImmutable();
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 xla.Hlo.HloScheduleProto) {
return mergeFrom((xla.Hlo.HloScheduleProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloScheduleProto other) {
if (other == xla.Hlo.HloScheduleProto.getDefaultInstance()) return this;
internalGetMutableSequences().mergeFrom(
other.internalGetSequences());
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 {
xla.Hlo.HloScheduleProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloScheduleProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.Long, xla.Hlo.HloScheduleProto.InstructionSequence> sequences_;
private com.google.protobuf.MapField
internalGetSequences() {
if (sequences_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SequencesDefaultEntryHolder.defaultEntry);
}
return sequences_;
}
private com.google.protobuf.MapField
internalGetMutableSequences() {
onChanged();;
if (sequences_ == null) {
sequences_ = com.google.protobuf.MapField.newMapField(
SequencesDefaultEntryHolder.defaultEntry);
}
if (!sequences_.isMutable()) {
sequences_ = sequences_.copy();
}
return sequences_;
}
public int getSequencesCount() {
return internalGetSequences().getMap().size();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public boolean containsSequences(
long key) {
return internalGetSequences().getMap().containsKey(key);
}
/**
* Use {@link #getSequencesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSequences() {
return getSequencesMap();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public java.util.Map getSequencesMap() {
return internalGetSequences().getMap();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrDefault(
long key,
xla.Hlo.HloScheduleProto.InstructionSequence defaultValue) {
java.util.Map map =
internalGetSequences().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public xla.Hlo.HloScheduleProto.InstructionSequence getSequencesOrThrow(
long key) {
java.util.Map map =
internalGetSequences().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearSequences() {
internalGetMutableSequences().getMutableMap()
.clear();
return this;
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public Builder removeSequences(
long key) {
internalGetMutableSequences().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableSequences() {
return internalGetMutableSequences().getMutableMap();
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public Builder putSequences(
long key,
xla.Hlo.HloScheduleProto.InstructionSequence value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableSequences().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Map from computation id to sequence.
*
*
* map<int64, .xla.HloScheduleProto.InstructionSequence> sequences = 1;
*/
public Builder putAllSequences(
java.util.Map values) {
internalGetMutableSequences().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:xla.HloScheduleProto)
}
// @@protoc_insertion_point(class_scope:xla.HloScheduleProto)
private static final xla.Hlo.HloScheduleProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloScheduleProto();
}
public static xla.Hlo.HloScheduleProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HloScheduleProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HloScheduleProto(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 xla.Hlo.HloScheduleProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HloModuleProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloModuleProto)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* string entry_computation_name = 2;
*/
java.lang.String getEntryComputationName();
/**
* string entry_computation_name = 2;
*/
com.google.protobuf.ByteString
getEntryComputationNameBytes();
/**
* int64 entry_computation_id = 6;
*/
long getEntryComputationId();
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
java.util.List
getComputationsList();
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
xla.Hlo.HloComputationProto getComputations(int index);
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
int getComputationsCount();
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
java.util.List
getComputationsOrBuilderList();
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
xla.Hlo.HloComputationProtoOrBuilder getComputationsOrBuilder(
int index);
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
boolean hasProgramShape();
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
xla.XlaData.ProgramShape getProgramShape();
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder();
/**
*
* The id of this module.
*
*
* int64 id = 5;
*/
long getId();
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
boolean hasSchedule();
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
xla.Hlo.HloScheduleProto getSchedule();
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
xla.Hlo.HloScheduleProtoOrBuilder getScheduleOrBuilder();
}
/**
*
* Serialization of HloModule.
*
*
* Protobuf type {@code xla.HloModuleProto}
*/
public static final class HloModuleProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloModuleProto)
HloModuleProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use HloModuleProto.newBuilder() to construct.
private HloModuleProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HloModuleProto() {
name_ = "";
entryComputationName_ = "";
entryComputationId_ = 0L;
computations_ = java.util.Collections.emptyList();
id_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HloModuleProto(
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 18: {
java.lang.String s = input.readStringRequireUtf8();
entryComputationName_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
computations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
computations_.add(
input.readMessage(xla.Hlo.HloComputationProto.parser(), extensionRegistry));
break;
}
case 34: {
xla.XlaData.ProgramShape.Builder subBuilder = null;
if (programShape_ != null) {
subBuilder = programShape_.toBuilder();
}
programShape_ = input.readMessage(xla.XlaData.ProgramShape.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(programShape_);
programShape_ = subBuilder.buildPartial();
}
break;
}
case 40: {
id_ = input.readInt64();
break;
}
case 48: {
entryComputationId_ = input.readInt64();
break;
}
case 58: {
xla.Hlo.HloScheduleProto.Builder subBuilder = null;
if (schedule_ != null) {
subBuilder = schedule_.toBuilder();
}
schedule_ = input.readMessage(xla.Hlo.HloScheduleProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(schedule_);
schedule_ = subBuilder.buildPartial();
}
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_ & 0x00000008) == 0x00000008)) {
computations_ = java.util.Collections.unmodifiableList(computations_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloModuleProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloModuleProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloModuleProto.class, xla.Hlo.HloModuleProto.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* 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;
}
}
/**
* 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 ENTRY_COMPUTATION_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object entryComputationName_;
/**
* string entry_computation_name = 2;
*/
public java.lang.String getEntryComputationName() {
java.lang.Object ref = entryComputationName_;
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();
entryComputationName_ = s;
return s;
}
}
/**
* string entry_computation_name = 2;
*/
public com.google.protobuf.ByteString
getEntryComputationNameBytes() {
java.lang.Object ref = entryComputationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entryComputationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENTRY_COMPUTATION_ID_FIELD_NUMBER = 6;
private long entryComputationId_;
/**
* int64 entry_computation_id = 6;
*/
public long getEntryComputationId() {
return entryComputationId_;
}
public static final int COMPUTATIONS_FIELD_NUMBER = 3;
private java.util.List computations_;
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public java.util.List getComputationsList() {
return computations_;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public java.util.List
getComputationsOrBuilderList() {
return computations_;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public int getComputationsCount() {
return computations_.size();
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProto getComputations(int index) {
return computations_.get(index);
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProtoOrBuilder getComputationsOrBuilder(
int index) {
return computations_.get(index);
}
public static final int PROGRAM_SHAPE_FIELD_NUMBER = 4;
private xla.XlaData.ProgramShape programShape_;
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public boolean hasProgramShape() {
return programShape_ != null;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape getProgramShape() {
return programShape_ == null ? xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder() {
return getProgramShape();
}
public static final int ID_FIELD_NUMBER = 5;
private long id_;
/**
*
* The id of this module.
*
*
* int64 id = 5;
*/
public long getId() {
return id_;
}
public static final int SCHEDULE_FIELD_NUMBER = 7;
private xla.Hlo.HloScheduleProto schedule_;
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public boolean hasSchedule() {
return schedule_ != null;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public xla.Hlo.HloScheduleProto getSchedule() {
return schedule_ == null ? xla.Hlo.HloScheduleProto.getDefaultInstance() : schedule_;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public xla.Hlo.HloScheduleProtoOrBuilder getScheduleOrBuilder() {
return getSchedule();
}
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 (!getEntryComputationNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entryComputationName_);
}
for (int i = 0; i < computations_.size(); i++) {
output.writeMessage(3, computations_.get(i));
}
if (programShape_ != null) {
output.writeMessage(4, getProgramShape());
}
if (id_ != 0L) {
output.writeInt64(5, id_);
}
if (entryComputationId_ != 0L) {
output.writeInt64(6, entryComputationId_);
}
if (schedule_ != null) {
output.writeMessage(7, getSchedule());
}
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 (!getEntryComputationNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entryComputationName_);
}
for (int i = 0; i < computations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, computations_.get(i));
}
if (programShape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getProgramShape());
}
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, id_);
}
if (entryComputationId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, entryComputationId_);
}
if (schedule_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getSchedule());
}
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 xla.Hlo.HloModuleProto)) {
return super.equals(obj);
}
xla.Hlo.HloModuleProto other = (xla.Hlo.HloModuleProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getEntryComputationName()
.equals(other.getEntryComputationName());
result = result && (getEntryComputationId()
== other.getEntryComputationId());
result = result && getComputationsList()
.equals(other.getComputationsList());
result = result && (hasProgramShape() == other.hasProgramShape());
if (hasProgramShape()) {
result = result && getProgramShape()
.equals(other.getProgramShape());
}
result = result && (getId()
== other.getId());
result = result && (hasSchedule() == other.hasSchedule());
if (hasSchedule()) {
result = result && getSchedule()
.equals(other.getSchedule());
}
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) + ENTRY_COMPUTATION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getEntryComputationName().hashCode();
hash = (37 * hash) + ENTRY_COMPUTATION_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEntryComputationId());
if (getComputationsCount() > 0) {
hash = (37 * hash) + COMPUTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getComputationsList().hashCode();
}
if (hasProgramShape()) {
hash = (37 * hash) + PROGRAM_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getProgramShape().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
if (hasSchedule()) {
hash = (37 * hash) + SCHEDULE_FIELD_NUMBER;
hash = (53 * hash) + getSchedule().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloModuleProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleProto 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 xla.Hlo.HloModuleProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleProto 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 xla.Hlo.HloModuleProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleProto 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(xla.Hlo.HloModuleProto 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;
}
/**
*
* Serialization of HloModule.
*
*
* Protobuf type {@code xla.HloModuleProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloModuleProto)
xla.Hlo.HloModuleProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloModuleProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloModuleProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloModuleProto.class, xla.Hlo.HloModuleProto.Builder.class);
}
// Construct using xla.Hlo.HloModuleProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getComputationsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
entryComputationName_ = "";
entryComputationId_ = 0L;
if (computationsBuilder_ == null) {
computations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
computationsBuilder_.clear();
}
if (programShapeBuilder_ == null) {
programShape_ = null;
} else {
programShape_ = null;
programShapeBuilder_ = null;
}
id_ = 0L;
if (scheduleBuilder_ == null) {
schedule_ = null;
} else {
schedule_ = null;
scheduleBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloModuleProto_descriptor;
}
@java.lang.Override
public xla.Hlo.HloModuleProto getDefaultInstanceForType() {
return xla.Hlo.HloModuleProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloModuleProto build() {
xla.Hlo.HloModuleProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloModuleProto buildPartial() {
xla.Hlo.HloModuleProto result = new xla.Hlo.HloModuleProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.entryComputationName_ = entryComputationName_;
result.entryComputationId_ = entryComputationId_;
if (computationsBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
computations_ = java.util.Collections.unmodifiableList(computations_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.computations_ = computations_;
} else {
result.computations_ = computationsBuilder_.build();
}
if (programShapeBuilder_ == null) {
result.programShape_ = programShape_;
} else {
result.programShape_ = programShapeBuilder_.build();
}
result.id_ = id_;
if (scheduleBuilder_ == null) {
result.schedule_ = schedule_;
} else {
result.schedule_ = scheduleBuilder_.build();
}
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 xla.Hlo.HloModuleProto) {
return mergeFrom((xla.Hlo.HloModuleProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloModuleProto other) {
if (other == xla.Hlo.HloModuleProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getEntryComputationName().isEmpty()) {
entryComputationName_ = other.entryComputationName_;
onChanged();
}
if (other.getEntryComputationId() != 0L) {
setEntryComputationId(other.getEntryComputationId());
}
if (computationsBuilder_ == null) {
if (!other.computations_.isEmpty()) {
if (computations_.isEmpty()) {
computations_ = other.computations_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureComputationsIsMutable();
computations_.addAll(other.computations_);
}
onChanged();
}
} else {
if (!other.computations_.isEmpty()) {
if (computationsBuilder_.isEmpty()) {
computationsBuilder_.dispose();
computationsBuilder_ = null;
computations_ = other.computations_;
bitField0_ = (bitField0_ & ~0x00000008);
computationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getComputationsFieldBuilder() : null;
} else {
computationsBuilder_.addAllMessages(other.computations_);
}
}
}
if (other.hasProgramShape()) {
mergeProgramShape(other.getProgramShape());
}
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.hasSchedule()) {
mergeSchedule(other.getSchedule());
}
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 {
xla.Hlo.HloModuleProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloModuleProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* 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 java.lang.Object entryComputationName_ = "";
/**
* string entry_computation_name = 2;
*/
public java.lang.String getEntryComputationName() {
java.lang.Object ref = entryComputationName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
entryComputationName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string entry_computation_name = 2;
*/
public com.google.protobuf.ByteString
getEntryComputationNameBytes() {
java.lang.Object ref = entryComputationName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entryComputationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string entry_computation_name = 2;
*/
public Builder setEntryComputationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
entryComputationName_ = value;
onChanged();
return this;
}
/**
* string entry_computation_name = 2;
*/
public Builder clearEntryComputationName() {
entryComputationName_ = getDefaultInstance().getEntryComputationName();
onChanged();
return this;
}
/**
* string entry_computation_name = 2;
*/
public Builder setEntryComputationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
entryComputationName_ = value;
onChanged();
return this;
}
private long entryComputationId_ ;
/**
* int64 entry_computation_id = 6;
*/
public long getEntryComputationId() {
return entryComputationId_;
}
/**
* int64 entry_computation_id = 6;
*/
public Builder setEntryComputationId(long value) {
entryComputationId_ = value;
onChanged();
return this;
}
/**
* int64 entry_computation_id = 6;
*/
public Builder clearEntryComputationId() {
entryComputationId_ = 0L;
onChanged();
return this;
}
private java.util.List computations_ =
java.util.Collections.emptyList();
private void ensureComputationsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
computations_ = new java.util.ArrayList(computations_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloComputationProto, xla.Hlo.HloComputationProto.Builder, xla.Hlo.HloComputationProtoOrBuilder> computationsBuilder_;
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public java.util.List getComputationsList() {
if (computationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(computations_);
} else {
return computationsBuilder_.getMessageList();
}
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public int getComputationsCount() {
if (computationsBuilder_ == null) {
return computations_.size();
} else {
return computationsBuilder_.getCount();
}
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProto getComputations(int index) {
if (computationsBuilder_ == null) {
return computations_.get(index);
} else {
return computationsBuilder_.getMessage(index);
}
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder setComputations(
int index, xla.Hlo.HloComputationProto value) {
if (computationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureComputationsIsMutable();
computations_.set(index, value);
onChanged();
} else {
computationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder setComputations(
int index, xla.Hlo.HloComputationProto.Builder builderForValue) {
if (computationsBuilder_ == null) {
ensureComputationsIsMutable();
computations_.set(index, builderForValue.build());
onChanged();
} else {
computationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder addComputations(xla.Hlo.HloComputationProto value) {
if (computationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureComputationsIsMutable();
computations_.add(value);
onChanged();
} else {
computationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder addComputations(
int index, xla.Hlo.HloComputationProto value) {
if (computationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureComputationsIsMutable();
computations_.add(index, value);
onChanged();
} else {
computationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder addComputations(
xla.Hlo.HloComputationProto.Builder builderForValue) {
if (computationsBuilder_ == null) {
ensureComputationsIsMutable();
computations_.add(builderForValue.build());
onChanged();
} else {
computationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder addComputations(
int index, xla.Hlo.HloComputationProto.Builder builderForValue) {
if (computationsBuilder_ == null) {
ensureComputationsIsMutable();
computations_.add(index, builderForValue.build());
onChanged();
} else {
computationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder addAllComputations(
java.lang.Iterable values) {
if (computationsBuilder_ == null) {
ensureComputationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, computations_);
onChanged();
} else {
computationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder clearComputations() {
if (computationsBuilder_ == null) {
computations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
computationsBuilder_.clear();
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public Builder removeComputations(int index) {
if (computationsBuilder_ == null) {
ensureComputationsIsMutable();
computations_.remove(index);
onChanged();
} else {
computationsBuilder_.remove(index);
}
return this;
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProto.Builder getComputationsBuilder(
int index) {
return getComputationsFieldBuilder().getBuilder(index);
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProtoOrBuilder getComputationsOrBuilder(
int index) {
if (computationsBuilder_ == null) {
return computations_.get(index); } else {
return computationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public java.util.List
getComputationsOrBuilderList() {
if (computationsBuilder_ != null) {
return computationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(computations_);
}
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProto.Builder addComputationsBuilder() {
return getComputationsFieldBuilder().addBuilder(
xla.Hlo.HloComputationProto.getDefaultInstance());
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public xla.Hlo.HloComputationProto.Builder addComputationsBuilder(
int index) {
return getComputationsFieldBuilder().addBuilder(
index, xla.Hlo.HloComputationProto.getDefaultInstance());
}
/**
*
* The array of computations is always in a valid dependency order, where
* callees appear before their callers.
*
*
* repeated .xla.HloComputationProto computations = 3;
*/
public java.util.List
getComputationsBuilderList() {
return getComputationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloComputationProto, xla.Hlo.HloComputationProto.Builder, xla.Hlo.HloComputationProtoOrBuilder>
getComputationsFieldBuilder() {
if (computationsBuilder_ == null) {
computationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloComputationProto, xla.Hlo.HloComputationProto.Builder, xla.Hlo.HloComputationProtoOrBuilder>(
computations_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
computations_ = null;
}
return computationsBuilder_;
}
private xla.XlaData.ProgramShape programShape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder> programShapeBuilder_;
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public boolean hasProgramShape() {
return programShapeBuilder_ != null || programShape_ != null;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape getProgramShape() {
if (programShapeBuilder_ == null) {
return programShape_ == null ? xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
} else {
return programShapeBuilder_.getMessage();
}
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder setProgramShape(xla.XlaData.ProgramShape value) {
if (programShapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
programShape_ = value;
onChanged();
} else {
programShapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder setProgramShape(
xla.XlaData.ProgramShape.Builder builderForValue) {
if (programShapeBuilder_ == null) {
programShape_ = builderForValue.build();
onChanged();
} else {
programShapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder mergeProgramShape(xla.XlaData.ProgramShape value) {
if (programShapeBuilder_ == null) {
if (programShape_ != null) {
programShape_ =
xla.XlaData.ProgramShape.newBuilder(programShape_).mergeFrom(value).buildPartial();
} else {
programShape_ = value;
}
onChanged();
} else {
programShapeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public Builder clearProgramShape() {
if (programShapeBuilder_ == null) {
programShape_ = null;
onChanged();
} else {
programShape_ = null;
programShapeBuilder_ = null;
}
return this;
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShape.Builder getProgramShapeBuilder() {
onChanged();
return getProgramShapeFieldBuilder().getBuilder();
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
public xla.XlaData.ProgramShapeOrBuilder getProgramShapeOrBuilder() {
if (programShapeBuilder_ != null) {
return programShapeBuilder_.getMessageOrBuilder();
} else {
return programShape_ == null ?
xla.XlaData.ProgramShape.getDefaultInstance() : programShape_;
}
}
/**
*
* The program shape (with layout) of the entry computation.
*
*
* .xla.ProgramShape program_shape = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder>
getProgramShapeFieldBuilder() {
if (programShapeBuilder_ == null) {
programShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.XlaData.ProgramShape, xla.XlaData.ProgramShape.Builder, xla.XlaData.ProgramShapeOrBuilder>(
getProgramShape(),
getParentForChildren(),
isClean());
programShape_ = null;
}
return programShapeBuilder_;
}
private long id_ ;
/**
*
* The id of this module.
*
*
* int64 id = 5;
*/
public long getId() {
return id_;
}
/**
*
* The id of this module.
*
*
* int64 id = 5;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
*
* The id of this module.
*
*
* int64 id = 5;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private xla.Hlo.HloScheduleProto schedule_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.HloScheduleProto, xla.Hlo.HloScheduleProto.Builder, xla.Hlo.HloScheduleProtoOrBuilder> scheduleBuilder_;
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public boolean hasSchedule() {
return scheduleBuilder_ != null || schedule_ != null;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public xla.Hlo.HloScheduleProto getSchedule() {
if (scheduleBuilder_ == null) {
return schedule_ == null ? xla.Hlo.HloScheduleProto.getDefaultInstance() : schedule_;
} else {
return scheduleBuilder_.getMessage();
}
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public Builder setSchedule(xla.Hlo.HloScheduleProto value) {
if (scheduleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
schedule_ = value;
onChanged();
} else {
scheduleBuilder_.setMessage(value);
}
return this;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public Builder setSchedule(
xla.Hlo.HloScheduleProto.Builder builderForValue) {
if (scheduleBuilder_ == null) {
schedule_ = builderForValue.build();
onChanged();
} else {
scheduleBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public Builder mergeSchedule(xla.Hlo.HloScheduleProto value) {
if (scheduleBuilder_ == null) {
if (schedule_ != null) {
schedule_ =
xla.Hlo.HloScheduleProto.newBuilder(schedule_).mergeFrom(value).buildPartial();
} else {
schedule_ = value;
}
onChanged();
} else {
scheduleBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public Builder clearSchedule() {
if (scheduleBuilder_ == null) {
schedule_ = null;
onChanged();
} else {
schedule_ = null;
scheduleBuilder_ = null;
}
return this;
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public xla.Hlo.HloScheduleProto.Builder getScheduleBuilder() {
onChanged();
return getScheduleFieldBuilder().getBuilder();
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
public xla.Hlo.HloScheduleProtoOrBuilder getScheduleOrBuilder() {
if (scheduleBuilder_ != null) {
return scheduleBuilder_.getMessageOrBuilder();
} else {
return schedule_ == null ?
xla.Hlo.HloScheduleProto.getDefaultInstance() : schedule_;
}
}
/**
*
* The schedule for this module.
*
*
* .xla.HloScheduleProto schedule = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.HloScheduleProto, xla.Hlo.HloScheduleProto.Builder, xla.Hlo.HloScheduleProtoOrBuilder>
getScheduleFieldBuilder() {
if (scheduleBuilder_ == null) {
scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.HloScheduleProto, xla.Hlo.HloScheduleProto.Builder, xla.Hlo.HloScheduleProtoOrBuilder>(
getSchedule(),
getParentForChildren(),
isClean());
schedule_ = null;
}
return scheduleBuilder_;
}
@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:xla.HloModuleProto)
}
// @@protoc_insertion_point(class_scope:xla.HloModuleProto)
private static final xla.Hlo.HloModuleProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloModuleProto();
}
public static xla.Hlo.HloModuleProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HloModuleProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HloModuleProto(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 xla.Hlo.HloModuleProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LogicalBufferProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.LogicalBufferProto)
com.google.protobuf.MessageOrBuilder {
/**
* int64 id = 1;
*/
long getId();
/**
* int64 size = 2;
*/
long getSize();
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
boolean hasDefinedAt();
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
xla.Hlo.LogicalBufferProto.Location getDefinedAt();
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
xla.Hlo.LogicalBufferProto.LocationOrBuilder getDefinedAtOrBuilder();
/**
* int64 color = 4;
*/
long getColor();
}
/**
*
* Serialization of LogicalBuffer.
*
*
* Protobuf type {@code xla.LogicalBufferProto}
*/
public static final class LogicalBufferProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.LogicalBufferProto)
LogicalBufferProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use LogicalBufferProto.newBuilder() to construct.
private LogicalBufferProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private LogicalBufferProto() {
id_ = 0L;
size_ = 0L;
color_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LogicalBufferProto(
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: {
id_ = input.readInt64();
break;
}
case 16: {
size_ = input.readInt64();
break;
}
case 26: {
xla.Hlo.LogicalBufferProto.Location.Builder subBuilder = null;
if (definedAt_ != null) {
subBuilder = definedAt_.toBuilder();
}
definedAt_ = input.readMessage(xla.Hlo.LogicalBufferProto.Location.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(definedAt_);
definedAt_ = subBuilder.buildPartial();
}
break;
}
case 32: {
color_ = input.readInt64();
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 xla.Hlo.internal_static_xla_LogicalBufferProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.LogicalBufferProto.class, xla.Hlo.LogicalBufferProto.Builder.class);
}
public interface LocationOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.LogicalBufferProto.Location)
com.google.protobuf.MessageOrBuilder {
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
java.lang.String getComputationName();
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
com.google.protobuf.ByteString
getComputationNameBytes();
/**
* string instruction_name = 2;
*/
java.lang.String getInstructionName();
/**
* string instruction_name = 2;
*/
com.google.protobuf.ByteString
getInstructionNameBytes();
/**
* repeated int64 shape_index = 3;
*/
java.util.List getShapeIndexList();
/**
* repeated int64 shape_index = 3;
*/
int getShapeIndexCount();
/**
* repeated int64 shape_index = 3;
*/
long getShapeIndex(int index);
}
/**
*
* Location represents an instruction and its shape index, which uniquely
* identifies a point where a buffer is needed.
*
*
* Protobuf type {@code xla.LogicalBufferProto.Location}
*/
public static final class Location extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.LogicalBufferProto.Location)
LocationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Location.newBuilder() to construct.
private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Location() {
computationName_ = "";
instructionName_ = "";
shapeIndex_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Location(
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();
computationName_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
instructionName_ = s;
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
shapeIndex_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
shapeIndex_.add(input.readInt64());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
shapeIndex_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
shapeIndex_.add(input.readInt64());
}
input.popLimit(limit);
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_ & 0x00000004) == 0x00000004)) {
shapeIndex_ = java.util.Collections.unmodifiableList(shapeIndex_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_Location_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_Location_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.LogicalBufferProto.Location.class, xla.Hlo.LogicalBufferProto.Location.Builder.class);
}
private int bitField0_;
public static final int COMPUTATION_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object computationName_;
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public java.lang.String getComputationName() {
java.lang.Object ref = computationName_;
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();
computationName_ = s;
return s;
}
}
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public com.google.protobuf.ByteString
getComputationNameBytes() {
java.lang.Object ref = computationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
computationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTRUCTION_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object instructionName_;
/**
* string instruction_name = 2;
*/
public java.lang.String getInstructionName() {
java.lang.Object ref = instructionName_;
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();
instructionName_ = s;
return s;
}
}
/**
* string instruction_name = 2;
*/
public com.google.protobuf.ByteString
getInstructionNameBytes() {
java.lang.Object ref = instructionName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instructionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHAPE_INDEX_FIELD_NUMBER = 3;
private java.util.List shapeIndex_;
/**
* repeated int64 shape_index = 3;
*/
public java.util.List
getShapeIndexList() {
return shapeIndex_;
}
/**
* repeated int64 shape_index = 3;
*/
public int getShapeIndexCount() {
return shapeIndex_.size();
}
/**
* repeated int64 shape_index = 3;
*/
public long getShapeIndex(int index) {
return shapeIndex_.get(index);
}
private int shapeIndexMemoizedSerializedSize = -1;
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 {
getSerializedSize();
if (!getComputationNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, computationName_);
}
if (!getInstructionNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instructionName_);
}
if (getShapeIndexList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(shapeIndexMemoizedSerializedSize);
}
for (int i = 0; i < shapeIndex_.size(); i++) {
output.writeInt64NoTag(shapeIndex_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getComputationNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, computationName_);
}
if (!getInstructionNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instructionName_);
}
{
int dataSize = 0;
for (int i = 0; i < shapeIndex_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(shapeIndex_.get(i));
}
size += dataSize;
if (!getShapeIndexList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
shapeIndexMemoizedSerializedSize = dataSize;
}
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 xla.Hlo.LogicalBufferProto.Location)) {
return super.equals(obj);
}
xla.Hlo.LogicalBufferProto.Location other = (xla.Hlo.LogicalBufferProto.Location) obj;
boolean result = true;
result = result && getComputationName()
.equals(other.getComputationName());
result = result && getInstructionName()
.equals(other.getInstructionName());
result = result && getShapeIndexList()
.equals(other.getShapeIndexList());
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) + COMPUTATION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getComputationName().hashCode();
hash = (37 * hash) + INSTRUCTION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getInstructionName().hashCode();
if (getShapeIndexCount() > 0) {
hash = (37 * hash) + SHAPE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getShapeIndexList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto.Location parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto.Location 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 xla.Hlo.LogicalBufferProto.Location parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto.Location 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 xla.Hlo.LogicalBufferProto.Location parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto.Location 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(xla.Hlo.LogicalBufferProto.Location 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;
}
/**
*
* Location represents an instruction and its shape index, which uniquely
* identifies a point where a buffer is needed.
*
*
* Protobuf type {@code xla.LogicalBufferProto.Location}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.LogicalBufferProto.Location)
xla.Hlo.LogicalBufferProto.LocationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_Location_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_Location_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.LogicalBufferProto.Location.class, xla.Hlo.LogicalBufferProto.Location.Builder.class);
}
// Construct using xla.Hlo.LogicalBufferProto.Location.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();
computationName_ = "";
instructionName_ = "";
shapeIndex_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_Location_descriptor;
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto.Location getDefaultInstanceForType() {
return xla.Hlo.LogicalBufferProto.Location.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto.Location build() {
xla.Hlo.LogicalBufferProto.Location result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto.Location buildPartial() {
xla.Hlo.LogicalBufferProto.Location result = new xla.Hlo.LogicalBufferProto.Location(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.computationName_ = computationName_;
result.instructionName_ = instructionName_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
shapeIndex_ = java.util.Collections.unmodifiableList(shapeIndex_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.shapeIndex_ = shapeIndex_;
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 xla.Hlo.LogicalBufferProto.Location) {
return mergeFrom((xla.Hlo.LogicalBufferProto.Location)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.LogicalBufferProto.Location other) {
if (other == xla.Hlo.LogicalBufferProto.Location.getDefaultInstance()) return this;
if (!other.getComputationName().isEmpty()) {
computationName_ = other.computationName_;
onChanged();
}
if (!other.getInstructionName().isEmpty()) {
instructionName_ = other.instructionName_;
onChanged();
}
if (!other.shapeIndex_.isEmpty()) {
if (shapeIndex_.isEmpty()) {
shapeIndex_ = other.shapeIndex_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureShapeIndexIsMutable();
shapeIndex_.addAll(other.shapeIndex_);
}
onChanged();
}
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 {
xla.Hlo.LogicalBufferProto.Location parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.LogicalBufferProto.Location) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object computationName_ = "";
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public java.lang.String getComputationName() {
java.lang.Object ref = computationName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
computationName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public com.google.protobuf.ByteString
getComputationNameBytes() {
java.lang.Object ref = computationName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
computationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public Builder setComputationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
computationName_ = value;
onChanged();
return this;
}
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public Builder clearComputationName() {
computationName_ = getDefaultInstance().getComputationName();
onChanged();
return this;
}
/**
*
* NOTE: module_name isn't necessary, since all LogicalBuffers are
* associated with a single HloModule.
*
*
* string computation_name = 1;
*/
public Builder setComputationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
computationName_ = value;
onChanged();
return this;
}
private java.lang.Object instructionName_ = "";
/**
* string instruction_name = 2;
*/
public java.lang.String getInstructionName() {
java.lang.Object ref = instructionName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instructionName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string instruction_name = 2;
*/
public com.google.protobuf.ByteString
getInstructionNameBytes() {
java.lang.Object ref = instructionName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instructionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string instruction_name = 2;
*/
public Builder setInstructionName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
instructionName_ = value;
onChanged();
return this;
}
/**
* string instruction_name = 2;
*/
public Builder clearInstructionName() {
instructionName_ = getDefaultInstance().getInstructionName();
onChanged();
return this;
}
/**
* string instruction_name = 2;
*/
public Builder setInstructionNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
instructionName_ = value;
onChanged();
return this;
}
private java.util.List shapeIndex_ = java.util.Collections.emptyList();
private void ensureShapeIndexIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
shapeIndex_ = new java.util.ArrayList(shapeIndex_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated int64 shape_index = 3;
*/
public java.util.List
getShapeIndexList() {
return java.util.Collections.unmodifiableList(shapeIndex_);
}
/**
* repeated int64 shape_index = 3;
*/
public int getShapeIndexCount() {
return shapeIndex_.size();
}
/**
* repeated int64 shape_index = 3;
*/
public long getShapeIndex(int index) {
return shapeIndex_.get(index);
}
/**
* repeated int64 shape_index = 3;
*/
public Builder setShapeIndex(
int index, long value) {
ensureShapeIndexIsMutable();
shapeIndex_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 shape_index = 3;
*/
public Builder addShapeIndex(long value) {
ensureShapeIndexIsMutable();
shapeIndex_.add(value);
onChanged();
return this;
}
/**
* repeated int64 shape_index = 3;
*/
public Builder addAllShapeIndex(
java.lang.Iterable values) {
ensureShapeIndexIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, shapeIndex_);
onChanged();
return this;
}
/**
* repeated int64 shape_index = 3;
*/
public Builder clearShapeIndex() {
shapeIndex_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
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:xla.LogicalBufferProto.Location)
}
// @@protoc_insertion_point(class_scope:xla.LogicalBufferProto.Location)
private static final xla.Hlo.LogicalBufferProto.Location DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.LogicalBufferProto.Location();
}
public static xla.Hlo.LogicalBufferProto.Location getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Location parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Location(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 xla.Hlo.LogicalBufferProto.Location getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* int64 id = 1;
*/
public long getId() {
return id_;
}
public static final int SIZE_FIELD_NUMBER = 2;
private long size_;
/**
* int64 size = 2;
*/
public long getSize() {
return size_;
}
public static final int DEFINED_AT_FIELD_NUMBER = 3;
private xla.Hlo.LogicalBufferProto.Location definedAt_;
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public boolean hasDefinedAt() {
return definedAt_ != null;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public xla.Hlo.LogicalBufferProto.Location getDefinedAt() {
return definedAt_ == null ? xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : definedAt_;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public xla.Hlo.LogicalBufferProto.LocationOrBuilder getDefinedAtOrBuilder() {
return getDefinedAt();
}
public static final int COLOR_FIELD_NUMBER = 4;
private long color_;
/**
* int64 color = 4;
*/
public long getColor() {
return color_;
}
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 (id_ != 0L) {
output.writeInt64(1, id_);
}
if (size_ != 0L) {
output.writeInt64(2, size_);
}
if (definedAt_ != null) {
output.writeMessage(3, getDefinedAt());
}
if (color_ != 0L) {
output.writeInt64(4, color_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, id_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, size_);
}
if (definedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDefinedAt());
}
if (color_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, color_);
}
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 xla.Hlo.LogicalBufferProto)) {
return super.equals(obj);
}
xla.Hlo.LogicalBufferProto other = (xla.Hlo.LogicalBufferProto) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && (getSize()
== other.getSize());
result = result && (hasDefinedAt() == other.hasDefinedAt());
if (hasDefinedAt()) {
result = result && getDefinedAt()
.equals(other.getDefinedAt());
}
result = result && (getColor()
== other.getColor());
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
if (hasDefinedAt()) {
hash = (37 * hash) + DEFINED_AT_FIELD_NUMBER;
hash = (53 * hash) + getDefinedAt().hashCode();
}
hash = (37 * hash) + COLOR_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getColor());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.LogicalBufferProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.LogicalBufferProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.LogicalBufferProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto 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 xla.Hlo.LogicalBufferProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto 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 xla.Hlo.LogicalBufferProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.LogicalBufferProto 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(xla.Hlo.LogicalBufferProto 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;
}
/**
*
* Serialization of LogicalBuffer.
*
*
* Protobuf type {@code xla.LogicalBufferProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.LogicalBufferProto)
xla.Hlo.LogicalBufferProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.LogicalBufferProto.class, xla.Hlo.LogicalBufferProto.Builder.class);
}
// Construct using xla.Hlo.LogicalBufferProto.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();
id_ = 0L;
size_ = 0L;
if (definedAtBuilder_ == null) {
definedAt_ = null;
} else {
definedAt_ = null;
definedAtBuilder_ = null;
}
color_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_LogicalBufferProto_descriptor;
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto getDefaultInstanceForType() {
return xla.Hlo.LogicalBufferProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto build() {
xla.Hlo.LogicalBufferProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.LogicalBufferProto buildPartial() {
xla.Hlo.LogicalBufferProto result = new xla.Hlo.LogicalBufferProto(this);
result.id_ = id_;
result.size_ = size_;
if (definedAtBuilder_ == null) {
result.definedAt_ = definedAt_;
} else {
result.definedAt_ = definedAtBuilder_.build();
}
result.color_ = color_;
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 xla.Hlo.LogicalBufferProto) {
return mergeFrom((xla.Hlo.LogicalBufferProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.LogicalBufferProto other) {
if (other == xla.Hlo.LogicalBufferProto.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (other.hasDefinedAt()) {
mergeDefinedAt(other.getDefinedAt());
}
if (other.getColor() != 0L) {
setColor(other.getColor());
}
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 {
xla.Hlo.LogicalBufferProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.LogicalBufferProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long id_ ;
/**
* int64 id = 1;
*/
public long getId() {
return id_;
}
/**
* int64 id = 1;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* int64 id = 1;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private long size_ ;
/**
* int64 size = 2;
*/
public long getSize() {
return size_;
}
/**
* int64 size = 2;
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* int64 size = 2;
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private xla.Hlo.LogicalBufferProto.Location definedAt_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder> definedAtBuilder_;
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public boolean hasDefinedAt() {
return definedAtBuilder_ != null || definedAt_ != null;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public xla.Hlo.LogicalBufferProto.Location getDefinedAt() {
if (definedAtBuilder_ == null) {
return definedAt_ == null ? xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : definedAt_;
} else {
return definedAtBuilder_.getMessage();
}
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public Builder setDefinedAt(xla.Hlo.LogicalBufferProto.Location value) {
if (definedAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
definedAt_ = value;
onChanged();
} else {
definedAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public Builder setDefinedAt(
xla.Hlo.LogicalBufferProto.Location.Builder builderForValue) {
if (definedAtBuilder_ == null) {
definedAt_ = builderForValue.build();
onChanged();
} else {
definedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public Builder mergeDefinedAt(xla.Hlo.LogicalBufferProto.Location value) {
if (definedAtBuilder_ == null) {
if (definedAt_ != null) {
definedAt_ =
xla.Hlo.LogicalBufferProto.Location.newBuilder(definedAt_).mergeFrom(value).buildPartial();
} else {
definedAt_ = value;
}
onChanged();
} else {
definedAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public Builder clearDefinedAt() {
if (definedAtBuilder_ == null) {
definedAt_ = null;
onChanged();
} else {
definedAt_ = null;
definedAtBuilder_ = null;
}
return this;
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public xla.Hlo.LogicalBufferProto.Location.Builder getDefinedAtBuilder() {
onChanged();
return getDefinedAtFieldBuilder().getBuilder();
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
public xla.Hlo.LogicalBufferProto.LocationOrBuilder getDefinedAtOrBuilder() {
if (definedAtBuilder_ != null) {
return definedAtBuilder_.getMessageOrBuilder();
} else {
return definedAt_ == null ?
xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : definedAt_;
}
}
/**
*
* The location where the buffer is defined.
*
*
* .xla.LogicalBufferProto.Location defined_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder>
getDefinedAtFieldBuilder() {
if (definedAtBuilder_ == null) {
definedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder>(
getDefinedAt(),
getParentForChildren(),
isClean());
definedAt_ = null;
}
return definedAtBuilder_;
}
private long color_ ;
/**
* int64 color = 4;
*/
public long getColor() {
return color_;
}
/**
* int64 color = 4;
*/
public Builder setColor(long value) {
color_ = value;
onChanged();
return this;
}
/**
* int64 color = 4;
*/
public Builder clearColor() {
color_ = 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:xla.LogicalBufferProto)
}
// @@protoc_insertion_point(class_scope:xla.LogicalBufferProto)
private static final xla.Hlo.LogicalBufferProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.LogicalBufferProto();
}
public static xla.Hlo.LogicalBufferProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LogicalBufferProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LogicalBufferProto(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 xla.Hlo.LogicalBufferProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BufferAllocationProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.BufferAllocationProto)
com.google.protobuf.MessageOrBuilder {
/**
* int64 index = 1;
*/
long getIndex();
/**
* int64 size = 2;
*/
long getSize();
/**
* bool is_thread_local = 3;
*/
boolean getIsThreadLocal();
/**
* bool is_tuple = 11;
*/
boolean getIsTuple();
/**
* bool is_entry_computation_parameter = 5;
*/
boolean getIsEntryComputationParameter();
/**
* bool is_constant = 12;
*/
boolean getIsConstant();
/**
* int64 parameter_number = 6;
*/
long getParameterNumber();
/**
* repeated int64 parameter_shape_index = 10;
*/
java.util.List getParameterShapeIndexList();
/**
* repeated int64 parameter_shape_index = 10;
*/
int getParameterShapeIndexCount();
/**
* repeated int64 parameter_shape_index = 10;
*/
long getParameterShapeIndex(int index);
/**
* bool maybe_live_out = 7;
*/
boolean getMaybeLiveOut();
/**
* int64 color = 8;
*/
long getColor();
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
java.util.List
getAssignedList();
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
xla.Hlo.BufferAllocationProto.Assigned getAssigned(int index);
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
int getAssignedCount();
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
java.util.List
getAssignedOrBuilderList();
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
xla.Hlo.BufferAllocationProto.AssignedOrBuilder getAssignedOrBuilder(
int index);
}
/**
*
* Serialization of BufferAllocation.
*
*
* Protobuf type {@code xla.BufferAllocationProto}
*/
public static final class BufferAllocationProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.BufferAllocationProto)
BufferAllocationProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use BufferAllocationProto.newBuilder() to construct.
private BufferAllocationProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private BufferAllocationProto() {
index_ = 0L;
size_ = 0L;
isThreadLocal_ = false;
isTuple_ = false;
isEntryComputationParameter_ = false;
isConstant_ = false;
parameterNumber_ = 0L;
parameterShapeIndex_ = java.util.Collections.emptyList();
maybeLiveOut_ = false;
color_ = 0L;
assigned_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BufferAllocationProto(
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: {
index_ = input.readInt64();
break;
}
case 16: {
size_ = input.readInt64();
break;
}
case 24: {
isThreadLocal_ = input.readBool();
break;
}
case 40: {
isEntryComputationParameter_ = input.readBool();
break;
}
case 48: {
parameterNumber_ = input.readInt64();
break;
}
case 56: {
maybeLiveOut_ = input.readBool();
break;
}
case 64: {
color_ = input.readInt64();
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
assigned_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
assigned_.add(
input.readMessage(xla.Hlo.BufferAllocationProto.Assigned.parser(), extensionRegistry));
break;
}
case 80: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
parameterShapeIndex_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
parameterShapeIndex_.add(input.readInt64());
break;
}
case 82: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080) && input.getBytesUntilLimit() > 0) {
parameterShapeIndex_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
while (input.getBytesUntilLimit() > 0) {
parameterShapeIndex_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 88: {
isTuple_ = input.readBool();
break;
}
case 96: {
isConstant_ = input.readBool();
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_ & 0x00000400) == 0x00000400)) {
assigned_ = java.util.Collections.unmodifiableList(assigned_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
parameterShapeIndex_ = java.util.Collections.unmodifiableList(parameterShapeIndex_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAllocationProto.class, xla.Hlo.BufferAllocationProto.Builder.class);
}
public interface AssignedOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.BufferAllocationProto.Assigned)
com.google.protobuf.MessageOrBuilder {
/**
* int64 logical_buffer_id = 1;
*/
long getLogicalBufferId();
/**
* int64 offset = 2;
*/
long getOffset();
/**
* int64 size = 3;
*/
long getSize();
}
/**
*
* Assigned represents a single LogicalBuffer that is assigned to this
* BufferAllocation.
*
*
* Protobuf type {@code xla.BufferAllocationProto.Assigned}
*/
public static final class Assigned extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.BufferAllocationProto.Assigned)
AssignedOrBuilder {
private static final long serialVersionUID = 0L;
// Use Assigned.newBuilder() to construct.
private Assigned(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Assigned() {
logicalBufferId_ = 0L;
offset_ = 0L;
size_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Assigned(
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: {
logicalBufferId_ = input.readInt64();
break;
}
case 16: {
offset_ = input.readInt64();
break;
}
case 24: {
size_ = input.readInt64();
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 xla.Hlo.internal_static_xla_BufferAllocationProto_Assigned_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_Assigned_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAllocationProto.Assigned.class, xla.Hlo.BufferAllocationProto.Assigned.Builder.class);
}
public static final int LOGICAL_BUFFER_ID_FIELD_NUMBER = 1;
private long logicalBufferId_;
/**
* int64 logical_buffer_id = 1;
*/
public long getLogicalBufferId() {
return logicalBufferId_;
}
public static final int OFFSET_FIELD_NUMBER = 2;
private long offset_;
/**
* int64 offset = 2;
*/
public long getOffset() {
return offset_;
}
public static final int SIZE_FIELD_NUMBER = 3;
private long size_;
/**
* int64 size = 3;
*/
public long getSize() {
return size_;
}
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 (logicalBufferId_ != 0L) {
output.writeInt64(1, logicalBufferId_);
}
if (offset_ != 0L) {
output.writeInt64(2, offset_);
}
if (size_ != 0L) {
output.writeInt64(3, size_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (logicalBufferId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, logicalBufferId_);
}
if (offset_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, offset_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, size_);
}
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 xla.Hlo.BufferAllocationProto.Assigned)) {
return super.equals(obj);
}
xla.Hlo.BufferAllocationProto.Assigned other = (xla.Hlo.BufferAllocationProto.Assigned) obj;
boolean result = true;
result = result && (getLogicalBufferId()
== other.getLogicalBufferId());
result = result && (getOffset()
== other.getOffset());
result = result && (getSize()
== other.getSize());
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) + LOGICAL_BUFFER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLogicalBufferId());
hash = (37 * hash) + OFFSET_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getOffset());
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto.Assigned parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto.Assigned 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 xla.Hlo.BufferAllocationProto.Assigned parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto.Assigned 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 xla.Hlo.BufferAllocationProto.Assigned parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto.Assigned 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(xla.Hlo.BufferAllocationProto.Assigned 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;
}
/**
*
* Assigned represents a single LogicalBuffer that is assigned to this
* BufferAllocation.
*
*
* Protobuf type {@code xla.BufferAllocationProto.Assigned}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.BufferAllocationProto.Assigned)
xla.Hlo.BufferAllocationProto.AssignedOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_Assigned_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_Assigned_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAllocationProto.Assigned.class, xla.Hlo.BufferAllocationProto.Assigned.Builder.class);
}
// Construct using xla.Hlo.BufferAllocationProto.Assigned.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();
logicalBufferId_ = 0L;
offset_ = 0L;
size_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_Assigned_descriptor;
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto.Assigned getDefaultInstanceForType() {
return xla.Hlo.BufferAllocationProto.Assigned.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto.Assigned build() {
xla.Hlo.BufferAllocationProto.Assigned result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto.Assigned buildPartial() {
xla.Hlo.BufferAllocationProto.Assigned result = new xla.Hlo.BufferAllocationProto.Assigned(this);
result.logicalBufferId_ = logicalBufferId_;
result.offset_ = offset_;
result.size_ = size_;
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 xla.Hlo.BufferAllocationProto.Assigned) {
return mergeFrom((xla.Hlo.BufferAllocationProto.Assigned)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.BufferAllocationProto.Assigned other) {
if (other == xla.Hlo.BufferAllocationProto.Assigned.getDefaultInstance()) return this;
if (other.getLogicalBufferId() != 0L) {
setLogicalBufferId(other.getLogicalBufferId());
}
if (other.getOffset() != 0L) {
setOffset(other.getOffset());
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
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 {
xla.Hlo.BufferAllocationProto.Assigned parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.BufferAllocationProto.Assigned) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long logicalBufferId_ ;
/**
* int64 logical_buffer_id = 1;
*/
public long getLogicalBufferId() {
return logicalBufferId_;
}
/**
* int64 logical_buffer_id = 1;
*/
public Builder setLogicalBufferId(long value) {
logicalBufferId_ = value;
onChanged();
return this;
}
/**
* int64 logical_buffer_id = 1;
*/
public Builder clearLogicalBufferId() {
logicalBufferId_ = 0L;
onChanged();
return this;
}
private long offset_ ;
/**
* int64 offset = 2;
*/
public long getOffset() {
return offset_;
}
/**
* int64 offset = 2;
*/
public Builder setOffset(long value) {
offset_ = value;
onChanged();
return this;
}
/**
* int64 offset = 2;
*/
public Builder clearOffset() {
offset_ = 0L;
onChanged();
return this;
}
private long size_ ;
/**
* int64 size = 3;
*/
public long getSize() {
return size_;
}
/**
* int64 size = 3;
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* int64 size = 3;
*/
public Builder clearSize() {
size_ = 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:xla.BufferAllocationProto.Assigned)
}
// @@protoc_insertion_point(class_scope:xla.BufferAllocationProto.Assigned)
private static final xla.Hlo.BufferAllocationProto.Assigned DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.BufferAllocationProto.Assigned();
}
public static xla.Hlo.BufferAllocationProto.Assigned getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Assigned parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Assigned(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 xla.Hlo.BufferAllocationProto.Assigned getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int INDEX_FIELD_NUMBER = 1;
private long index_;
/**
* int64 index = 1;
*/
public long getIndex() {
return index_;
}
public static final int SIZE_FIELD_NUMBER = 2;
private long size_;
/**
* int64 size = 2;
*/
public long getSize() {
return size_;
}
public static final int IS_THREAD_LOCAL_FIELD_NUMBER = 3;
private boolean isThreadLocal_;
/**
* bool is_thread_local = 3;
*/
public boolean getIsThreadLocal() {
return isThreadLocal_;
}
public static final int IS_TUPLE_FIELD_NUMBER = 11;
private boolean isTuple_;
/**
* bool is_tuple = 11;
*/
public boolean getIsTuple() {
return isTuple_;
}
public static final int IS_ENTRY_COMPUTATION_PARAMETER_FIELD_NUMBER = 5;
private boolean isEntryComputationParameter_;
/**
* bool is_entry_computation_parameter = 5;
*/
public boolean getIsEntryComputationParameter() {
return isEntryComputationParameter_;
}
public static final int IS_CONSTANT_FIELD_NUMBER = 12;
private boolean isConstant_;
/**
* bool is_constant = 12;
*/
public boolean getIsConstant() {
return isConstant_;
}
public static final int PARAMETER_NUMBER_FIELD_NUMBER = 6;
private long parameterNumber_;
/**
* int64 parameter_number = 6;
*/
public long getParameterNumber() {
return parameterNumber_;
}
public static final int PARAMETER_SHAPE_INDEX_FIELD_NUMBER = 10;
private java.util.List parameterShapeIndex_;
/**
* repeated int64 parameter_shape_index = 10;
*/
public java.util.List
getParameterShapeIndexList() {
return parameterShapeIndex_;
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public int getParameterShapeIndexCount() {
return parameterShapeIndex_.size();
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public long getParameterShapeIndex(int index) {
return parameterShapeIndex_.get(index);
}
private int parameterShapeIndexMemoizedSerializedSize = -1;
public static final int MAYBE_LIVE_OUT_FIELD_NUMBER = 7;
private boolean maybeLiveOut_;
/**
* bool maybe_live_out = 7;
*/
public boolean getMaybeLiveOut() {
return maybeLiveOut_;
}
public static final int COLOR_FIELD_NUMBER = 8;
private long color_;
/**
* int64 color = 8;
*/
public long getColor() {
return color_;
}
public static final int ASSIGNED_FIELD_NUMBER = 9;
private java.util.List assigned_;
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public java.util.List getAssignedList() {
return assigned_;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public java.util.List
getAssignedOrBuilderList() {
return assigned_;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public int getAssignedCount() {
return assigned_.size();
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.Assigned getAssigned(int index) {
return assigned_.get(index);
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.AssignedOrBuilder getAssignedOrBuilder(
int index) {
return assigned_.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 {
getSerializedSize();
if (index_ != 0L) {
output.writeInt64(1, index_);
}
if (size_ != 0L) {
output.writeInt64(2, size_);
}
if (isThreadLocal_ != false) {
output.writeBool(3, isThreadLocal_);
}
if (isEntryComputationParameter_ != false) {
output.writeBool(5, isEntryComputationParameter_);
}
if (parameterNumber_ != 0L) {
output.writeInt64(6, parameterNumber_);
}
if (maybeLiveOut_ != false) {
output.writeBool(7, maybeLiveOut_);
}
if (color_ != 0L) {
output.writeInt64(8, color_);
}
for (int i = 0; i < assigned_.size(); i++) {
output.writeMessage(9, assigned_.get(i));
}
if (getParameterShapeIndexList().size() > 0) {
output.writeUInt32NoTag(82);
output.writeUInt32NoTag(parameterShapeIndexMemoizedSerializedSize);
}
for (int i = 0; i < parameterShapeIndex_.size(); i++) {
output.writeInt64NoTag(parameterShapeIndex_.get(i));
}
if (isTuple_ != false) {
output.writeBool(11, isTuple_);
}
if (isConstant_ != false) {
output.writeBool(12, isConstant_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (index_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, index_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, size_);
}
if (isThreadLocal_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, isThreadLocal_);
}
if (isEntryComputationParameter_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, isEntryComputationParameter_);
}
if (parameterNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, parameterNumber_);
}
if (maybeLiveOut_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, maybeLiveOut_);
}
if (color_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, color_);
}
for (int i = 0; i < assigned_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, assigned_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < parameterShapeIndex_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(parameterShapeIndex_.get(i));
}
size += dataSize;
if (!getParameterShapeIndexList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
parameterShapeIndexMemoizedSerializedSize = dataSize;
}
if (isTuple_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, isTuple_);
}
if (isConstant_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, isConstant_);
}
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 xla.Hlo.BufferAllocationProto)) {
return super.equals(obj);
}
xla.Hlo.BufferAllocationProto other = (xla.Hlo.BufferAllocationProto) obj;
boolean result = true;
result = result && (getIndex()
== other.getIndex());
result = result && (getSize()
== other.getSize());
result = result && (getIsThreadLocal()
== other.getIsThreadLocal());
result = result && (getIsTuple()
== other.getIsTuple());
result = result && (getIsEntryComputationParameter()
== other.getIsEntryComputationParameter());
result = result && (getIsConstant()
== other.getIsConstant());
result = result && (getParameterNumber()
== other.getParameterNumber());
result = result && getParameterShapeIndexList()
.equals(other.getParameterShapeIndexList());
result = result && (getMaybeLiveOut()
== other.getMaybeLiveOut());
result = result && (getColor()
== other.getColor());
result = result && getAssignedList()
.equals(other.getAssignedList());
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) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIndex());
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (37 * hash) + IS_THREAD_LOCAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsThreadLocal());
hash = (37 * hash) + IS_TUPLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsTuple());
hash = (37 * hash) + IS_ENTRY_COMPUTATION_PARAMETER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsEntryComputationParameter());
hash = (37 * hash) + IS_CONSTANT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsConstant());
hash = (37 * hash) + PARAMETER_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getParameterNumber());
if (getParameterShapeIndexCount() > 0) {
hash = (37 * hash) + PARAMETER_SHAPE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getParameterShapeIndexList().hashCode();
}
hash = (37 * hash) + MAYBE_LIVE_OUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMaybeLiveOut());
hash = (37 * hash) + COLOR_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getColor());
if (getAssignedCount() > 0) {
hash = (37 * hash) + ASSIGNED_FIELD_NUMBER;
hash = (53 * hash) + getAssignedList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.BufferAllocationProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAllocationProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAllocationProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto 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 xla.Hlo.BufferAllocationProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto 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 xla.Hlo.BufferAllocationProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAllocationProto 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(xla.Hlo.BufferAllocationProto 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;
}
/**
*
* Serialization of BufferAllocation.
*
*
* Protobuf type {@code xla.BufferAllocationProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.BufferAllocationProto)
xla.Hlo.BufferAllocationProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAllocationProto.class, xla.Hlo.BufferAllocationProto.Builder.class);
}
// Construct using xla.Hlo.BufferAllocationProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAssignedFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
index_ = 0L;
size_ = 0L;
isThreadLocal_ = false;
isTuple_ = false;
isEntryComputationParameter_ = false;
isConstant_ = false;
parameterNumber_ = 0L;
parameterShapeIndex_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
maybeLiveOut_ = false;
color_ = 0L;
if (assignedBuilder_ == null) {
assigned_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
} else {
assignedBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_BufferAllocationProto_descriptor;
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto getDefaultInstanceForType() {
return xla.Hlo.BufferAllocationProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto build() {
xla.Hlo.BufferAllocationProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.BufferAllocationProto buildPartial() {
xla.Hlo.BufferAllocationProto result = new xla.Hlo.BufferAllocationProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.index_ = index_;
result.size_ = size_;
result.isThreadLocal_ = isThreadLocal_;
result.isTuple_ = isTuple_;
result.isEntryComputationParameter_ = isEntryComputationParameter_;
result.isConstant_ = isConstant_;
result.parameterNumber_ = parameterNumber_;
if (((bitField0_ & 0x00000080) == 0x00000080)) {
parameterShapeIndex_ = java.util.Collections.unmodifiableList(parameterShapeIndex_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.parameterShapeIndex_ = parameterShapeIndex_;
result.maybeLiveOut_ = maybeLiveOut_;
result.color_ = color_;
if (assignedBuilder_ == null) {
if (((bitField0_ & 0x00000400) == 0x00000400)) {
assigned_ = java.util.Collections.unmodifiableList(assigned_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.assigned_ = assigned_;
} else {
result.assigned_ = assignedBuilder_.build();
}
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 xla.Hlo.BufferAllocationProto) {
return mergeFrom((xla.Hlo.BufferAllocationProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.BufferAllocationProto other) {
if (other == xla.Hlo.BufferAllocationProto.getDefaultInstance()) return this;
if (other.getIndex() != 0L) {
setIndex(other.getIndex());
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (other.getIsThreadLocal() != false) {
setIsThreadLocal(other.getIsThreadLocal());
}
if (other.getIsTuple() != false) {
setIsTuple(other.getIsTuple());
}
if (other.getIsEntryComputationParameter() != false) {
setIsEntryComputationParameter(other.getIsEntryComputationParameter());
}
if (other.getIsConstant() != false) {
setIsConstant(other.getIsConstant());
}
if (other.getParameterNumber() != 0L) {
setParameterNumber(other.getParameterNumber());
}
if (!other.parameterShapeIndex_.isEmpty()) {
if (parameterShapeIndex_.isEmpty()) {
parameterShapeIndex_ = other.parameterShapeIndex_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureParameterShapeIndexIsMutable();
parameterShapeIndex_.addAll(other.parameterShapeIndex_);
}
onChanged();
}
if (other.getMaybeLiveOut() != false) {
setMaybeLiveOut(other.getMaybeLiveOut());
}
if (other.getColor() != 0L) {
setColor(other.getColor());
}
if (assignedBuilder_ == null) {
if (!other.assigned_.isEmpty()) {
if (assigned_.isEmpty()) {
assigned_ = other.assigned_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureAssignedIsMutable();
assigned_.addAll(other.assigned_);
}
onChanged();
}
} else {
if (!other.assigned_.isEmpty()) {
if (assignedBuilder_.isEmpty()) {
assignedBuilder_.dispose();
assignedBuilder_ = null;
assigned_ = other.assigned_;
bitField0_ = (bitField0_ & ~0x00000400);
assignedBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAssignedFieldBuilder() : null;
} else {
assignedBuilder_.addAllMessages(other.assigned_);
}
}
}
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 {
xla.Hlo.BufferAllocationProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.BufferAllocationProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long index_ ;
/**
* int64 index = 1;
*/
public long getIndex() {
return index_;
}
/**
* int64 index = 1;
*/
public Builder setIndex(long value) {
index_ = value;
onChanged();
return this;
}
/**
* int64 index = 1;
*/
public Builder clearIndex() {
index_ = 0L;
onChanged();
return this;
}
private long size_ ;
/**
* int64 size = 2;
*/
public long getSize() {
return size_;
}
/**
* int64 size = 2;
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* int64 size = 2;
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private boolean isThreadLocal_ ;
/**
* bool is_thread_local = 3;
*/
public boolean getIsThreadLocal() {
return isThreadLocal_;
}
/**
* bool is_thread_local = 3;
*/
public Builder setIsThreadLocal(boolean value) {
isThreadLocal_ = value;
onChanged();
return this;
}
/**
* bool is_thread_local = 3;
*/
public Builder clearIsThreadLocal() {
isThreadLocal_ = false;
onChanged();
return this;
}
private boolean isTuple_ ;
/**
* bool is_tuple = 11;
*/
public boolean getIsTuple() {
return isTuple_;
}
/**
* bool is_tuple = 11;
*/
public Builder setIsTuple(boolean value) {
isTuple_ = value;
onChanged();
return this;
}
/**
* bool is_tuple = 11;
*/
public Builder clearIsTuple() {
isTuple_ = false;
onChanged();
return this;
}
private boolean isEntryComputationParameter_ ;
/**
* bool is_entry_computation_parameter = 5;
*/
public boolean getIsEntryComputationParameter() {
return isEntryComputationParameter_;
}
/**
* bool is_entry_computation_parameter = 5;
*/
public Builder setIsEntryComputationParameter(boolean value) {
isEntryComputationParameter_ = value;
onChanged();
return this;
}
/**
* bool is_entry_computation_parameter = 5;
*/
public Builder clearIsEntryComputationParameter() {
isEntryComputationParameter_ = false;
onChanged();
return this;
}
private boolean isConstant_ ;
/**
* bool is_constant = 12;
*/
public boolean getIsConstant() {
return isConstant_;
}
/**
* bool is_constant = 12;
*/
public Builder setIsConstant(boolean value) {
isConstant_ = value;
onChanged();
return this;
}
/**
* bool is_constant = 12;
*/
public Builder clearIsConstant() {
isConstant_ = false;
onChanged();
return this;
}
private long parameterNumber_ ;
/**
* int64 parameter_number = 6;
*/
public long getParameterNumber() {
return parameterNumber_;
}
/**
* int64 parameter_number = 6;
*/
public Builder setParameterNumber(long value) {
parameterNumber_ = value;
onChanged();
return this;
}
/**
* int64 parameter_number = 6;
*/
public Builder clearParameterNumber() {
parameterNumber_ = 0L;
onChanged();
return this;
}
private java.util.List parameterShapeIndex_ = java.util.Collections.emptyList();
private void ensureParameterShapeIndexIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
parameterShapeIndex_ = new java.util.ArrayList(parameterShapeIndex_);
bitField0_ |= 0x00000080;
}
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public java.util.List
getParameterShapeIndexList() {
return java.util.Collections.unmodifiableList(parameterShapeIndex_);
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public int getParameterShapeIndexCount() {
return parameterShapeIndex_.size();
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public long getParameterShapeIndex(int index) {
return parameterShapeIndex_.get(index);
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public Builder setParameterShapeIndex(
int index, long value) {
ensureParameterShapeIndexIsMutable();
parameterShapeIndex_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public Builder addParameterShapeIndex(long value) {
ensureParameterShapeIndexIsMutable();
parameterShapeIndex_.add(value);
onChanged();
return this;
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public Builder addAllParameterShapeIndex(
java.lang.Iterable values) {
ensureParameterShapeIndexIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parameterShapeIndex_);
onChanged();
return this;
}
/**
* repeated int64 parameter_shape_index = 10;
*/
public Builder clearParameterShapeIndex() {
parameterShapeIndex_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
private boolean maybeLiveOut_ ;
/**
* bool maybe_live_out = 7;
*/
public boolean getMaybeLiveOut() {
return maybeLiveOut_;
}
/**
* bool maybe_live_out = 7;
*/
public Builder setMaybeLiveOut(boolean value) {
maybeLiveOut_ = value;
onChanged();
return this;
}
/**
* bool maybe_live_out = 7;
*/
public Builder clearMaybeLiveOut() {
maybeLiveOut_ = false;
onChanged();
return this;
}
private long color_ ;
/**
* int64 color = 8;
*/
public long getColor() {
return color_;
}
/**
* int64 color = 8;
*/
public Builder setColor(long value) {
color_ = value;
onChanged();
return this;
}
/**
* int64 color = 8;
*/
public Builder clearColor() {
color_ = 0L;
onChanged();
return this;
}
private java.util.List assigned_ =
java.util.Collections.emptyList();
private void ensureAssignedIsMutable() {
if (!((bitField0_ & 0x00000400) == 0x00000400)) {
assigned_ = new java.util.ArrayList(assigned_);
bitField0_ |= 0x00000400;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.BufferAllocationProto.Assigned, xla.Hlo.BufferAllocationProto.Assigned.Builder, xla.Hlo.BufferAllocationProto.AssignedOrBuilder> assignedBuilder_;
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public java.util.List getAssignedList() {
if (assignedBuilder_ == null) {
return java.util.Collections.unmodifiableList(assigned_);
} else {
return assignedBuilder_.getMessageList();
}
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public int getAssignedCount() {
if (assignedBuilder_ == null) {
return assigned_.size();
} else {
return assignedBuilder_.getCount();
}
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.Assigned getAssigned(int index) {
if (assignedBuilder_ == null) {
return assigned_.get(index);
} else {
return assignedBuilder_.getMessage(index);
}
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder setAssigned(
int index, xla.Hlo.BufferAllocationProto.Assigned value) {
if (assignedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssignedIsMutable();
assigned_.set(index, value);
onChanged();
} else {
assignedBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder setAssigned(
int index, xla.Hlo.BufferAllocationProto.Assigned.Builder builderForValue) {
if (assignedBuilder_ == null) {
ensureAssignedIsMutable();
assigned_.set(index, builderForValue.build());
onChanged();
} else {
assignedBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder addAssigned(xla.Hlo.BufferAllocationProto.Assigned value) {
if (assignedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssignedIsMutable();
assigned_.add(value);
onChanged();
} else {
assignedBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder addAssigned(
int index, xla.Hlo.BufferAllocationProto.Assigned value) {
if (assignedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssignedIsMutable();
assigned_.add(index, value);
onChanged();
} else {
assignedBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder addAssigned(
xla.Hlo.BufferAllocationProto.Assigned.Builder builderForValue) {
if (assignedBuilder_ == null) {
ensureAssignedIsMutable();
assigned_.add(builderForValue.build());
onChanged();
} else {
assignedBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder addAssigned(
int index, xla.Hlo.BufferAllocationProto.Assigned.Builder builderForValue) {
if (assignedBuilder_ == null) {
ensureAssignedIsMutable();
assigned_.add(index, builderForValue.build());
onChanged();
} else {
assignedBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder addAllAssigned(
java.lang.Iterable values) {
if (assignedBuilder_ == null) {
ensureAssignedIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, assigned_);
onChanged();
} else {
assignedBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder clearAssigned() {
if (assignedBuilder_ == null) {
assigned_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
} else {
assignedBuilder_.clear();
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public Builder removeAssigned(int index) {
if (assignedBuilder_ == null) {
ensureAssignedIsMutable();
assigned_.remove(index);
onChanged();
} else {
assignedBuilder_.remove(index);
}
return this;
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.Assigned.Builder getAssignedBuilder(
int index) {
return getAssignedFieldBuilder().getBuilder(index);
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.AssignedOrBuilder getAssignedOrBuilder(
int index) {
if (assignedBuilder_ == null) {
return assigned_.get(index); } else {
return assignedBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public java.util.List
getAssignedOrBuilderList() {
if (assignedBuilder_ != null) {
return assignedBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(assigned_);
}
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.Assigned.Builder addAssignedBuilder() {
return getAssignedFieldBuilder().addBuilder(
xla.Hlo.BufferAllocationProto.Assigned.getDefaultInstance());
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public xla.Hlo.BufferAllocationProto.Assigned.Builder addAssignedBuilder(
int index) {
return getAssignedFieldBuilder().addBuilder(
index, xla.Hlo.BufferAllocationProto.Assigned.getDefaultInstance());
}
/**
* repeated .xla.BufferAllocationProto.Assigned assigned = 9;
*/
public java.util.List
getAssignedBuilderList() {
return getAssignedFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.BufferAllocationProto.Assigned, xla.Hlo.BufferAllocationProto.Assigned.Builder, xla.Hlo.BufferAllocationProto.AssignedOrBuilder>
getAssignedFieldBuilder() {
if (assignedBuilder_ == null) {
assignedBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.BufferAllocationProto.Assigned, xla.Hlo.BufferAllocationProto.Assigned.Builder, xla.Hlo.BufferAllocationProto.AssignedOrBuilder>(
assigned_,
((bitField0_ & 0x00000400) == 0x00000400),
getParentForChildren(),
isClean());
assigned_ = null;
}
return assignedBuilder_;
}
@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:xla.BufferAllocationProto)
}
// @@protoc_insertion_point(class_scope:xla.BufferAllocationProto)
private static final xla.Hlo.BufferAllocationProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.BufferAllocationProto();
}
public static xla.Hlo.BufferAllocationProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BufferAllocationProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BufferAllocationProto(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 xla.Hlo.BufferAllocationProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HeapSimulatorTraceOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HeapSimulatorTrace)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
java.util.List
getEventsList();
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
xla.Hlo.HeapSimulatorTrace.Event getEvents(int index);
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
int getEventsCount();
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
java.util.List
getEventsOrBuilderList();
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
xla.Hlo.HeapSimulatorTrace.EventOrBuilder getEventsOrBuilder(
int index);
/**
* bool whole_module_simulation = 2;
*/
boolean getWholeModuleSimulation();
}
/**
*
* A trace of a HeapSimulator run.
*
*
* Protobuf type {@code xla.HeapSimulatorTrace}
*/
public static final class HeapSimulatorTrace extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HeapSimulatorTrace)
HeapSimulatorTraceOrBuilder {
private static final long serialVersionUID = 0L;
// Use HeapSimulatorTrace.newBuilder() to construct.
private HeapSimulatorTrace(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HeapSimulatorTrace() {
events_ = java.util.Collections.emptyList();
wholeModuleSimulation_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HeapSimulatorTrace(
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)) {
events_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
events_.add(
input.readMessage(xla.Hlo.HeapSimulatorTrace.Event.parser(), extensionRegistry));
break;
}
case 16: {
wholeModuleSimulation_ = input.readBool();
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_ & 0x00000001) == 0x00000001)) {
events_ = java.util.Collections.unmodifiableList(events_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HeapSimulatorTrace.class, xla.Hlo.HeapSimulatorTrace.Builder.class);
}
public interface EventOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HeapSimulatorTrace.Event)
com.google.protobuf.MessageOrBuilder {
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
int getKindValue();
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
xla.Hlo.HeapSimulatorTrace.Event.Kind getKind();
/**
*
* The id of the LogicalBuffer that the event applies to.
*
*
* int64 buffer_id = 2;
*/
long getBufferId();
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
java.lang.String getComputationName();
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
com.google.protobuf.ByteString
getComputationNameBytes();
/**
* string instruction_name = 4;
*/
java.lang.String getInstructionName();
/**
* string instruction_name = 4;
*/
com.google.protobuf.ByteString
getInstructionNameBytes();
/**
*
* The id of the canonical LogicalBuffer that the buffer shares with. Only
* set for SHARE_WITH events.
*
*
* int64 share_with_canonical_id = 5;
*/
long getShareWithCanonicalId();
}
/**
*
* The trace includes a list of events, where each event describes one action
* performed by the heap simulator.
*
*
* Protobuf type {@code xla.HeapSimulatorTrace.Event}
*/
public static final class Event extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HeapSimulatorTrace.Event)
EventOrBuilder {
private static final long serialVersionUID = 0L;
// Use Event.newBuilder() to construct.
private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Event() {
kind_ = 0;
bufferId_ = 0L;
computationName_ = "";
instructionName_ = "";
shareWithCanonicalId_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Event(
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: {
int rawValue = input.readEnum();
kind_ = rawValue;
break;
}
case 16: {
bufferId_ = input.readInt64();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
computationName_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
instructionName_ = s;
break;
}
case 40: {
shareWithCanonicalId_ = input.readInt64();
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 xla.Hlo.internal_static_xla_HeapSimulatorTrace_Event_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HeapSimulatorTrace.Event.class, xla.Hlo.HeapSimulatorTrace.Event.Builder.class);
}
/**
* Protobuf enum {@code xla.HeapSimulatorTrace.Event.Kind}
*/
public enum Kind
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* A memory region was allocated for the buffer.
*
*
* ALLOC = 0;
*/
ALLOC(0),
/**
*
* A memory region was freed for the buffer.
*
*
* FREE = 1;
*/
FREE(1),
/**
*
* A buffer was shared with another (canonical) buffer. This is similar to
* ALLOC, except that instead of allocating a new region of memory, the
* memory region of the canonical buffer is directly re-used. Multiple
* buffers may share with the same canonical buffer. The lifetime of the
* canonical buffer is extended to the union of all lifetimes.
*
*
* SHARE_WITH = 2;
*/
SHARE_WITH(2),
UNRECOGNIZED(-1),
;
/**
*
* A memory region was allocated for the buffer.
*
*
* ALLOC = 0;
*/
public static final int ALLOC_VALUE = 0;
/**
*
* A memory region was freed for the buffer.
*
*
* FREE = 1;
*/
public static final int FREE_VALUE = 1;
/**
*
* A buffer was shared with another (canonical) buffer. This is similar to
* ALLOC, except that instead of allocating a new region of memory, the
* memory region of the canonical buffer is directly re-used. Multiple
* buffers may share with the same canonical buffer. The lifetime of the
* canonical buffer is extended to the union of all lifetimes.
*
*
* SHARE_WITH = 2;
*/
public static final int SHARE_WITH_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Kind valueOf(int value) {
return forNumber(value);
}
public static Kind forNumber(int value) {
switch (value) {
case 0: return ALLOC;
case 1: return FREE;
case 2: return SHARE_WITH;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Kind> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Kind findValueByNumber(int number) {
return Kind.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return xla.Hlo.HeapSimulatorTrace.Event.getDescriptor().getEnumTypes().get(0);
}
private static final Kind[] VALUES = values();
public static Kind valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Kind(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:xla.HeapSimulatorTrace.Event.Kind)
}
public static final int KIND_FIELD_NUMBER = 1;
private int kind_;
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public int getKindValue() {
return kind_;
}
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event.Kind getKind() {
@SuppressWarnings("deprecation")
xla.Hlo.HeapSimulatorTrace.Event.Kind result = xla.Hlo.HeapSimulatorTrace.Event.Kind.valueOf(kind_);
return result == null ? xla.Hlo.HeapSimulatorTrace.Event.Kind.UNRECOGNIZED : result;
}
public static final int BUFFER_ID_FIELD_NUMBER = 2;
private long bufferId_;
/**
*
* The id of the LogicalBuffer that the event applies to.
*
*
* int64 buffer_id = 2;
*/
public long getBufferId() {
return bufferId_;
}
public static final int COMPUTATION_NAME_FIELD_NUMBER = 3;
private volatile java.lang.Object computationName_;
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public java.lang.String getComputationName() {
java.lang.Object ref = computationName_;
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();
computationName_ = s;
return s;
}
}
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public com.google.protobuf.ByteString
getComputationNameBytes() {
java.lang.Object ref = computationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
computationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTRUCTION_NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object instructionName_;
/**
* string instruction_name = 4;
*/
public java.lang.String getInstructionName() {
java.lang.Object ref = instructionName_;
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();
instructionName_ = s;
return s;
}
}
/**
* string instruction_name = 4;
*/
public com.google.protobuf.ByteString
getInstructionNameBytes() {
java.lang.Object ref = instructionName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instructionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHARE_WITH_CANONICAL_ID_FIELD_NUMBER = 5;
private long shareWithCanonicalId_;
/**
*
* The id of the canonical LogicalBuffer that the buffer shares with. Only
* set for SHARE_WITH events.
*
*
* int64 share_with_canonical_id = 5;
*/
public long getShareWithCanonicalId() {
return shareWithCanonicalId_;
}
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 (kind_ != xla.Hlo.HeapSimulatorTrace.Event.Kind.ALLOC.getNumber()) {
output.writeEnum(1, kind_);
}
if (bufferId_ != 0L) {
output.writeInt64(2, bufferId_);
}
if (!getComputationNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, computationName_);
}
if (!getInstructionNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, instructionName_);
}
if (shareWithCanonicalId_ != 0L) {
output.writeInt64(5, shareWithCanonicalId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kind_ != xla.Hlo.HeapSimulatorTrace.Event.Kind.ALLOC.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, kind_);
}
if (bufferId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, bufferId_);
}
if (!getComputationNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, computationName_);
}
if (!getInstructionNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, instructionName_);
}
if (shareWithCanonicalId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, shareWithCanonicalId_);
}
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 xla.Hlo.HeapSimulatorTrace.Event)) {
return super.equals(obj);
}
xla.Hlo.HeapSimulatorTrace.Event other = (xla.Hlo.HeapSimulatorTrace.Event) obj;
boolean result = true;
result = result && kind_ == other.kind_;
result = result && (getBufferId()
== other.getBufferId());
result = result && getComputationName()
.equals(other.getComputationName());
result = result && getInstructionName()
.equals(other.getInstructionName());
result = result && (getShareWithCanonicalId()
== other.getShareWithCanonicalId());
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) + KIND_FIELD_NUMBER;
hash = (53 * hash) + kind_;
hash = (37 * hash) + BUFFER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBufferId());
hash = (37 * hash) + COMPUTATION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getComputationName().hashCode();
hash = (37 * hash) + INSTRUCTION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getInstructionName().hashCode();
hash = (37 * hash) + SHARE_WITH_CANONICAL_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getShareWithCanonicalId());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace.Event parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace.Event 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 xla.Hlo.HeapSimulatorTrace.Event parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace.Event 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 xla.Hlo.HeapSimulatorTrace.Event parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace.Event 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(xla.Hlo.HeapSimulatorTrace.Event 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;
}
/**
*
* The trace includes a list of events, where each event describes one action
* performed by the heap simulator.
*
*
* Protobuf type {@code xla.HeapSimulatorTrace.Event}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HeapSimulatorTrace.Event)
xla.Hlo.HeapSimulatorTrace.EventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_Event_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HeapSimulatorTrace.Event.class, xla.Hlo.HeapSimulatorTrace.Event.Builder.class);
}
// Construct using xla.Hlo.HeapSimulatorTrace.Event.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();
kind_ = 0;
bufferId_ = 0L;
computationName_ = "";
instructionName_ = "";
shareWithCanonicalId_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_Event_descriptor;
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace.Event getDefaultInstanceForType() {
return xla.Hlo.HeapSimulatorTrace.Event.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace.Event build() {
xla.Hlo.HeapSimulatorTrace.Event result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace.Event buildPartial() {
xla.Hlo.HeapSimulatorTrace.Event result = new xla.Hlo.HeapSimulatorTrace.Event(this);
result.kind_ = kind_;
result.bufferId_ = bufferId_;
result.computationName_ = computationName_;
result.instructionName_ = instructionName_;
result.shareWithCanonicalId_ = shareWithCanonicalId_;
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 xla.Hlo.HeapSimulatorTrace.Event) {
return mergeFrom((xla.Hlo.HeapSimulatorTrace.Event)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HeapSimulatorTrace.Event other) {
if (other == xla.Hlo.HeapSimulatorTrace.Event.getDefaultInstance()) return this;
if (other.kind_ != 0) {
setKindValue(other.getKindValue());
}
if (other.getBufferId() != 0L) {
setBufferId(other.getBufferId());
}
if (!other.getComputationName().isEmpty()) {
computationName_ = other.computationName_;
onChanged();
}
if (!other.getInstructionName().isEmpty()) {
instructionName_ = other.instructionName_;
onChanged();
}
if (other.getShareWithCanonicalId() != 0L) {
setShareWithCanonicalId(other.getShareWithCanonicalId());
}
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 {
xla.Hlo.HeapSimulatorTrace.Event parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HeapSimulatorTrace.Event) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int kind_ = 0;
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public int getKindValue() {
return kind_;
}
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public Builder setKindValue(int value) {
kind_ = value;
onChanged();
return this;
}
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event.Kind getKind() {
@SuppressWarnings("deprecation")
xla.Hlo.HeapSimulatorTrace.Event.Kind result = xla.Hlo.HeapSimulatorTrace.Event.Kind.valueOf(kind_);
return result == null ? xla.Hlo.HeapSimulatorTrace.Event.Kind.UNRECOGNIZED : result;
}
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public Builder setKind(xla.Hlo.HeapSimulatorTrace.Event.Kind value) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value.getNumber();
onChanged();
return this;
}
/**
* .xla.HeapSimulatorTrace.Event.Kind kind = 1;
*/
public Builder clearKind() {
kind_ = 0;
onChanged();
return this;
}
private long bufferId_ ;
/**
*
* The id of the LogicalBuffer that the event applies to.
*
*
* int64 buffer_id = 2;
*/
public long getBufferId() {
return bufferId_;
}
/**
*
* The id of the LogicalBuffer that the event applies to.
*
*
* int64 buffer_id = 2;
*/
public Builder setBufferId(long value) {
bufferId_ = value;
onChanged();
return this;
}
/**
*
* The id of the LogicalBuffer that the event applies to.
*
*
* int64 buffer_id = 2;
*/
public Builder clearBufferId() {
bufferId_ = 0L;
onChanged();
return this;
}
private java.lang.Object computationName_ = "";
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public java.lang.String getComputationName() {
java.lang.Object ref = computationName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
computationName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public com.google.protobuf.ByteString
getComputationNameBytes() {
java.lang.Object ref = computationName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
computationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public Builder setComputationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
computationName_ = value;
onChanged();
return this;
}
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public Builder clearComputationName() {
computationName_ = getDefaultInstance().getComputationName();
onChanged();
return this;
}
/**
*
* The HloInstruction that the simulation was processing that caused this
* event to occur, identified by its computation and instruction name. E.g.
* buffers defined by instruction A are allocated when processing A.
*
*
* string computation_name = 3;
*/
public Builder setComputationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
computationName_ = value;
onChanged();
return this;
}
private java.lang.Object instructionName_ = "";
/**
* string instruction_name = 4;
*/
public java.lang.String getInstructionName() {
java.lang.Object ref = instructionName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instructionName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string instruction_name = 4;
*/
public com.google.protobuf.ByteString
getInstructionNameBytes() {
java.lang.Object ref = instructionName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instructionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string instruction_name = 4;
*/
public Builder setInstructionName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
instructionName_ = value;
onChanged();
return this;
}
/**
* string instruction_name = 4;
*/
public Builder clearInstructionName() {
instructionName_ = getDefaultInstance().getInstructionName();
onChanged();
return this;
}
/**
* string instruction_name = 4;
*/
public Builder setInstructionNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
instructionName_ = value;
onChanged();
return this;
}
private long shareWithCanonicalId_ ;
/**
*
* The id of the canonical LogicalBuffer that the buffer shares with. Only
* set for SHARE_WITH events.
*
*
* int64 share_with_canonical_id = 5;
*/
public long getShareWithCanonicalId() {
return shareWithCanonicalId_;
}
/**
*
* The id of the canonical LogicalBuffer that the buffer shares with. Only
* set for SHARE_WITH events.
*
*
* int64 share_with_canonical_id = 5;
*/
public Builder setShareWithCanonicalId(long value) {
shareWithCanonicalId_ = value;
onChanged();
return this;
}
/**
*
* The id of the canonical LogicalBuffer that the buffer shares with. Only
* set for SHARE_WITH events.
*
*
* int64 share_with_canonical_id = 5;
*/
public Builder clearShareWithCanonicalId() {
shareWithCanonicalId_ = 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:xla.HeapSimulatorTrace.Event)
}
// @@protoc_insertion_point(class_scope:xla.HeapSimulatorTrace.Event)
private static final xla.Hlo.HeapSimulatorTrace.Event DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HeapSimulatorTrace.Event();
}
public static xla.Hlo.HeapSimulatorTrace.Event getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Event parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Event(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 xla.Hlo.HeapSimulatorTrace.Event getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int EVENTS_FIELD_NUMBER = 1;
private java.util.List events_;
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public java.util.List getEventsList() {
return events_;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public java.util.List
getEventsOrBuilderList() {
return events_;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public int getEventsCount() {
return events_.size();
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event getEvents(int index) {
return events_.get(index);
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.EventOrBuilder getEventsOrBuilder(
int index) {
return events_.get(index);
}
public static final int WHOLE_MODULE_SIMULATION_FIELD_NUMBER = 2;
private boolean wholeModuleSimulation_;
/**
* bool whole_module_simulation = 2;
*/
public boolean getWholeModuleSimulation() {
return wholeModuleSimulation_;
}
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 {
for (int i = 0; i < events_.size(); i++) {
output.writeMessage(1, events_.get(i));
}
if (wholeModuleSimulation_ != false) {
output.writeBool(2, wholeModuleSimulation_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < events_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, events_.get(i));
}
if (wholeModuleSimulation_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, wholeModuleSimulation_);
}
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 xla.Hlo.HeapSimulatorTrace)) {
return super.equals(obj);
}
xla.Hlo.HeapSimulatorTrace other = (xla.Hlo.HeapSimulatorTrace) obj;
boolean result = true;
result = result && getEventsList()
.equals(other.getEventsList());
result = result && (getWholeModuleSimulation()
== other.getWholeModuleSimulation());
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 (getEventsCount() > 0) {
hash = (37 * hash) + EVENTS_FIELD_NUMBER;
hash = (53 * hash) + getEventsList().hashCode();
}
hash = (37 * hash) + WHOLE_MODULE_SIMULATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getWholeModuleSimulation());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HeapSimulatorTrace parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace 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 xla.Hlo.HeapSimulatorTrace parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace 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 xla.Hlo.HeapSimulatorTrace parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HeapSimulatorTrace 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(xla.Hlo.HeapSimulatorTrace 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 of a HeapSimulator run.
*
*
* Protobuf type {@code xla.HeapSimulatorTrace}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HeapSimulatorTrace)
xla.Hlo.HeapSimulatorTraceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HeapSimulatorTrace.class, xla.Hlo.HeapSimulatorTrace.Builder.class);
}
// Construct using xla.Hlo.HeapSimulatorTrace.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEventsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (eventsBuilder_ == null) {
events_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
eventsBuilder_.clear();
}
wholeModuleSimulation_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HeapSimulatorTrace_descriptor;
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace getDefaultInstanceForType() {
return xla.Hlo.HeapSimulatorTrace.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace build() {
xla.Hlo.HeapSimulatorTrace result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HeapSimulatorTrace buildPartial() {
xla.Hlo.HeapSimulatorTrace result = new xla.Hlo.HeapSimulatorTrace(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (eventsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
events_ = java.util.Collections.unmodifiableList(events_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.events_ = events_;
} else {
result.events_ = eventsBuilder_.build();
}
result.wholeModuleSimulation_ = wholeModuleSimulation_;
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 xla.Hlo.HeapSimulatorTrace) {
return mergeFrom((xla.Hlo.HeapSimulatorTrace)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HeapSimulatorTrace other) {
if (other == xla.Hlo.HeapSimulatorTrace.getDefaultInstance()) return this;
if (eventsBuilder_ == null) {
if (!other.events_.isEmpty()) {
if (events_.isEmpty()) {
events_ = other.events_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEventsIsMutable();
events_.addAll(other.events_);
}
onChanged();
}
} else {
if (!other.events_.isEmpty()) {
if (eventsBuilder_.isEmpty()) {
eventsBuilder_.dispose();
eventsBuilder_ = null;
events_ = other.events_;
bitField0_ = (bitField0_ & ~0x00000001);
eventsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEventsFieldBuilder() : null;
} else {
eventsBuilder_.addAllMessages(other.events_);
}
}
}
if (other.getWholeModuleSimulation() != false) {
setWholeModuleSimulation(other.getWholeModuleSimulation());
}
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 {
xla.Hlo.HeapSimulatorTrace parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HeapSimulatorTrace) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List events_ =
java.util.Collections.emptyList();
private void ensureEventsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
events_ = new java.util.ArrayList(events_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HeapSimulatorTrace.Event, xla.Hlo.HeapSimulatorTrace.Event.Builder, xla.Hlo.HeapSimulatorTrace.EventOrBuilder> eventsBuilder_;
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public java.util.List getEventsList() {
if (eventsBuilder_ == null) {
return java.util.Collections.unmodifiableList(events_);
} else {
return eventsBuilder_.getMessageList();
}
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public int getEventsCount() {
if (eventsBuilder_ == null) {
return events_.size();
} else {
return eventsBuilder_.getCount();
}
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event getEvents(int index) {
if (eventsBuilder_ == null) {
return events_.get(index);
} else {
return eventsBuilder_.getMessage(index);
}
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder setEvents(
int index, xla.Hlo.HeapSimulatorTrace.Event value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.set(index, value);
onChanged();
} else {
eventsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder setEvents(
int index, xla.Hlo.HeapSimulatorTrace.Event.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.set(index, builderForValue.build());
onChanged();
} else {
eventsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder addEvents(xla.Hlo.HeapSimulatorTrace.Event value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.add(value);
onChanged();
} else {
eventsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder addEvents(
int index, xla.Hlo.HeapSimulatorTrace.Event value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.add(index, value);
onChanged();
} else {
eventsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder addEvents(
xla.Hlo.HeapSimulatorTrace.Event.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.add(builderForValue.build());
onChanged();
} else {
eventsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder addEvents(
int index, xla.Hlo.HeapSimulatorTrace.Event.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.add(index, builderForValue.build());
onChanged();
} else {
eventsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder addAllEvents(
java.lang.Iterable values) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, events_);
onChanged();
} else {
eventsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder clearEvents() {
if (eventsBuilder_ == null) {
events_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
eventsBuilder_.clear();
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public Builder removeEvents(int index) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.remove(index);
onChanged();
} else {
eventsBuilder_.remove(index);
}
return this;
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event.Builder getEventsBuilder(
int index) {
return getEventsFieldBuilder().getBuilder(index);
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.EventOrBuilder getEventsOrBuilder(
int index) {
if (eventsBuilder_ == null) {
return events_.get(index); } else {
return eventsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public java.util.List
getEventsOrBuilderList() {
if (eventsBuilder_ != null) {
return eventsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(events_);
}
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event.Builder addEventsBuilder() {
return getEventsFieldBuilder().addBuilder(
xla.Hlo.HeapSimulatorTrace.Event.getDefaultInstance());
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public xla.Hlo.HeapSimulatorTrace.Event.Builder addEventsBuilder(
int index) {
return getEventsFieldBuilder().addBuilder(
index, xla.Hlo.HeapSimulatorTrace.Event.getDefaultInstance());
}
/**
* repeated .xla.HeapSimulatorTrace.Event events = 1;
*/
public java.util.List
getEventsBuilderList() {
return getEventsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HeapSimulatorTrace.Event, xla.Hlo.HeapSimulatorTrace.Event.Builder, xla.Hlo.HeapSimulatorTrace.EventOrBuilder>
getEventsFieldBuilder() {
if (eventsBuilder_ == null) {
eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HeapSimulatorTrace.Event, xla.Hlo.HeapSimulatorTrace.Event.Builder, xla.Hlo.HeapSimulatorTrace.EventOrBuilder>(
events_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
events_ = null;
}
return eventsBuilder_;
}
private boolean wholeModuleSimulation_ ;
/**
* bool whole_module_simulation = 2;
*/
public boolean getWholeModuleSimulation() {
return wholeModuleSimulation_;
}
/**
* bool whole_module_simulation = 2;
*/
public Builder setWholeModuleSimulation(boolean value) {
wholeModuleSimulation_ = value;
onChanged();
return this;
}
/**
* bool whole_module_simulation = 2;
*/
public Builder clearWholeModuleSimulation() {
wholeModuleSimulation_ = false;
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:xla.HeapSimulatorTrace)
}
// @@protoc_insertion_point(class_scope:xla.HeapSimulatorTrace)
private static final xla.Hlo.HeapSimulatorTrace DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HeapSimulatorTrace();
}
public static xla.Hlo.HeapSimulatorTrace getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HeapSimulatorTrace parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HeapSimulatorTrace(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 xla.Hlo.HeapSimulatorTrace getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HloModuleGroupProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.HloModuleGroupProto)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
java.util.List
getHloModulesList();
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
xla.Hlo.HloModuleProto getHloModules(int index);
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
int getHloModulesCount();
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
java.util.List
getHloModulesOrBuilderList();
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
xla.Hlo.HloModuleProtoOrBuilder getHloModulesOrBuilder(
int index);
}
/**
*
* An abstraction representing a set of HLO module built to run concurrently
* across different devices.
*
*
* Protobuf type {@code xla.HloModuleGroupProto}
*/
public static final class HloModuleGroupProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.HloModuleGroupProto)
HloModuleGroupProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use HloModuleGroupProto.newBuilder() to construct.
private HloModuleGroupProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HloModuleGroupProto() {
name_ = "";
hloModules_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HloModuleGroupProto(
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 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
hloModules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
hloModules_.add(
input.readMessage(xla.Hlo.HloModuleProto.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)) {
hloModules_ = java.util.Collections.unmodifiableList(hloModules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloModuleGroupProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloModuleGroupProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloModuleGroupProto.class, xla.Hlo.HloModuleGroupProto.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* 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;
}
}
/**
* 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 HLO_MODULES_FIELD_NUMBER = 2;
private java.util.List hloModules_;
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public java.util.List getHloModulesList() {
return hloModules_;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public java.util.List
getHloModulesOrBuilderList() {
return hloModules_;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public int getHloModulesCount() {
return hloModules_.size();
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProto getHloModules(int index) {
return hloModules_.get(index);
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProtoOrBuilder getHloModulesOrBuilder(
int index) {
return hloModules_.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 {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < hloModules_.size(); i++) {
output.writeMessage(2, hloModules_.get(i));
}
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_);
}
for (int i = 0; i < hloModules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, hloModules_.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 xla.Hlo.HloModuleGroupProto)) {
return super.equals(obj);
}
xla.Hlo.HloModuleGroupProto other = (xla.Hlo.HloModuleGroupProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getHloModulesList()
.equals(other.getHloModulesList());
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();
if (getHloModulesCount() > 0) {
hash = (37 * hash) + HLO_MODULES_FIELD_NUMBER;
hash = (53 * hash) + getHloModulesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.HloModuleGroupProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.HloModuleGroupProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleGroupProto 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 xla.Hlo.HloModuleGroupProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleGroupProto 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 xla.Hlo.HloModuleGroupProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.HloModuleGroupProto 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(xla.Hlo.HloModuleGroupProto 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;
}
/**
*
* An abstraction representing a set of HLO module built to run concurrently
* across different devices.
*
*
* Protobuf type {@code xla.HloModuleGroupProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.HloModuleGroupProto)
xla.Hlo.HloModuleGroupProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_HloModuleGroupProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_HloModuleGroupProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.HloModuleGroupProto.class, xla.Hlo.HloModuleGroupProto.Builder.class);
}
// Construct using xla.Hlo.HloModuleGroupProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHloModulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
if (hloModulesBuilder_ == null) {
hloModules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
hloModulesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_HloModuleGroupProto_descriptor;
}
@java.lang.Override
public xla.Hlo.HloModuleGroupProto getDefaultInstanceForType() {
return xla.Hlo.HloModuleGroupProto.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.HloModuleGroupProto build() {
xla.Hlo.HloModuleGroupProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.HloModuleGroupProto buildPartial() {
xla.Hlo.HloModuleGroupProto result = new xla.Hlo.HloModuleGroupProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
if (hloModulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
hloModules_ = java.util.Collections.unmodifiableList(hloModules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.hloModules_ = hloModules_;
} else {
result.hloModules_ = hloModulesBuilder_.build();
}
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 xla.Hlo.HloModuleGroupProto) {
return mergeFrom((xla.Hlo.HloModuleGroupProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.HloModuleGroupProto other) {
if (other == xla.Hlo.HloModuleGroupProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (hloModulesBuilder_ == null) {
if (!other.hloModules_.isEmpty()) {
if (hloModules_.isEmpty()) {
hloModules_ = other.hloModules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureHloModulesIsMutable();
hloModules_.addAll(other.hloModules_);
}
onChanged();
}
} else {
if (!other.hloModules_.isEmpty()) {
if (hloModulesBuilder_.isEmpty()) {
hloModulesBuilder_.dispose();
hloModulesBuilder_ = null;
hloModules_ = other.hloModules_;
bitField0_ = (bitField0_ & ~0x00000002);
hloModulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHloModulesFieldBuilder() : null;
} else {
hloModulesBuilder_.addAllMessages(other.hloModules_);
}
}
}
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 {
xla.Hlo.HloModuleGroupProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.HloModuleGroupProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* 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 java.util.List hloModules_ =
java.util.Collections.emptyList();
private void ensureHloModulesIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
hloModules_ = new java.util.ArrayList(hloModules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloModuleProto, xla.Hlo.HloModuleProto.Builder, xla.Hlo.HloModuleProtoOrBuilder> hloModulesBuilder_;
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public java.util.List getHloModulesList() {
if (hloModulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(hloModules_);
} else {
return hloModulesBuilder_.getMessageList();
}
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public int getHloModulesCount() {
if (hloModulesBuilder_ == null) {
return hloModules_.size();
} else {
return hloModulesBuilder_.getCount();
}
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProto getHloModules(int index) {
if (hloModulesBuilder_ == null) {
return hloModules_.get(index);
} else {
return hloModulesBuilder_.getMessage(index);
}
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder setHloModules(
int index, xla.Hlo.HloModuleProto value) {
if (hloModulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHloModulesIsMutable();
hloModules_.set(index, value);
onChanged();
} else {
hloModulesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder setHloModules(
int index, xla.Hlo.HloModuleProto.Builder builderForValue) {
if (hloModulesBuilder_ == null) {
ensureHloModulesIsMutable();
hloModules_.set(index, builderForValue.build());
onChanged();
} else {
hloModulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder addHloModules(xla.Hlo.HloModuleProto value) {
if (hloModulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHloModulesIsMutable();
hloModules_.add(value);
onChanged();
} else {
hloModulesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder addHloModules(
int index, xla.Hlo.HloModuleProto value) {
if (hloModulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHloModulesIsMutable();
hloModules_.add(index, value);
onChanged();
} else {
hloModulesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder addHloModules(
xla.Hlo.HloModuleProto.Builder builderForValue) {
if (hloModulesBuilder_ == null) {
ensureHloModulesIsMutable();
hloModules_.add(builderForValue.build());
onChanged();
} else {
hloModulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder addHloModules(
int index, xla.Hlo.HloModuleProto.Builder builderForValue) {
if (hloModulesBuilder_ == null) {
ensureHloModulesIsMutable();
hloModules_.add(index, builderForValue.build());
onChanged();
} else {
hloModulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder addAllHloModules(
java.lang.Iterable values) {
if (hloModulesBuilder_ == null) {
ensureHloModulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hloModules_);
onChanged();
} else {
hloModulesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder clearHloModules() {
if (hloModulesBuilder_ == null) {
hloModules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
hloModulesBuilder_.clear();
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public Builder removeHloModules(int index) {
if (hloModulesBuilder_ == null) {
ensureHloModulesIsMutable();
hloModules_.remove(index);
onChanged();
} else {
hloModulesBuilder_.remove(index);
}
return this;
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProto.Builder getHloModulesBuilder(
int index) {
return getHloModulesFieldBuilder().getBuilder(index);
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProtoOrBuilder getHloModulesOrBuilder(
int index) {
if (hloModulesBuilder_ == null) {
return hloModules_.get(index); } else {
return hloModulesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public java.util.List
getHloModulesOrBuilderList() {
if (hloModulesBuilder_ != null) {
return hloModulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(hloModules_);
}
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProto.Builder addHloModulesBuilder() {
return getHloModulesFieldBuilder().addBuilder(
xla.Hlo.HloModuleProto.getDefaultInstance());
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public xla.Hlo.HloModuleProto.Builder addHloModulesBuilder(
int index) {
return getHloModulesFieldBuilder().addBuilder(
index, xla.Hlo.HloModuleProto.getDefaultInstance());
}
/**
* repeated .xla.HloModuleProto hlo_modules = 2;
*/
public java.util.List
getHloModulesBuilderList() {
return getHloModulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloModuleProto, xla.Hlo.HloModuleProto.Builder, xla.Hlo.HloModuleProtoOrBuilder>
getHloModulesFieldBuilder() {
if (hloModulesBuilder_ == null) {
hloModulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
xla.Hlo.HloModuleProto, xla.Hlo.HloModuleProto.Builder, xla.Hlo.HloModuleProtoOrBuilder>(
hloModules_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
hloModules_ = null;
}
return hloModulesBuilder_;
}
@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:xla.HloModuleGroupProto)
}
// @@protoc_insertion_point(class_scope:xla.HloModuleGroupProto)
private static final xla.Hlo.HloModuleGroupProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.HloModuleGroupProto();
}
public static xla.Hlo.HloModuleGroupProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HloModuleGroupProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HloModuleGroupProto(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 xla.Hlo.HloModuleGroupProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BufferAssignmentProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.BufferAssignmentProto)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
java.util.List
getLogicalBuffersList();
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
xla.Hlo.LogicalBufferProto getLogicalBuffers(int index);
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
int getLogicalBuffersCount();
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
java.util.List
getLogicalBuffersOrBuilderList();
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
xla.Hlo.LogicalBufferProtoOrBuilder getLogicalBuffersOrBuilder(
int index);
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
java.util.List
getBufferAliasesList();
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
xla.Hlo.BufferAssignmentProto.BufferAlias getBufferAliases(int index);
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
int getBufferAliasesCount();
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
java.util.List
getBufferAliasesOrBuilderList();
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
xla.Hlo.BufferAssignmentProto.BufferAliasOrBuilder getBufferAliasesOrBuilder(
int index);
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
java.util.List
getBufferAllocationsList();
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
xla.Hlo.BufferAllocationProto getBufferAllocations(int index);
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
int getBufferAllocationsCount();
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
java.util.List
getBufferAllocationsOrBuilderList();
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
xla.Hlo.BufferAllocationProtoOrBuilder getBufferAllocationsOrBuilder(
int index);
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
java.util.List
getHeapSimulatorTracesList();
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
xla.Hlo.HeapSimulatorTrace getHeapSimulatorTraces(int index);
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
int getHeapSimulatorTracesCount();
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
java.util.List
getHeapSimulatorTracesOrBuilderList();
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
xla.Hlo.HeapSimulatorTraceOrBuilder getHeapSimulatorTracesOrBuilder(
int index);
}
/**
*
* Serialization of BufferAssignment.
*
*
* Protobuf type {@code xla.BufferAssignmentProto}
*/
public static final class BufferAssignmentProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.BufferAssignmentProto)
BufferAssignmentProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use BufferAssignmentProto.newBuilder() to construct.
private BufferAssignmentProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private BufferAssignmentProto() {
logicalBuffers_ = java.util.Collections.emptyList();
bufferAliases_ = java.util.Collections.emptyList();
bufferAllocations_ = java.util.Collections.emptyList();
heapSimulatorTraces_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BufferAssignmentProto(
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)) {
logicalBuffers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
logicalBuffers_.add(
input.readMessage(xla.Hlo.LogicalBufferProto.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
bufferAliases_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
bufferAliases_.add(
input.readMessage(xla.Hlo.BufferAssignmentProto.BufferAlias.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
bufferAllocations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
bufferAllocations_.add(
input.readMessage(xla.Hlo.BufferAllocationProto.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
heapSimulatorTraces_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
heapSimulatorTraces_.add(
input.readMessage(xla.Hlo.HeapSimulatorTrace.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_ & 0x00000001) == 0x00000001)) {
logicalBuffers_ = java.util.Collections.unmodifiableList(logicalBuffers_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
bufferAliases_ = java.util.Collections.unmodifiableList(bufferAliases_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
bufferAllocations_ = java.util.Collections.unmodifiableList(bufferAllocations_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
heapSimulatorTraces_ = java.util.Collections.unmodifiableList(heapSimulatorTraces_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAssignmentProto.class, xla.Hlo.BufferAssignmentProto.Builder.class);
}
public interface BufferAliasOrBuilder extends
// @@protoc_insertion_point(interface_extends:xla.BufferAssignmentProto.BufferAlias)
com.google.protobuf.MessageOrBuilder {
/**
* int64 source_buffer_id = 1;
*/
long getSourceBufferId();
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
boolean hasLocation();
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
xla.Hlo.LogicalBufferProto.Location getLocation();
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
xla.Hlo.LogicalBufferProto.LocationOrBuilder getLocationOrBuilder();
}
/**
*
* Alias represents a source LogicalBuffer, and the buffer location that
* aliases it.
*
*
* Protobuf type {@code xla.BufferAssignmentProto.BufferAlias}
*/
public static final class BufferAlias extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xla.BufferAssignmentProto.BufferAlias)
BufferAliasOrBuilder {
private static final long serialVersionUID = 0L;
// Use BufferAlias.newBuilder() to construct.
private BufferAlias(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private BufferAlias() {
sourceBufferId_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BufferAlias(
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: {
sourceBufferId_ = input.readInt64();
break;
}
case 18: {
xla.Hlo.LogicalBufferProto.Location.Builder subBuilder = null;
if (location_ != null) {
subBuilder = location_.toBuilder();
}
location_ = input.readMessage(xla.Hlo.LogicalBufferProto.Location.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(location_);
location_ = subBuilder.buildPartial();
}
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 xla.Hlo.internal_static_xla_BufferAssignmentProto_BufferAlias_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_BufferAlias_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAssignmentProto.BufferAlias.class, xla.Hlo.BufferAssignmentProto.BufferAlias.Builder.class);
}
public static final int SOURCE_BUFFER_ID_FIELD_NUMBER = 1;
private long sourceBufferId_;
/**
* int64 source_buffer_id = 1;
*/
public long getSourceBufferId() {
return sourceBufferId_;
}
public static final int LOCATION_FIELD_NUMBER = 2;
private xla.Hlo.LogicalBufferProto.Location location_;
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public boolean hasLocation() {
return location_ != null;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public xla.Hlo.LogicalBufferProto.Location getLocation() {
return location_ == null ? xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : location_;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public xla.Hlo.LogicalBufferProto.LocationOrBuilder getLocationOrBuilder() {
return getLocation();
}
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 (sourceBufferId_ != 0L) {
output.writeInt64(1, sourceBufferId_);
}
if (location_ != null) {
output.writeMessage(2, getLocation());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sourceBufferId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, sourceBufferId_);
}
if (location_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getLocation());
}
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 xla.Hlo.BufferAssignmentProto.BufferAlias)) {
return super.equals(obj);
}
xla.Hlo.BufferAssignmentProto.BufferAlias other = (xla.Hlo.BufferAssignmentProto.BufferAlias) obj;
boolean result = true;
result = result && (getSourceBufferId()
== other.getSourceBufferId());
result = result && (hasLocation() == other.hasLocation());
if (hasLocation()) {
result = result && getLocation()
.equals(other.getLocation());
}
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) + SOURCE_BUFFER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSourceBufferId());
if (hasLocation()) {
hash = (37 * hash) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias 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 xla.Hlo.BufferAssignmentProto.BufferAlias parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias 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 xla.Hlo.BufferAssignmentProto.BufferAlias parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias 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(xla.Hlo.BufferAssignmentProto.BufferAlias 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;
}
/**
*
* Alias represents a source LogicalBuffer, and the buffer location that
* aliases it.
*
*
* Protobuf type {@code xla.BufferAssignmentProto.BufferAlias}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xla.BufferAssignmentProto.BufferAlias)
xla.Hlo.BufferAssignmentProto.BufferAliasOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_BufferAlias_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_BufferAlias_fieldAccessorTable
.ensureFieldAccessorsInitialized(
xla.Hlo.BufferAssignmentProto.BufferAlias.class, xla.Hlo.BufferAssignmentProto.BufferAlias.Builder.class);
}
// Construct using xla.Hlo.BufferAssignmentProto.BufferAlias.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();
sourceBufferId_ = 0L;
if (locationBuilder_ == null) {
location_ = null;
} else {
location_ = null;
locationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return xla.Hlo.internal_static_xla_BufferAssignmentProto_BufferAlias_descriptor;
}
@java.lang.Override
public xla.Hlo.BufferAssignmentProto.BufferAlias getDefaultInstanceForType() {
return xla.Hlo.BufferAssignmentProto.BufferAlias.getDefaultInstance();
}
@java.lang.Override
public xla.Hlo.BufferAssignmentProto.BufferAlias build() {
xla.Hlo.BufferAssignmentProto.BufferAlias result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public xla.Hlo.BufferAssignmentProto.BufferAlias buildPartial() {
xla.Hlo.BufferAssignmentProto.BufferAlias result = new xla.Hlo.BufferAssignmentProto.BufferAlias(this);
result.sourceBufferId_ = sourceBufferId_;
if (locationBuilder_ == null) {
result.location_ = location_;
} else {
result.location_ = locationBuilder_.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 xla.Hlo.BufferAssignmentProto.BufferAlias) {
return mergeFrom((xla.Hlo.BufferAssignmentProto.BufferAlias)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(xla.Hlo.BufferAssignmentProto.BufferAlias other) {
if (other == xla.Hlo.BufferAssignmentProto.BufferAlias.getDefaultInstance()) return this;
if (other.getSourceBufferId() != 0L) {
setSourceBufferId(other.getSourceBufferId());
}
if (other.hasLocation()) {
mergeLocation(other.getLocation());
}
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 {
xla.Hlo.BufferAssignmentProto.BufferAlias parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (xla.Hlo.BufferAssignmentProto.BufferAlias) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long sourceBufferId_ ;
/**
* int64 source_buffer_id = 1;
*/
public long getSourceBufferId() {
return sourceBufferId_;
}
/**
* int64 source_buffer_id = 1;
*/
public Builder setSourceBufferId(long value) {
sourceBufferId_ = value;
onChanged();
return this;
}
/**
* int64 source_buffer_id = 1;
*/
public Builder clearSourceBufferId() {
sourceBufferId_ = 0L;
onChanged();
return this;
}
private xla.Hlo.LogicalBufferProto.Location location_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder> locationBuilder_;
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public boolean hasLocation() {
return locationBuilder_ != null || location_ != null;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public xla.Hlo.LogicalBufferProto.Location getLocation() {
if (locationBuilder_ == null) {
return location_ == null ? xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : location_;
} else {
return locationBuilder_.getMessage();
}
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public Builder setLocation(xla.Hlo.LogicalBufferProto.Location value) {
if (locationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
onChanged();
} else {
locationBuilder_.setMessage(value);
}
return this;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public Builder setLocation(
xla.Hlo.LogicalBufferProto.Location.Builder builderForValue) {
if (locationBuilder_ == null) {
location_ = builderForValue.build();
onChanged();
} else {
locationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public Builder mergeLocation(xla.Hlo.LogicalBufferProto.Location value) {
if (locationBuilder_ == null) {
if (location_ != null) {
location_ =
xla.Hlo.LogicalBufferProto.Location.newBuilder(location_).mergeFrom(value).buildPartial();
} else {
location_ = value;
}
onChanged();
} else {
locationBuilder_.mergeFrom(value);
}
return this;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public Builder clearLocation() {
if (locationBuilder_ == null) {
location_ = null;
onChanged();
} else {
location_ = null;
locationBuilder_ = null;
}
return this;
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public xla.Hlo.LogicalBufferProto.Location.Builder getLocationBuilder() {
onChanged();
return getLocationFieldBuilder().getBuilder();
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
public xla.Hlo.LogicalBufferProto.LocationOrBuilder getLocationOrBuilder() {
if (locationBuilder_ != null) {
return locationBuilder_.getMessageOrBuilder();
} else {
return location_ == null ?
xla.Hlo.LogicalBufferProto.Location.getDefaultInstance() : location_;
}
}
/**
* .xla.LogicalBufferProto.Location location = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder>
getLocationFieldBuilder() {
if (locationBuilder_ == null) {
locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
xla.Hlo.LogicalBufferProto.Location, xla.Hlo.LogicalBufferProto.Location.Builder, xla.Hlo.LogicalBufferProto.LocationOrBuilder>(
getLocation(),
getParentForChildren(),
isClean());
location_ = null;
}
return locationBuilder_;
}
@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:xla.BufferAssignmentProto.BufferAlias)
}
// @@protoc_insertion_point(class_scope:xla.BufferAssignmentProto.BufferAlias)
private static final xla.Hlo.BufferAssignmentProto.BufferAlias DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new xla.Hlo.BufferAssignmentProto.BufferAlias();
}
public static xla.Hlo.BufferAssignmentProto.BufferAlias getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BufferAlias parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BufferAlias(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 xla.Hlo.BufferAssignmentProto.BufferAlias getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int LOGICAL_BUFFERS_FIELD_NUMBER = 1;
private java.util.List logicalBuffers_;
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
public java.util.List getLogicalBuffersList() {
return logicalBuffers_;
}
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
public java.util.List
getLogicalBuffersOrBuilderList() {
return logicalBuffers_;
}
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
public int getLogicalBuffersCount() {
return logicalBuffers_.size();
}
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
public xla.Hlo.LogicalBufferProto getLogicalBuffers(int index) {
return logicalBuffers_.get(index);
}
/**
* repeated .xla.LogicalBufferProto logical_buffers = 1;
*/
public xla.Hlo.LogicalBufferProtoOrBuilder getLogicalBuffersOrBuilder(
int index) {
return logicalBuffers_.get(index);
}
public static final int BUFFER_ALIASES_FIELD_NUMBER = 2;
private java.util.List bufferAliases_;
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
public java.util.List getBufferAliasesList() {
return bufferAliases_;
}
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
public java.util.List
getBufferAliasesOrBuilderList() {
return bufferAliases_;
}
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
public int getBufferAliasesCount() {
return bufferAliases_.size();
}
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
public xla.Hlo.BufferAssignmentProto.BufferAlias getBufferAliases(int index) {
return bufferAliases_.get(index);
}
/**
* repeated .xla.BufferAssignmentProto.BufferAlias buffer_aliases = 2;
*/
public xla.Hlo.BufferAssignmentProto.BufferAliasOrBuilder getBufferAliasesOrBuilder(
int index) {
return bufferAliases_.get(index);
}
public static final int BUFFER_ALLOCATIONS_FIELD_NUMBER = 3;
private java.util.List bufferAllocations_;
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
public java.util.List getBufferAllocationsList() {
return bufferAllocations_;
}
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
public java.util.List
getBufferAllocationsOrBuilderList() {
return bufferAllocations_;
}
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
public int getBufferAllocationsCount() {
return bufferAllocations_.size();
}
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
public xla.Hlo.BufferAllocationProto getBufferAllocations(int index) {
return bufferAllocations_.get(index);
}
/**
* repeated .xla.BufferAllocationProto buffer_allocations = 3;
*/
public xla.Hlo.BufferAllocationProtoOrBuilder getBufferAllocationsOrBuilder(
int index) {
return bufferAllocations_.get(index);
}
public static final int HEAP_SIMULATOR_TRACES_FIELD_NUMBER = 4;
private java.util.List heapSimulatorTraces_;
/**
* repeated .xla.HeapSimulatorTrace heap_simulator_traces = 4;
*/
public java.util.List getHeapSimulatorTracesList() {
return heapSimulatorTraces_;
}
/**
*