pub struct OptimizedFunctionGraph {
pub name: String,
pub function_graph: Option<GraphDef>,
pub node_name_to_control_ret: HashMap<String, String>,
pub ret_types: Vec<i32>,
pub num_return_nodes: u32,
pub source: Option<i32>,
pub optimization_time_usecs: Option<u64>,
}Expand description
Optimized function graph after instantiation-related graph optimization passes (up till before graph partitioning). The first half of the proto is representing a GraphDef and the rest of the fields are extra information from graph optimizations.
Fields§
§name: StringFunction name. It can be a human-readable SignatureDef’s method name, or a FunctionDef name.
function_graph: Option<GraphDef>Optimized function graph.
node_name_to_control_ret: HashMap<String, String>Maps from node name to control ret. This is an output from running TF/XLA bridge.
ret_types: Vec<i32>Return node types of the function. This is an output of graph preprocessing.
num_return_nodes: u32Number of return nodes. This is an output of graph preprocessing.
source: Option<i32>Indicates the source environment where this proto is generated.
optimization_time_usecs: Option<u64>Time (in microseconds) spent on running the graph optimization passes for this function.
Implementations§
Source§impl OptimizedFunctionGraph
impl OptimizedFunctionGraph
Sourcepub fn ret_types(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<DataType>>
pub fn ret_types( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<DataType>>
Returns an iterator which yields the valid enum values contained in ret_types.
Sourcepub fn push_ret_types(&mut self, value: DataType)
pub fn push_ret_types(&mut self, value: DataType)
Appends the provided enum value to ret_types.
Sourcepub fn source(&self) -> OptimizationSource
pub fn source(&self) -> OptimizationSource
Returns the enum value of source, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_source(&mut self, value: OptimizationSource)
pub fn set_source(&mut self, value: OptimizationSource)
Sets source to the provided enum value.
Sourcepub fn optimization_time_usecs(&self) -> u64
pub fn optimization_time_usecs(&self) -> u64
Returns the value of optimization_time_usecs, or the default value if optimization_time_usecs is unset.
Trait Implementations§
Source§impl Clone for OptimizedFunctionGraph
impl Clone for OptimizedFunctionGraph
Source§fn clone(&self) -> OptimizedFunctionGraph
fn clone(&self) -> OptimizedFunctionGraph
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OptimizedFunctionGraph
impl Debug for OptimizedFunctionGraph
Source§impl Default for OptimizedFunctionGraph
impl Default for OptimizedFunctionGraph
Source§impl<'de> Deserialize<'de> for OptimizedFunctionGraph
impl<'de> Deserialize<'de> for OptimizedFunctionGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for OptimizedFunctionGraph
impl Message for OptimizedFunctionGraph
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_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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 encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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.Source§impl PartialEq for OptimizedFunctionGraph
impl PartialEq for OptimizedFunctionGraph
Source§impl Serialize for OptimizedFunctionGraph
impl Serialize for OptimizedFunctionGraph
impl StructuralPartialEq for OptimizedFunctionGraph
Auto Trait Implementations§
impl Freeze for OptimizedFunctionGraph
impl RefUnwindSafe for OptimizedFunctionGraph
impl Send for OptimizedFunctionGraph
impl Sync for OptimizedFunctionGraph
impl Unpin for OptimizedFunctionGraph
impl UnwindSafe for OptimizedFunctionGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().