[−][src]Struct tensorflow_proto::tensorflow::ConfigProto
Session configuration parameters. The system picks appropriate values for fields that are not set.
Fields
device_count: HashMap<String, i32>
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.
intra_op_parallelism_threads: i32
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.
inter_op_parallelism_threads: i32
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. Negative means all operations are performed in caller's thread.
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.
use_per_session_threads: bool
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.
session_inter_op_thread_pool: Vec<ThreadPoolOptionProto>
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.
placement_period: i32
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).
device_filters: Vec<String>
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.
gpu_options: Option<GpuOptions>
Options that apply to all GPUs.
allow_soft_placement: bool
Whether soft placement is allowed. If allow_soft_placement is true, an op will be placed on CPU if
- there's no GPU implementation for the OP or
- no GPU devices are known or registered or
- need to co-locate with reftype input(s) which are from CPU.
log_device_placement: bool
Whether device placements should be logged.
graph_options: Option<GraphOptions>
Options that apply to all graphs.
operation_timeout_in_ms: i64
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.
rpc_options: Option<RpcOptions>
Options that apply when this session uses the distributed runtime.
cluster_def: Option<ClusterDef>
Optional list of all workers to use in this session.
isolate_session_state: bool
If true, any resources such as Variables used in the session will not be shared with other sessions. However, when clusterspec propagation is enabled, this field is ignored and sessions are always isolated.
experimental: Option<Experimental>
Trait Implementations
impl Clone for ConfigProto
[src]
pub fn clone(&self) -> ConfigProto
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConfigProto
[src]
impl Default for ConfigProto
[src]
impl Message for ConfigProto
[src]
pub fn encode_raw<B>(&self, buf: &mut B) where
B: BufMut,
[src]
B: BufMut,
pub fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
[src]
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
pub fn encoded_len(&self) -> usize
[src]
pub fn clear(&mut self)
[src]
pub fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
[src]
B: BufMut,
pub fn decode<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
[src]
Self: Default,
B: Buf,
pub fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
pub fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
[src]
B: Buf,
impl PartialEq<ConfigProto> for ConfigProto
[src]
pub fn eq(&self, other: &ConfigProto) -> bool
[src]
pub fn ne(&self, other: &ConfigProto) -> bool
[src]
impl StructuralPartialEq for ConfigProto
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConfigProto
[src]
impl Send for ConfigProto
[src]
impl Sync for ConfigProto
[src]
impl Unpin for ConfigProto
[src]
impl UnwindSafe for ConfigProto
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,