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.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/config.proto
package org.tensorflow.framework;
/**
*
* Session configuration parameters.
* The system picks appropriate values for fields that are not set.
*
*
* Protobuf type {@code tensorflow.ConfigProto}
*/
public final class ConfigProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.ConfigProto)
ConfigProtoOrBuilder {
// Use ConfigProto.newBuilder() to construct.
private ConfigProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ConfigProto() {
intraOpParallelismThreads_ = 0;
interOpParallelismThreads_ = 0;
usePerSessionThreads_ = false;
sessionInterOpThreadPool_ = java.util.Collections.emptyList();
placementPeriod_ = 0;
deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
allowSoftPlacement_ = false;
logDevicePlacement_ = false;
operationTimeoutInMs_ = 0L;
isolateSessionState_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ConfigProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
deviceCount_ = com.google.protobuf.MapField.newMapField(
DeviceCountDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
deviceCount__ = input.readMessage(
DeviceCountDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
deviceCount_.getMutableMap().put(
deviceCount__.getKey(), deviceCount__.getValue());
break;
}
case 16: {
intraOpParallelismThreads_ = input.readInt32();
break;
}
case 24: {
placementPeriod_ = input.readInt32();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
deviceFilters_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000040;
}
deviceFilters_.add(s);
break;
}
case 40: {
interOpParallelismThreads_ = input.readInt32();
break;
}
case 50: {
org.tensorflow.framework.GPUOptions.Builder subBuilder = null;
if (gpuOptions_ != null) {
subBuilder = gpuOptions_.toBuilder();
}
gpuOptions_ = input.readMessage(org.tensorflow.framework.GPUOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(gpuOptions_);
gpuOptions_ = subBuilder.buildPartial();
}
break;
}
case 56: {
allowSoftPlacement_ = input.readBool();
break;
}
case 64: {
logDevicePlacement_ = input.readBool();
break;
}
case 72: {
usePerSessionThreads_ = input.readBool();
break;
}
case 82: {
org.tensorflow.framework.GraphOptions.Builder subBuilder = null;
if (graphOptions_ != null) {
subBuilder = graphOptions_.toBuilder();
}
graphOptions_ = input.readMessage(org.tensorflow.framework.GraphOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(graphOptions_);
graphOptions_ = subBuilder.buildPartial();
}
break;
}
case 88: {
operationTimeoutInMs_ = input.readInt64();
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
sessionInterOpThreadPool_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
sessionInterOpThreadPool_.add(
input.readMessage(org.tensorflow.framework.ThreadPoolOptionProto.parser(), extensionRegistry));
break;
}
case 106: {
org.tensorflow.framework.RPCOptions.Builder subBuilder = null;
if (rpcOptions_ != null) {
subBuilder = rpcOptions_.toBuilder();
}
rpcOptions_ = input.readMessage(org.tensorflow.framework.RPCOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(rpcOptions_);
rpcOptions_ = subBuilder.buildPartial();
}
break;
}
case 114: {
org.tensorflow.distruntime.ClusterDef.Builder subBuilder = null;
if (clusterDef_ != null) {
subBuilder = clusterDef_.toBuilder();
}
clusterDef_ = input.readMessage(org.tensorflow.distruntime.ClusterDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(clusterDef_);
clusterDef_ = subBuilder.buildPartial();
}
break;
}
case 120: {
isolateSessionState_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
deviceFilters_ = deviceFilters_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
sessionInterOpThreadPool_ = java.util.Collections.unmodifiableList(sessionInterOpThreadPool_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetDeviceCount();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.ConfigProto.class, org.tensorflow.framework.ConfigProto.Builder.class);
}
private int bitField0_;
public static final int DEVICE_COUNT_FIELD_NUMBER = 1;
private static final class DeviceCountDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
org.tensorflow.framework.ConfigProtos.internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.INT32,
0);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> deviceCount_;
private com.google.protobuf.MapField
internalGetDeviceCount() {
if (deviceCount_ == null) {
return com.google.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 com.google.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 com.google.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.
*