pub struct RewriterConfig {Show 31 fields
pub layout_optimizer: RewriterConfig_Toggle,
pub constant_folding: RewriterConfig_Toggle,
pub shape_optimization: RewriterConfig_Toggle,
pub remapping: RewriterConfig_Toggle,
pub common_subgraph_elimination: RewriterConfig_Toggle,
pub arithmetic_optimization: RewriterConfig_Toggle,
pub dependency_optimization: RewriterConfig_Toggle,
pub loop_optimization: RewriterConfig_Toggle,
pub function_optimization: RewriterConfig_Toggle,
pub debug_stripper: RewriterConfig_Toggle,
pub disable_model_pruning: bool,
pub scoped_allocator_optimization: RewriterConfig_Toggle,
pub pin_to_host_optimization: RewriterConfig_Toggle,
pub implementation_selector: RewriterConfig_Toggle,
pub auto_mixed_precision: RewriterConfig_Toggle,
pub auto_mixed_precision_mkl: RewriterConfig_Toggle,
pub disable_meta_optimizer: bool,
pub meta_optimizer_iterations: RewriterConfig_NumIterationsType,
pub min_graph_nodes: i32,
pub memory_optimization: RewriterConfig_MemOptType,
pub memory_optimizer_target_node_name_scope: String,
pub meta_optimizer_timeout_ms: i64,
pub auto_parallel: SingularPtrField<AutoParallelOptions>,
pub fail_on_optimizer_errors: bool,
pub scoped_allocator_opts: SingularPtrField<ScopedAllocatorOptions>,
pub optimizers: RepeatedField<String>,
pub custom_optimizers: RepeatedField<RewriterConfig_CustomGraphOptimizer>,
pub inter_optimizer_verifier_config: SingularPtrField<VerifierConfig>,
pub post_optimization_verifier_config: SingularPtrField<VerifierConfig>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
}
Fields§
§layout_optimizer: RewriterConfig_Toggle
§constant_folding: RewriterConfig_Toggle
§shape_optimization: RewriterConfig_Toggle
§remapping: RewriterConfig_Toggle
§common_subgraph_elimination: RewriterConfig_Toggle
§arithmetic_optimization: RewriterConfig_Toggle
§dependency_optimization: RewriterConfig_Toggle
§loop_optimization: RewriterConfig_Toggle
§function_optimization: RewriterConfig_Toggle
§debug_stripper: RewriterConfig_Toggle
§disable_model_pruning: bool
§scoped_allocator_optimization: RewriterConfig_Toggle
§pin_to_host_optimization: RewriterConfig_Toggle
§implementation_selector: RewriterConfig_Toggle
§auto_mixed_precision: RewriterConfig_Toggle
§auto_mixed_precision_mkl: RewriterConfig_Toggle
§disable_meta_optimizer: bool
§meta_optimizer_iterations: RewriterConfig_NumIterationsType
§min_graph_nodes: i32
§memory_optimization: RewriterConfig_MemOptType
§memory_optimizer_target_node_name_scope: String
§meta_optimizer_timeout_ms: i64
§auto_parallel: SingularPtrField<AutoParallelOptions>
§fail_on_optimizer_errors: bool
§scoped_allocator_opts: SingularPtrField<ScopedAllocatorOptions>
§optimizers: RepeatedField<String>
§custom_optimizers: RepeatedField<RewriterConfig_CustomGraphOptimizer>
§inter_optimizer_verifier_config: SingularPtrField<VerifierConfig>
§post_optimization_verifier_config: SingularPtrField<VerifierConfig>
§unknown_fields: UnknownFields
§cached_size: CachedSize
Implementations§
Source§impl RewriterConfig
impl RewriterConfig
pub fn new() -> RewriterConfig
pub fn get_layout_optimizer(&self) -> RewriterConfig_Toggle
pub fn clear_layout_optimizer(&mut self)
pub fn set_layout_optimizer(&mut self, v: RewriterConfig_Toggle)
pub fn get_constant_folding(&self) -> RewriterConfig_Toggle
pub fn clear_constant_folding(&mut self)
pub fn set_constant_folding(&mut self, v: RewriterConfig_Toggle)
pub fn get_shape_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_shape_optimization(&mut self)
pub fn set_shape_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_remapping(&self) -> RewriterConfig_Toggle
pub fn clear_remapping(&mut self)
pub fn set_remapping(&mut self, v: RewriterConfig_Toggle)
pub fn get_common_subgraph_elimination(&self) -> RewriterConfig_Toggle
pub fn clear_common_subgraph_elimination(&mut self)
pub fn set_common_subgraph_elimination(&mut self, v: RewriterConfig_Toggle)
pub fn get_arithmetic_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_arithmetic_optimization(&mut self)
pub fn set_arithmetic_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_dependency_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_dependency_optimization(&mut self)
pub fn set_dependency_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_loop_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_loop_optimization(&mut self)
pub fn set_loop_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_function_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_function_optimization(&mut self)
pub fn set_function_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_debug_stripper(&self) -> RewriterConfig_Toggle
pub fn clear_debug_stripper(&mut self)
pub fn set_debug_stripper(&mut self, v: RewriterConfig_Toggle)
pub fn get_disable_model_pruning(&self) -> bool
pub fn clear_disable_model_pruning(&mut self)
pub fn set_disable_model_pruning(&mut self, v: bool)
pub fn get_scoped_allocator_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_scoped_allocator_optimization(&mut self)
pub fn set_scoped_allocator_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_pin_to_host_optimization(&self) -> RewriterConfig_Toggle
pub fn clear_pin_to_host_optimization(&mut self)
pub fn set_pin_to_host_optimization(&mut self, v: RewriterConfig_Toggle)
pub fn get_implementation_selector(&self) -> RewriterConfig_Toggle
pub fn clear_implementation_selector(&mut self)
pub fn set_implementation_selector(&mut self, v: RewriterConfig_Toggle)
pub fn get_auto_mixed_precision(&self) -> RewriterConfig_Toggle
pub fn clear_auto_mixed_precision(&mut self)
pub fn set_auto_mixed_precision(&mut self, v: RewriterConfig_Toggle)
pub fn get_auto_mixed_precision_mkl(&self) -> RewriterConfig_Toggle
pub fn clear_auto_mixed_precision_mkl(&mut self)
pub fn set_auto_mixed_precision_mkl(&mut self, v: RewriterConfig_Toggle)
pub fn get_disable_meta_optimizer(&self) -> bool
pub fn clear_disable_meta_optimizer(&mut self)
pub fn set_disable_meta_optimizer(&mut self, v: bool)
pub fn get_meta_optimizer_iterations(&self) -> RewriterConfig_NumIterationsType
pub fn clear_meta_optimizer_iterations(&mut self)
pub fn set_meta_optimizer_iterations( &mut self, v: RewriterConfig_NumIterationsType, )
pub fn get_min_graph_nodes(&self) -> i32
pub fn clear_min_graph_nodes(&mut self)
pub fn set_min_graph_nodes(&mut self, v: i32)
pub fn get_memory_optimization(&self) -> RewriterConfig_MemOptType
pub fn clear_memory_optimization(&mut self)
pub fn set_memory_optimization(&mut self, v: RewriterConfig_MemOptType)
pub fn get_memory_optimizer_target_node_name_scope(&self) -> &str
pub fn clear_memory_optimizer_target_node_name_scope(&mut self)
pub fn set_memory_optimizer_target_node_name_scope(&mut self, v: String)
pub fn mut_memory_optimizer_target_node_name_scope(&mut self) -> &mut String
pub fn take_memory_optimizer_target_node_name_scope(&mut self) -> String
pub fn get_meta_optimizer_timeout_ms(&self) -> i64
pub fn clear_meta_optimizer_timeout_ms(&mut self)
pub fn set_meta_optimizer_timeout_ms(&mut self, v: i64)
pub fn get_auto_parallel(&self) -> &AutoParallelOptions
pub fn clear_auto_parallel(&mut self)
pub fn has_auto_parallel(&self) -> bool
pub fn set_auto_parallel(&mut self, v: AutoParallelOptions)
pub fn mut_auto_parallel(&mut self) -> &mut AutoParallelOptions
pub fn take_auto_parallel(&mut self) -> AutoParallelOptions
pub fn get_fail_on_optimizer_errors(&self) -> bool
pub fn clear_fail_on_optimizer_errors(&mut self)
pub fn set_fail_on_optimizer_errors(&mut self, v: bool)
pub fn get_scoped_allocator_opts(&self) -> &ScopedAllocatorOptions
pub fn clear_scoped_allocator_opts(&mut self)
pub fn has_scoped_allocator_opts(&self) -> bool
pub fn set_scoped_allocator_opts(&mut self, v: ScopedAllocatorOptions)
pub fn mut_scoped_allocator_opts(&mut self) -> &mut ScopedAllocatorOptions
pub fn take_scoped_allocator_opts(&mut self) -> ScopedAllocatorOptions
pub fn get_optimizers(&self) -> &[String]
pub fn clear_optimizers(&mut self)
pub fn set_optimizers(&mut self, v: RepeatedField<String>)
pub fn mut_optimizers(&mut self) -> &mut RepeatedField<String>
pub fn take_optimizers(&mut self) -> RepeatedField<String>
pub fn get_custom_optimizers(&self) -> &[RewriterConfig_CustomGraphOptimizer]
pub fn clear_custom_optimizers(&mut self)
pub fn set_custom_optimizers( &mut self, v: RepeatedField<RewriterConfig_CustomGraphOptimizer>, )
pub fn mut_custom_optimizers( &mut self, ) -> &mut RepeatedField<RewriterConfig_CustomGraphOptimizer>
pub fn take_custom_optimizers( &mut self, ) -> RepeatedField<RewriterConfig_CustomGraphOptimizer>
pub fn get_inter_optimizer_verifier_config(&self) -> &VerifierConfig
pub fn clear_inter_optimizer_verifier_config(&mut self)
pub fn has_inter_optimizer_verifier_config(&self) -> bool
pub fn set_inter_optimizer_verifier_config(&mut self, v: VerifierConfig)
pub fn mut_inter_optimizer_verifier_config(&mut self) -> &mut VerifierConfig
pub fn take_inter_optimizer_verifier_config(&mut self) -> VerifierConfig
pub fn get_post_optimization_verifier_config(&self) -> &VerifierConfig
pub fn clear_post_optimization_verifier_config(&mut self)
pub fn has_post_optimization_verifier_config(&self) -> bool
pub fn set_post_optimization_verifier_config(&mut self, v: VerifierConfig)
pub fn mut_post_optimization_verifier_config(&mut self) -> &mut VerifierConfig
pub fn take_post_optimization_verifier_config(&mut self) -> VerifierConfig
Trait Implementations§
Source§impl Clear for RewriterConfig
impl Clear for RewriterConfig
Source§impl Clone for RewriterConfig
impl Clone for RewriterConfig
Source§fn clone(&self) -> RewriterConfig
fn clone(&self) -> RewriterConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RewriterConfig
impl Debug for RewriterConfig
Source§impl<'a> Default for &'a RewriterConfig
impl<'a> Default for &'a RewriterConfig
Source§fn default() -> &'a RewriterConfig
fn default() -> &'a RewriterConfig
Returns the “default value” for a type. Read more
Source§impl Default for RewriterConfig
impl Default for RewriterConfig
Source§fn default() -> RewriterConfig
fn default() -> RewriterConfig
Returns the “default value” for a type. Read more
Source§impl Message for RewriterConfig
impl Message for RewriterConfig
Source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
True iff all required fields are initialized.
Always returns
true
for protobuf 3.Source§fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
Update this message object with fields read from given stream.
Source§fn compute_size(&self) -> u32
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
Source§fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>,
) -> ProtobufResult<()>
fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_>, ) -> ProtobufResult<()>
Write message to the stream. Read more
Source§fn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by
compute_size
.Source§fn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
Source§fn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
View self as mutable
Any
.Source§fn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
Source§fn new() -> RewriterConfig
fn new() -> RewriterConfig
Create an empty message object. Read more
Source§fn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
Source§fn default_instance() -> &'static RewriterConfig
fn default_instance() -> &'static RewriterConfig
Return a pointer to default immutable message with static lifetime. Read more
Source§fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from stream.
Source§fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
Write the message to the stream. Read more
Source§fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>,
) -> Result<(), ProtobufError>
fn write_length_delimited_to( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), ProtobufError>
Write the message to the stream prepending the message with message length
encoded as varint.
Source§fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8>,
) -> Result<(), ProtobufError>
fn write_length_delimited_to_vec( &self, vec: &mut Vec<u8>, ) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length
encoded as varint.
Source§fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
Source§fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from reader.
Parse stops on EOF or when error encountered.
Source§fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from byte array.
Source§fn check_initialized(&self) -> Result<(), ProtobufError>
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
Source§fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
Write the message to the writer.
Source§fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
Write the message to bytes vec.
Source§fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to bytes vec.
Source§fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write,
) -> Result<(), ProtobufError>
fn write_length_delimited_to_writer( &self, w: &mut dyn Write, ) -> Result<(), ProtobufError>
Write the message to the writer, prepend the message with message length
encoded as varint.
Source§fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length
encoded as varint.
Source§impl PartialEq for RewriterConfig
impl PartialEq for RewriterConfig
Source§impl ProtobufValue for RewriterConfig
impl ProtobufValue for RewriterConfig
Source§fn as_ref(&self) -> ReflectValueRef<'_>
fn as_ref(&self) -> ReflectValueRef<'_>
As ref
Source§fn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
Source§fn as_ref_copy(&self) -> ReflectValueRef<'static>
fn as_ref_copy(&self) -> ReflectValueRef<'static>
impl StructuralPartialEq for RewriterConfig
Auto Trait Implementations§
impl !Freeze for RewriterConfig
impl RefUnwindSafe for RewriterConfig
impl Send for RewriterConfig
impl Sync for RewriterConfig
impl Unpin for RewriterConfig
impl UnwindSafe for RewriterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more