pub struct RunOptions {
pub trace_level: i32,
pub timeout_in_ms: i64,
pub inter_op_thread_pool: i32,
pub output_partition_graphs: bool,
pub debug_options: Option<DebugOptions>,
pub report_tensor_allocations_upon_oom: bool,
pub experimental: Option<Experimental>,
}
Expand description
Options for a single Run() call.
Fields§
§trace_level: i32
§timeout_in_ms: i64
Time to wait for operation to complete in milliseconds.
inter_op_thread_pool: i32
The thread pool to use, if session_inter_op_thread_pool is configured. To use the caller thread set this to -1 - this uses the caller thread to execute Session::Run() and thus avoids a context switch. Using the caller thread to execute Session::Run() should be done ONLY for simple graphs, where the overhead of an additional context switch is comparable with the overhead of Session::Run().
output_partition_graphs: bool
Whether the partition graph(s) executed by the executor(s) should be outputted via RunMetadata.
debug_options: Option<DebugOptions>
EXPERIMENTAL. Options used to initialize DebuggerState, if enabled.
report_tensor_allocations_upon_oom: bool
When enabled, causes tensor allocation information to be included in the error message when the Run() call fails because the allocator ran out of memory (OOM).
Enabling this option can slow down the Run() call.
experimental: Option<Experimental>
Implementations§
Source§impl RunOptions
impl RunOptions
Sourcepub fn trace_level(&self) -> TraceLevel
pub fn trace_level(&self) -> TraceLevel
Returns the enum value of trace_level
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_trace_level(&mut self, value: TraceLevel)
pub fn set_trace_level(&mut self, value: TraceLevel)
Sets trace_level
to the provided enum value.
Trait Implementations§
Source§impl Clone for RunOptions
impl Clone for RunOptions
Source§fn clone(&self) -> RunOptions
fn clone(&self) -> RunOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RunOptions
impl Debug for RunOptions
Source§impl Default for RunOptions
impl Default for RunOptions
Source§impl Message for RunOptions
impl Message for RunOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.