org.tensorflow.framework.GraphOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto Show documentation
Show all versions of proto Show documentation
Java API for TensorFlow protocol buffers.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/config.proto
package org.tensorflow.framework;
/**
* Protobuf type {@code tensorflow.GraphOptions}
*/
public final class GraphOptions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.GraphOptions)
GraphOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use GraphOptions.newBuilder() to construct.
private GraphOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GraphOptions() {
enableRecvScheduling_ = false;
buildCostModel_ = 0L;
buildCostModelAfter_ = 0L;
inferShapes_ = false;
placePrunedGraph_ = false;
enableBfloat16Sendrecv_ = false;
timelineStep_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GraphOptions(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 16: {
enableRecvScheduling_ = input.readBool();
break;
}
case 26: {
org.tensorflow.framework.OptimizerOptions.Builder subBuilder = null;
if (optimizerOptions_ != null) {
subBuilder = optimizerOptions_.toBuilder();
}
optimizerOptions_ = input.readMessage(org.tensorflow.framework.OptimizerOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(optimizerOptions_);
optimizerOptions_ = subBuilder.buildPartial();
}
break;
}
case 32: {
buildCostModel_ = input.readInt64();
break;
}
case 40: {
inferShapes_ = input.readBool();
break;
}
case 48: {
placePrunedGraph_ = input.readBool();
break;
}
case 56: {
enableBfloat16Sendrecv_ = input.readBool();
break;
}
case 64: {
timelineStep_ = input.readInt32();
break;
}
case 72: {
buildCostModelAfter_ = input.readInt64();
break;
}
case 82: {
org.tensorflow.framework.RewriterConfig.Builder subBuilder = null;
if (rewriteOptions_ != null) {
subBuilder = rewriteOptions_.toBuilder();
}
rewriteOptions_ = input.readMessage(org.tensorflow.framework.RewriterConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(rewriteOptions_);
rewriteOptions_ = subBuilder.buildPartial();
}
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 org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.GraphOptions.class, org.tensorflow.framework.GraphOptions.Builder.class);
}
public static final int ENABLE_RECV_SCHEDULING_FIELD_NUMBER = 2;
private boolean enableRecvScheduling_;
/**
*
* If true, use control flow to schedule the activation of Recv nodes.
* (Currently ignored.)
*
*
* bool enable_recv_scheduling = 2;
*/
public boolean getEnableRecvScheduling() {
return enableRecvScheduling_;
}
public static final int OPTIMIZER_OPTIONS_FIELD_NUMBER = 3;
private org.tensorflow.framework.OptimizerOptions optimizerOptions_;
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public boolean hasOptimizerOptions() {
return optimizerOptions_ != null;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public org.tensorflow.framework.OptimizerOptions getOptimizerOptions() {
return optimizerOptions_ == null ? org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public org.tensorflow.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() {
return getOptimizerOptions();
}
public static final int BUILD_COST_MODEL_FIELD_NUMBER = 4;
private long buildCostModel_;
/**
*
* The number of steps to run before returning a cost model detailing
* the memory usage and performance of each node of the graph. 0 means
* no cost model.
*
*
* int64 build_cost_model = 4;
*/
public long getBuildCostModel() {
return buildCostModel_;
}
public static final int BUILD_COST_MODEL_AFTER_FIELD_NUMBER = 9;
private long buildCostModelAfter_;
/**
*
* The number of steps to skip before collecting statistics for the
* cost model.
*
*
* int64 build_cost_model_after = 9;
*/
public long getBuildCostModelAfter() {
return buildCostModelAfter_;
}
public static final int INFER_SHAPES_FIELD_NUMBER = 5;
private boolean inferShapes_;
/**
*
* Annotate each Node with Op output shape data, to the extent it can
* be statically inferred.
*
*
* bool infer_shapes = 5;
*/
public boolean getInferShapes() {
return inferShapes_;
}
public static final int PLACE_PRUNED_GRAPH_FIELD_NUMBER = 6;
private boolean placePrunedGraph_;
/**
*
* Only place the subgraphs that are run, rather than the entire graph.
* This is useful for interactive graph building, where one might
* produce graphs that cannot be placed during the debugging
* process. In particular, it allows the client to continue work in
* a session after adding a node to a graph whose placement
* constraints are unsatisfiable.
*
*
* bool place_pruned_graph = 6;
*/
public boolean getPlacePrunedGraph() {
return placePrunedGraph_;
}
public static final int ENABLE_BFLOAT16_SENDRECV_FIELD_NUMBER = 7;
private boolean enableBfloat16Sendrecv_;
/**
*
* If true, transfer float values between processes as bfloat16.
*
*
* bool enable_bfloat16_sendrecv = 7;
*/
public boolean getEnableBfloat16Sendrecv() {
return enableBfloat16Sendrecv_;
}
public static final int TIMELINE_STEP_FIELD_NUMBER = 8;
private int timelineStep_;
/**
*
* If > 0, record a timeline every this many steps.
* EXPERIMENTAL: This currently has no effect in MasterSession.
*
*
* int32 timeline_step = 8;
*/
public int getTimelineStep() {
return timelineStep_;
}
public static final int REWRITE_OPTIONS_FIELD_NUMBER = 10;
private org.tensorflow.framework.RewriterConfig rewriteOptions_;
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public boolean hasRewriteOptions() {
return rewriteOptions_ != null;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public org.tensorflow.framework.RewriterConfig getRewriteOptions() {
return rewriteOptions_ == null ? org.tensorflow.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public org.tensorflow.framework.RewriterConfigOrBuilder getRewriteOptionsOrBuilder() {
return getRewriteOptions();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (enableRecvScheduling_ != false) {
output.writeBool(2, enableRecvScheduling_);
}
if (optimizerOptions_ != null) {
output.writeMessage(3, getOptimizerOptions());
}
if (buildCostModel_ != 0L) {
output.writeInt64(4, buildCostModel_);
}
if (inferShapes_ != false) {
output.writeBool(5, inferShapes_);
}
if (placePrunedGraph_ != false) {
output.writeBool(6, placePrunedGraph_);
}
if (enableBfloat16Sendrecv_ != false) {
output.writeBool(7, enableBfloat16Sendrecv_);
}
if (timelineStep_ != 0) {
output.writeInt32(8, timelineStep_);
}
if (buildCostModelAfter_ != 0L) {
output.writeInt64(9, buildCostModelAfter_);
}
if (rewriteOptions_ != null) {
output.writeMessage(10, getRewriteOptions());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enableRecvScheduling_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, enableRecvScheduling_);
}
if (optimizerOptions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getOptimizerOptions());
}
if (buildCostModel_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, buildCostModel_);
}
if (inferShapes_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, inferShapes_);
}
if (placePrunedGraph_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, placePrunedGraph_);
}
if (enableBfloat16Sendrecv_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, enableBfloat16Sendrecv_);
}
if (timelineStep_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, timelineStep_);
}
if (buildCostModelAfter_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, buildCostModelAfter_);
}
if (rewriteOptions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getRewriteOptions());
}
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 org.tensorflow.framework.GraphOptions)) {
return super.equals(obj);
}
org.tensorflow.framework.GraphOptions other = (org.tensorflow.framework.GraphOptions) obj;
boolean result = true;
result = result && (getEnableRecvScheduling()
== other.getEnableRecvScheduling());
result = result && (hasOptimizerOptions() == other.hasOptimizerOptions());
if (hasOptimizerOptions()) {
result = result && getOptimizerOptions()
.equals(other.getOptimizerOptions());
}
result = result && (getBuildCostModel()
== other.getBuildCostModel());
result = result && (getBuildCostModelAfter()
== other.getBuildCostModelAfter());
result = result && (getInferShapes()
== other.getInferShapes());
result = result && (getPlacePrunedGraph()
== other.getPlacePrunedGraph());
result = result && (getEnableBfloat16Sendrecv()
== other.getEnableBfloat16Sendrecv());
result = result && (getTimelineStep()
== other.getTimelineStep());
result = result && (hasRewriteOptions() == other.hasRewriteOptions());
if (hasRewriteOptions()) {
result = result && getRewriteOptions()
.equals(other.getRewriteOptions());
}
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) + ENABLE_RECV_SCHEDULING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnableRecvScheduling());
if (hasOptimizerOptions()) {
hash = (37 * hash) + OPTIMIZER_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getOptimizerOptions().hashCode();
}
hash = (37 * hash) + BUILD_COST_MODEL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBuildCostModel());
hash = (37 * hash) + BUILD_COST_MODEL_AFTER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBuildCostModelAfter());
hash = (37 * hash) + INFER_SHAPES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getInferShapes());
hash = (37 * hash) + PLACE_PRUNED_GRAPH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPlacePrunedGraph());
hash = (37 * hash) + ENABLE_BFLOAT16_SENDRECV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnableBfloat16Sendrecv());
hash = (37 * hash) + TIMELINE_STEP_FIELD_NUMBER;
hash = (53 * hash) + getTimelineStep();
if (hasRewriteOptions()) {
hash = (37 * hash) + REWRITE_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getRewriteOptions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.GraphOptions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.GraphOptions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.GraphOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.GraphOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.GraphOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.GraphOptions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.GraphOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.GraphOptions 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 org.tensorflow.framework.GraphOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.GraphOptions 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 org.tensorflow.framework.GraphOptions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.GraphOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.GraphOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tensorflow.GraphOptions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.GraphOptions)
org.tensorflow.framework.GraphOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.GraphOptions.class, org.tensorflow.framework.GraphOptions.Builder.class);
}
// Construct using org.tensorflow.framework.GraphOptions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
enableRecvScheduling_ = false;
if (optimizerOptionsBuilder_ == null) {
optimizerOptions_ = null;
} else {
optimizerOptions_ = null;
optimizerOptionsBuilder_ = null;
}
buildCostModel_ = 0L;
buildCostModelAfter_ = 0L;
inferShapes_ = false;
placePrunedGraph_ = false;
enableBfloat16Sendrecv_ = false;
timelineStep_ = 0;
if (rewriteOptionsBuilder_ == null) {
rewriteOptions_ = null;
} else {
rewriteOptions_ = null;
rewriteOptionsBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor;
}
public org.tensorflow.framework.GraphOptions getDefaultInstanceForType() {
return org.tensorflow.framework.GraphOptions.getDefaultInstance();
}
public org.tensorflow.framework.GraphOptions build() {
org.tensorflow.framework.GraphOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.GraphOptions buildPartial() {
org.tensorflow.framework.GraphOptions result = new org.tensorflow.framework.GraphOptions(this);
result.enableRecvScheduling_ = enableRecvScheduling_;
if (optimizerOptionsBuilder_ == null) {
result.optimizerOptions_ = optimizerOptions_;
} else {
result.optimizerOptions_ = optimizerOptionsBuilder_.build();
}
result.buildCostModel_ = buildCostModel_;
result.buildCostModelAfter_ = buildCostModelAfter_;
result.inferShapes_ = inferShapes_;
result.placePrunedGraph_ = placePrunedGraph_;
result.enableBfloat16Sendrecv_ = enableBfloat16Sendrecv_;
result.timelineStep_ = timelineStep_;
if (rewriteOptionsBuilder_ == null) {
result.rewriteOptions_ = rewriteOptions_;
} else {
result.rewriteOptions_ = rewriteOptionsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.GraphOptions) {
return mergeFrom((org.tensorflow.framework.GraphOptions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.GraphOptions other) {
if (other == org.tensorflow.framework.GraphOptions.getDefaultInstance()) return this;
if (other.getEnableRecvScheduling() != false) {
setEnableRecvScheduling(other.getEnableRecvScheduling());
}
if (other.hasOptimizerOptions()) {
mergeOptimizerOptions(other.getOptimizerOptions());
}
if (other.getBuildCostModel() != 0L) {
setBuildCostModel(other.getBuildCostModel());
}
if (other.getBuildCostModelAfter() != 0L) {
setBuildCostModelAfter(other.getBuildCostModelAfter());
}
if (other.getInferShapes() != false) {
setInferShapes(other.getInferShapes());
}
if (other.getPlacePrunedGraph() != false) {
setPlacePrunedGraph(other.getPlacePrunedGraph());
}
if (other.getEnableBfloat16Sendrecv() != false) {
setEnableBfloat16Sendrecv(other.getEnableBfloat16Sendrecv());
}
if (other.getTimelineStep() != 0) {
setTimelineStep(other.getTimelineStep());
}
if (other.hasRewriteOptions()) {
mergeRewriteOptions(other.getRewriteOptions());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.GraphOptions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.GraphOptions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean enableRecvScheduling_ ;
/**
*
* If true, use control flow to schedule the activation of Recv nodes.
* (Currently ignored.)
*
*
* bool enable_recv_scheduling = 2;
*/
public boolean getEnableRecvScheduling() {
return enableRecvScheduling_;
}
/**
*
* If true, use control flow to schedule the activation of Recv nodes.
* (Currently ignored.)
*
*
* bool enable_recv_scheduling = 2;
*/
public Builder setEnableRecvScheduling(boolean value) {
enableRecvScheduling_ = value;
onChanged();
return this;
}
/**
*
* If true, use control flow to schedule the activation of Recv nodes.
* (Currently ignored.)
*
*
* bool enable_recv_scheduling = 2;
*/
public Builder clearEnableRecvScheduling() {
enableRecvScheduling_ = false;
onChanged();
return this;
}
private org.tensorflow.framework.OptimizerOptions optimizerOptions_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder> optimizerOptionsBuilder_;
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public boolean hasOptimizerOptions() {
return optimizerOptionsBuilder_ != null || optimizerOptions_ != null;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public org.tensorflow.framework.OptimizerOptions getOptimizerOptions() {
if (optimizerOptionsBuilder_ == null) {
return optimizerOptions_ == null ? org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_;
} else {
return optimizerOptionsBuilder_.getMessage();
}
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public Builder setOptimizerOptions(org.tensorflow.framework.OptimizerOptions value) {
if (optimizerOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
optimizerOptions_ = value;
onChanged();
} else {
optimizerOptionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public Builder setOptimizerOptions(
org.tensorflow.framework.OptimizerOptions.Builder builderForValue) {
if (optimizerOptionsBuilder_ == null) {
optimizerOptions_ = builderForValue.build();
onChanged();
} else {
optimizerOptionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public Builder mergeOptimizerOptions(org.tensorflow.framework.OptimizerOptions value) {
if (optimizerOptionsBuilder_ == null) {
if (optimizerOptions_ != null) {
optimizerOptions_ =
org.tensorflow.framework.OptimizerOptions.newBuilder(optimizerOptions_).mergeFrom(value).buildPartial();
} else {
optimizerOptions_ = value;
}
onChanged();
} else {
optimizerOptionsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public Builder clearOptimizerOptions() {
if (optimizerOptionsBuilder_ == null) {
optimizerOptions_ = null;
onChanged();
} else {
optimizerOptions_ = null;
optimizerOptionsBuilder_ = null;
}
return this;
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public org.tensorflow.framework.OptimizerOptions.Builder getOptimizerOptionsBuilder() {
onChanged();
return getOptimizerOptionsFieldBuilder().getBuilder();
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
public org.tensorflow.framework.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() {
if (optimizerOptionsBuilder_ != null) {
return optimizerOptionsBuilder_.getMessageOrBuilder();
} else {
return optimizerOptions_ == null ?
org.tensorflow.framework.OptimizerOptions.getDefaultInstance() : optimizerOptions_;
}
}
/**
*
* Options controlling how graph is optimized.
*
*
* .tensorflow.OptimizerOptions optimizer_options = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder>
getOptimizerOptionsFieldBuilder() {
if (optimizerOptionsBuilder_ == null) {
optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.OptimizerOptions, org.tensorflow.framework.OptimizerOptions.Builder, org.tensorflow.framework.OptimizerOptionsOrBuilder>(
getOptimizerOptions(),
getParentForChildren(),
isClean());
optimizerOptions_ = null;
}
return optimizerOptionsBuilder_;
}
private long buildCostModel_ ;
/**
*
* The number of steps to run before returning a cost model detailing
* the memory usage and performance of each node of the graph. 0 means
* no cost model.
*
*
* int64 build_cost_model = 4;
*/
public long getBuildCostModel() {
return buildCostModel_;
}
/**
*
* The number of steps to run before returning a cost model detailing
* the memory usage and performance of each node of the graph. 0 means
* no cost model.
*
*
* int64 build_cost_model = 4;
*/
public Builder setBuildCostModel(long value) {
buildCostModel_ = value;
onChanged();
return this;
}
/**
*
* The number of steps to run before returning a cost model detailing
* the memory usage and performance of each node of the graph. 0 means
* no cost model.
*
*
* int64 build_cost_model = 4;
*/
public Builder clearBuildCostModel() {
buildCostModel_ = 0L;
onChanged();
return this;
}
private long buildCostModelAfter_ ;
/**
*
* The number of steps to skip before collecting statistics for the
* cost model.
*
*
* int64 build_cost_model_after = 9;
*/
public long getBuildCostModelAfter() {
return buildCostModelAfter_;
}
/**
*
* The number of steps to skip before collecting statistics for the
* cost model.
*
*
* int64 build_cost_model_after = 9;
*/
public Builder setBuildCostModelAfter(long value) {
buildCostModelAfter_ = value;
onChanged();
return this;
}
/**
*
* The number of steps to skip before collecting statistics for the
* cost model.
*
*
* int64 build_cost_model_after = 9;
*/
public Builder clearBuildCostModelAfter() {
buildCostModelAfter_ = 0L;
onChanged();
return this;
}
private boolean inferShapes_ ;
/**
*
* Annotate each Node with Op output shape data, to the extent it can
* be statically inferred.
*
*
* bool infer_shapes = 5;
*/
public boolean getInferShapes() {
return inferShapes_;
}
/**
*
* Annotate each Node with Op output shape data, to the extent it can
* be statically inferred.
*
*
* bool infer_shapes = 5;
*/
public Builder setInferShapes(boolean value) {
inferShapes_ = value;
onChanged();
return this;
}
/**
*
* Annotate each Node with Op output shape data, to the extent it can
* be statically inferred.
*
*
* bool infer_shapes = 5;
*/
public Builder clearInferShapes() {
inferShapes_ = false;
onChanged();
return this;
}
private boolean placePrunedGraph_ ;
/**
*
* Only place the subgraphs that are run, rather than the entire graph.
* This is useful for interactive graph building, where one might
* produce graphs that cannot be placed during the debugging
* process. In particular, it allows the client to continue work in
* a session after adding a node to a graph whose placement
* constraints are unsatisfiable.
*
*
* bool place_pruned_graph = 6;
*/
public boolean getPlacePrunedGraph() {
return placePrunedGraph_;
}
/**
*
* Only place the subgraphs that are run, rather than the entire graph.
* This is useful for interactive graph building, where one might
* produce graphs that cannot be placed during the debugging
* process. In particular, it allows the client to continue work in
* a session after adding a node to a graph whose placement
* constraints are unsatisfiable.
*
*
* bool place_pruned_graph = 6;
*/
public Builder setPlacePrunedGraph(boolean value) {
placePrunedGraph_ = value;
onChanged();
return this;
}
/**
*
* Only place the subgraphs that are run, rather than the entire graph.
* This is useful for interactive graph building, where one might
* produce graphs that cannot be placed during the debugging
* process. In particular, it allows the client to continue work in
* a session after adding a node to a graph whose placement
* constraints are unsatisfiable.
*
*
* bool place_pruned_graph = 6;
*/
public Builder clearPlacePrunedGraph() {
placePrunedGraph_ = false;
onChanged();
return this;
}
private boolean enableBfloat16Sendrecv_ ;
/**
*
* If true, transfer float values between processes as bfloat16.
*
*
* bool enable_bfloat16_sendrecv = 7;
*/
public boolean getEnableBfloat16Sendrecv() {
return enableBfloat16Sendrecv_;
}
/**
*
* If true, transfer float values between processes as bfloat16.
*
*
* bool enable_bfloat16_sendrecv = 7;
*/
public Builder setEnableBfloat16Sendrecv(boolean value) {
enableBfloat16Sendrecv_ = value;
onChanged();
return this;
}
/**
*
* If true, transfer float values between processes as bfloat16.
*
*
* bool enable_bfloat16_sendrecv = 7;
*/
public Builder clearEnableBfloat16Sendrecv() {
enableBfloat16Sendrecv_ = false;
onChanged();
return this;
}
private int timelineStep_ ;
/**
*
* If > 0, record a timeline every this many steps.
* EXPERIMENTAL: This currently has no effect in MasterSession.
*
*
* int32 timeline_step = 8;
*/
public int getTimelineStep() {
return timelineStep_;
}
/**
*
* If > 0, record a timeline every this many steps.
* EXPERIMENTAL: This currently has no effect in MasterSession.
*
*
* int32 timeline_step = 8;
*/
public Builder setTimelineStep(int value) {
timelineStep_ = value;
onChanged();
return this;
}
/**
*
* If > 0, record a timeline every this many steps.
* EXPERIMENTAL: This currently has no effect in MasterSession.
*
*
* int32 timeline_step = 8;
*/
public Builder clearTimelineStep() {
timelineStep_ = 0;
onChanged();
return this;
}
private org.tensorflow.framework.RewriterConfig rewriteOptions_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.RewriterConfig, org.tensorflow.framework.RewriterConfig.Builder, org.tensorflow.framework.RewriterConfigOrBuilder> rewriteOptionsBuilder_;
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public boolean hasRewriteOptions() {
return rewriteOptionsBuilder_ != null || rewriteOptions_ != null;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public org.tensorflow.framework.RewriterConfig getRewriteOptions() {
if (rewriteOptionsBuilder_ == null) {
return rewriteOptions_ == null ? org.tensorflow.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_;
} else {
return rewriteOptionsBuilder_.getMessage();
}
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public Builder setRewriteOptions(org.tensorflow.framework.RewriterConfig value) {
if (rewriteOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rewriteOptions_ = value;
onChanged();
} else {
rewriteOptionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public Builder setRewriteOptions(
org.tensorflow.framework.RewriterConfig.Builder builderForValue) {
if (rewriteOptionsBuilder_ == null) {
rewriteOptions_ = builderForValue.build();
onChanged();
} else {
rewriteOptionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public Builder mergeRewriteOptions(org.tensorflow.framework.RewriterConfig value) {
if (rewriteOptionsBuilder_ == null) {
if (rewriteOptions_ != null) {
rewriteOptions_ =
org.tensorflow.framework.RewriterConfig.newBuilder(rewriteOptions_).mergeFrom(value).buildPartial();
} else {
rewriteOptions_ = value;
}
onChanged();
} else {
rewriteOptionsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public Builder clearRewriteOptions() {
if (rewriteOptionsBuilder_ == null) {
rewriteOptions_ = null;
onChanged();
} else {
rewriteOptions_ = null;
rewriteOptionsBuilder_ = null;
}
return this;
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public org.tensorflow.framework.RewriterConfig.Builder getRewriteOptionsBuilder() {
onChanged();
return getRewriteOptionsFieldBuilder().getBuilder();
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
public org.tensorflow.framework.RewriterConfigOrBuilder getRewriteOptionsOrBuilder() {
if (rewriteOptionsBuilder_ != null) {
return rewriteOptionsBuilder_.getMessageOrBuilder();
} else {
return rewriteOptions_ == null ?
org.tensorflow.framework.RewriterConfig.getDefaultInstance() : rewriteOptions_;
}
}
/**
*
* Options that control the type and amount of graph rewriting.
* Not currently configurable via the public Python API (i.e. there is no API
* stability guarantee if you import RewriterConfig explicitly).
*
*
* .tensorflow.RewriterConfig rewrite_options = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.RewriterConfig, org.tensorflow.framework.RewriterConfig.Builder, org.tensorflow.framework.RewriterConfigOrBuilder>
getRewriteOptionsFieldBuilder() {
if (rewriteOptionsBuilder_ == null) {
rewriteOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.RewriterConfig, org.tensorflow.framework.RewriterConfig.Builder, org.tensorflow.framework.RewriterConfigOrBuilder>(
getRewriteOptions(),
getParentForChildren(),
isClean());
rewriteOptions_ = null;
}
return rewriteOptionsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.GraphOptions)
}
// @@protoc_insertion_point(class_scope:tensorflow.GraphOptions)
private static final org.tensorflow.framework.GraphOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.GraphOptions();
}
public static org.tensorflow.framework.GraphOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public GraphOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GraphOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.GraphOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}