Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* Everything inside Experimental is subject to change and is not subject
* to API stability guarantees in
* https://www.tensorflow.org/guide/version_compat.
*
*
* Protobuf type {@code tensorflow.ConfigProto.Experimental}
*/
public static final class Experimental extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.ConfigProto.Experimental)
ExperimentalOrBuilder {
private static final long serialVersionUID = 0L;
// Use Experimental.newBuilder() to construct.
private Experimental(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Experimental() {
collectiveGroupLeader_ = "";
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Experimental(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.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 10: {
java.lang.String s = input.readStringRequireUtf8();
collectiveGroupLeader_ = s;
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.ConfigProto.Experimental.class, org.tensorflow.framework.ConfigProto.Experimental.Builder.class);
}
public static final int COLLECTIVE_GROUP_LEADER_FIELD_NUMBER = 1;
private volatile java.lang.Object collectiveGroupLeader_;
/**
*
*
* string collective_group_leader = 1;
*/
public org.nd4j.shade.protobuf.ByteString
getCollectiveGroupLeaderBytes() {
java.lang.Object ref = collectiveGroupLeader_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
collectiveGroupLeader_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
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(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getCollectiveGroupLeaderBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, collectiveGroupLeader_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCollectiveGroupLeaderBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, collectiveGroupLeader_);
}
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.ConfigProto.Experimental)) {
return super.equals(obj);
}
org.tensorflow.framework.ConfigProto.Experimental other = (org.tensorflow.framework.ConfigProto.Experimental) obj;
boolean result = true;
result = result && getCollectiveGroupLeader()
.equals(other.getCollectiveGroupLeader());
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) + COLLECTIVE_GROUP_LEADER_FIELD_NUMBER;
hash = (53 * hash) + getCollectiveGroupLeader().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.ConfigProto.Experimental parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.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.ConfigProto.Experimental 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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Everything inside Experimental is subject to change and is not subject
* to API stability guarantees in
* https://www.tensorflow.org/guide/version_compat.
*
*
* Protobuf type {@code tensorflow.ConfigProto.Experimental}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto.Experimental)
org.tensorflow.framework.ConfigProto.ExperimentalOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.ConfigProto.Experimental.class, org.tensorflow.framework.ConfigProto.Experimental.Builder.class);
}
// Construct using org.tensorflow.framework.ConfigProto.Experimental.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
collectiveGroupLeader_ = "";
return this;
}
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor;
}
public org.tensorflow.framework.ConfigProto.Experimental getDefaultInstanceForType() {
return org.tensorflow.framework.ConfigProto.Experimental.getDefaultInstance();
}
public org.tensorflow.framework.ConfigProto.Experimental build() {
org.tensorflow.framework.ConfigProto.Experimental result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.ConfigProto.Experimental buildPartial() {
org.tensorflow.framework.ConfigProto.Experimental result = new org.tensorflow.framework.ConfigProto.Experimental(this);
result.collectiveGroupLeader_ = collectiveGroupLeader_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.ConfigProto.Experimental) {
return mergeFrom((org.tensorflow.framework.ConfigProto.Experimental)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.ConfigProto.Experimental other) {
if (other == org.tensorflow.framework.ConfigProto.Experimental.getDefaultInstance()) return this;
if (!other.getCollectiveGroupLeader().isEmpty()) {
collectiveGroupLeader_ = other.collectiveGroupLeader_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.ConfigProto.Experimental parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.ConfigProto.Experimental) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object collectiveGroupLeader_ = "";
/**
*
*
* string collective_group_leader = 1;
*/
public Builder setCollectiveGroupLeaderBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collectiveGroupLeader_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto.Experimental)
}
// @@protoc_insertion_point(class_scope:tensorflow.ConfigProto.Experimental)
private static final org.tensorflow.framework.ConfigProto.Experimental DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.ConfigProto.Experimental();
}
public static org.tensorflow.framework.ConfigProto.Experimental getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public Experimental parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new Experimental(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.ConfigProto.Experimental getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int DEVICE_COUNT_FIELD_NUMBER = 1;
private static final class DeviceCountDefaultEntryHolder {
static final org.nd4j.shade.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
org.nd4j.shade.protobuf.MapEntry
.newDefaultInstance(
org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor,
org.nd4j.shade.protobuf.WireFormat.FieldType.STRING,
"",
org.nd4j.shade.protobuf.WireFormat.FieldType.INT32,
0);
}
private org.nd4j.shade.protobuf.MapField<
java.lang.String, java.lang.Integer> deviceCount_;
private org.nd4j.shade.protobuf.MapField
internalGetDeviceCount() {
if (deviceCount_ == null) {
return org.nd4j.shade.protobuf.MapField.emptyMapField(
DeviceCountDefaultEntryHolder.defaultEntry);
}
return deviceCount_;
}
public int getDeviceCountCount() {
return internalGetDeviceCount().getMap().size();
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public boolean containsDeviceCount(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDeviceCount().getMap().containsKey(key);
}
/**
* Use {@link #getDeviceCountMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDeviceCount() {
return getDeviceCountMap();
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public int getDeviceCountOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDeviceCount().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public int getDeviceCountOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDeviceCount().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int INTRA_OP_PARALLELISM_THREADS_FIELD_NUMBER = 2;
private int intraOpParallelismThreads_;
/**
*
* The execution of an individual op (for some op types) can be
* parallelized on a pool of intra_op_parallelism_threads.
* 0 means the system picks an appropriate number.
*
*
* int32 intra_op_parallelism_threads = 2;
*/
public int getIntraOpParallelismThreads() {
return intraOpParallelismThreads_;
}
public static final int INTER_OP_PARALLELISM_THREADS_FIELD_NUMBER = 5;
private int interOpParallelismThreads_;
/**
*
* Nodes that perform blocking operations are enqueued on a pool of
* inter_op_parallelism_threads available in each process.
* 0 means the system picks an appropriate number.
* Note that the first Session created in the process sets the
* number of threads for all future sessions unless use_per_session_threads is
* true or session_inter_op_thread_pool is configured.
*
*
* int32 inter_op_parallelism_threads = 5;
*/
public int getInterOpParallelismThreads() {
return interOpParallelismThreads_;
}
public static final int USE_PER_SESSION_THREADS_FIELD_NUMBER = 9;
private boolean usePerSessionThreads_;
/**
*
* If true, use a new set of threads for this session rather than the global
* pool of threads. Only supported by direct sessions.
* If false, use the global threads created by the first session, or the
* per-session thread pools configured by session_inter_op_thread_pool.
* This option is deprecated. The same effect can be achieved by setting
* session_inter_op_thread_pool to have one element, whose num_threads equals
* inter_op_parallelism_threads.
*
*
* bool use_per_session_threads = 9;
*/
public boolean getUsePerSessionThreads() {
return usePerSessionThreads_;
}
public static final int SESSION_INTER_OP_THREAD_POOL_FIELD_NUMBER = 12;
private java.util.List sessionInterOpThreadPool_;
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public int getSessionInterOpThreadPoolCount() {
return sessionInterOpThreadPool_.size();
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public org.tensorflow.framework.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolOrBuilder(
int index) {
return sessionInterOpThreadPool_.get(index);
}
public static final int PLACEMENT_PERIOD_FIELD_NUMBER = 3;
private int placementPeriod_;
/**
*
* Assignment of Nodes to Devices is recomputed every placement_period
* steps until the system warms up (at which point the recomputation
* typically slows down automatically).
*
*
* int32 placement_period = 3;
*/
public int getPlacementPeriod() {
return placementPeriod_;
}
public static final int DEVICE_FILTERS_FIELD_NUMBER = 4;
private org.nd4j.shade.protobuf.LazyStringList deviceFilters_;
/**
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
*
* repeated string device_filters = 4;
*/
public int getDeviceFiltersCount() {
return deviceFilters_.size();
}
/**
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
*
* repeated string device_filters = 4;
*/
public org.nd4j.shade.protobuf.ByteString
getDeviceFiltersBytes(int index) {
return deviceFilters_.getByteString(index);
}
public static final int GPU_OPTIONS_FIELD_NUMBER = 6;
private org.tensorflow.framework.GPUOptions gpuOptions_;
/**
*
*
* .tensorflow.GPUOptions gpu_options = 6;
*/
public org.tensorflow.framework.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
return getGpuOptions();
}
public static final int ALLOW_SOFT_PLACEMENT_FIELD_NUMBER = 7;
private boolean allowSoftPlacement_;
/**
*
* Whether soft placement is allowed. If allow_soft_placement is true,
* an op will be placed on CPU if
* 1. there's no GPU implementation for the OP
* or
* 2. no GPU devices are known or registered
* or
* 3. need to co-locate with reftype input(s) which are from CPU.
*
*
* bool allow_soft_placement = 7;
*/
public boolean getAllowSoftPlacement() {
return allowSoftPlacement_;
}
public static final int LOG_DEVICE_PLACEMENT_FIELD_NUMBER = 8;
private boolean logDevicePlacement_;
/**
*
* Whether device placements should be logged.
*
*
* bool log_device_placement = 8;
*/
public boolean getLogDevicePlacement() {
return logDevicePlacement_;
}
public static final int GRAPH_OPTIONS_FIELD_NUMBER = 10;
private org.tensorflow.framework.GraphOptions graphOptions_;
/**
*
*
* .tensorflow.GraphOptions graph_options = 10;
*/
public org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
return getGraphOptions();
}
public static final int OPERATION_TIMEOUT_IN_MS_FIELD_NUMBER = 11;
private long operationTimeoutInMs_;
/**
*
* Global timeout for all blocking operations in this session. If non-zero,
* and not overridden on a per-operation basis, this value will be used as the
* deadline for all blocking operations.
*
*
* int64 operation_timeout_in_ms = 11;
*/
public long getOperationTimeoutInMs() {
return operationTimeoutInMs_;
}
public static final int RPC_OPTIONS_FIELD_NUMBER = 13;
private org.tensorflow.framework.RPCOptions rpcOptions_;
/**
*
* Options that apply when this session uses the distributed runtime.
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public boolean containsDeviceCount(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDeviceCount().getMap().containsKey(key);
}
/**
* Use {@link #getDeviceCountMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getDeviceCount() {
return getDeviceCountMap();
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public int getDeviceCountOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDeviceCount().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public int getDeviceCountOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetDeviceCount().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearDeviceCount() {
internalGetMutableDeviceCount().getMutableMap()
.clear();
return this;
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public Builder removeDeviceCount(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDeviceCount().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableDeviceCount() {
return internalGetMutableDeviceCount().getMutableMap();
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
*
* map<string, int32> device_count = 1;
*/
public Builder putDeviceCount(
java.lang.String key,
int value) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDeviceCount().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Map from device type name (e.g., "CPU" or "GPU" ) to maximum
* number of devices of that type to use. If a particular device
* type is not found in the map, the system picks an appropriate
* number.
*
* The execution of an individual op (for some op types) can be
* parallelized on a pool of intra_op_parallelism_threads.
* 0 means the system picks an appropriate number.
*
*
* int32 intra_op_parallelism_threads = 2;
*/
public int getIntraOpParallelismThreads() {
return intraOpParallelismThreads_;
}
/**
*
* The execution of an individual op (for some op types) can be
* parallelized on a pool of intra_op_parallelism_threads.
* 0 means the system picks an appropriate number.
*
* The execution of an individual op (for some op types) can be
* parallelized on a pool of intra_op_parallelism_threads.
* 0 means the system picks an appropriate number.
*
* Nodes that perform blocking operations are enqueued on a pool of
* inter_op_parallelism_threads available in each process.
* 0 means the system picks an appropriate number.
* Note that the first Session created in the process sets the
* number of threads for all future sessions unless use_per_session_threads is
* true or session_inter_op_thread_pool is configured.
*
*
* int32 inter_op_parallelism_threads = 5;
*/
public int getInterOpParallelismThreads() {
return interOpParallelismThreads_;
}
/**
*
* Nodes that perform blocking operations are enqueued on a pool of
* inter_op_parallelism_threads available in each process.
* 0 means the system picks an appropriate number.
* Note that the first Session created in the process sets the
* number of threads for all future sessions unless use_per_session_threads is
* true or session_inter_op_thread_pool is configured.
*
* Nodes that perform blocking operations are enqueued on a pool of
* inter_op_parallelism_threads available in each process.
* 0 means the system picks an appropriate number.
* Note that the first Session created in the process sets the
* number of threads for all future sessions unless use_per_session_threads is
* true or session_inter_op_thread_pool is configured.
*
* If true, use a new set of threads for this session rather than the global
* pool of threads. Only supported by direct sessions.
* If false, use the global threads created by the first session, or the
* per-session thread pools configured by session_inter_op_thread_pool.
* This option is deprecated. The same effect can be achieved by setting
* session_inter_op_thread_pool to have one element, whose num_threads equals
* inter_op_parallelism_threads.
*
* If true, use a new set of threads for this session rather than the global
* pool of threads. Only supported by direct sessions.
* If false, use the global threads created by the first session, or the
* per-session thread pools configured by session_inter_op_thread_pool.
* This option is deprecated. The same effect can be achieved by setting
* session_inter_op_thread_pool to have one element, whose num_threads equals
* inter_op_parallelism_threads.
*
* If true, use a new set of threads for this session rather than the global
* pool of threads. Only supported by direct sessions.
* If false, use the global threads created by the first session, or the
* per-session thread pools configured by session_inter_op_thread_pool.
* This option is deprecated. The same effect can be achieved by setting
* session_inter_op_thread_pool to have one element, whose num_threads equals
* inter_op_parallelism_threads.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public int getSessionInterOpThreadPoolCount() {
if (sessionInterOpThreadPoolBuilder_ == null) {
return sessionInterOpThreadPool_.size();
} else {
return sessionInterOpThreadPoolBuilder_.getCount();
}
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public Builder setSessionInterOpThreadPool(
int index, org.tensorflow.framework.ThreadPoolOptionProto value) {
if (sessionInterOpThreadPoolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionInterOpThreadPoolIsMutable();
sessionInterOpThreadPool_.set(index, value);
onChanged();
} else {
sessionInterOpThreadPoolBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public Builder addSessionInterOpThreadPool(org.tensorflow.framework.ThreadPoolOptionProto value) {
if (sessionInterOpThreadPoolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionInterOpThreadPoolIsMutable();
sessionInterOpThreadPool_.add(value);
onChanged();
} else {
sessionInterOpThreadPoolBuilder_.addMessage(value);
}
return this;
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public Builder addSessionInterOpThreadPool(
int index, org.tensorflow.framework.ThreadPoolOptionProto value) {
if (sessionInterOpThreadPoolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSessionInterOpThreadPoolIsMutable();
sessionInterOpThreadPool_.add(index, value);
onChanged();
} else {
sessionInterOpThreadPoolBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public org.tensorflow.framework.ThreadPoolOptionProto.Builder getSessionInterOpThreadPoolBuilder(
int index) {
return getSessionInterOpThreadPoolFieldBuilder().getBuilder(index);
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
*
* repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
*/
public org.tensorflow.framework.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolOrBuilder(
int index) {
if (sessionInterOpThreadPoolBuilder_ == null) {
return sessionInterOpThreadPool_.get(index); } else {
return sessionInterOpThreadPoolBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* This option is experimental - it may be replaced with a different mechanism
* in the future.
* Configures session thread pools. If this is configured, then RunOptions for
* a Run call can select the thread pool to use.
* The intended use is for when some session invocations need to run in a
* background pool limited to a small number of threads:
* - For example, a session may be configured to have one large pool (for
* regular compute) and one small pool (for periodic, low priority work);
* using the small pool is currently the mechanism for limiting the inter-op
* parallelism of the low priority work. Note that it does not limit the
* parallelism of work spawned by a single op kernel implementation.
* - Using this setting is normally not needed in training, but may help some
* serving use cases.
* - It is also generally recommended to set the global_name field of this
* proto, to avoid creating multiple large pools. It is typically better to
* run the non-low-priority work, even across sessions, in a single large
* pool.
*
* Assignment of Nodes to Devices is recomputed every placement_period
* steps until the system warms up (at which point the recomputation
* typically slows down automatically).
*
*
* int32 placement_period = 3;
*/
public int getPlacementPeriod() {
return placementPeriod_;
}
/**
*
* Assignment of Nodes to Devices is recomputed every placement_period
* steps until the system warms up (at which point the recomputation
* typically slows down automatically).
*
* Assignment of Nodes to Devices is recomputed every placement_period
* steps until the system warms up (at which point the recomputation
* typically slows down automatically).
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
*
* repeated string device_filters = 4;
*/
public int getDeviceFiltersCount() {
return deviceFilters_.size();
}
/**
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
*
* repeated string device_filters = 4;
*/
public Builder setDeviceFilters(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDeviceFiltersIsMutable();
deviceFilters_.set(index, value);
onChanged();
return this;
}
/**
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* When any filters are present sessions will ignore all devices which do not
* match the filters. Each filter can be partially specified, e.g. "/job:ps"
* "/job:worker/replica:3", etc.
*
* Whether soft placement is allowed. If allow_soft_placement is true,
* an op will be placed on CPU if
* 1. there's no GPU implementation for the OP
* or
* 2. no GPU devices are known or registered
* or
* 3. need to co-locate with reftype input(s) which are from CPU.
*
* Whether soft placement is allowed. If allow_soft_placement is true,
* an op will be placed on CPU if
* 1. there's no GPU implementation for the OP
* or
* 2. no GPU devices are known or registered
* or
* 3. need to co-locate with reftype input(s) which are from CPU.
*
* Whether soft placement is allowed. If allow_soft_placement is true,
* an op will be placed on CPU if
* 1. there's no GPU implementation for the OP
* or
* 2. no GPU devices are known or registered
* or
* 3. need to co-locate with reftype input(s) which are from CPU.
*
* Global timeout for all blocking operations in this session. If non-zero,
* and not overridden on a per-operation basis, this value will be used as the
* deadline for all blocking operations.
*
*
* int64 operation_timeout_in_ms = 11;
*/
public long getOperationTimeoutInMs() {
return operationTimeoutInMs_;
}
/**
*
* Global timeout for all blocking operations in this session. If non-zero,
* and not overridden on a per-operation basis, this value will be used as the
* deadline for all blocking operations.
*
* Global timeout for all blocking operations in this session. If non-zero,
* and not overridden on a per-operation basis, this value will be used as the
* deadline for all blocking operations.
*