pub struct OpMetadata {
pub op_type: String,
pub op_name: String,
pub source_file: String,
pub source_line: i32,
pub profile_type: Vec<i32>,
pub size_of_generated_code_in_bytes: i64,
pub size_of_memory_working_set_in_bytes: i64,
pub profile_info: Option<ProfileInfo>,
pub deduplicated_name: String,
pub preserve_layout: bool,
pub stack_frame_id: i32,
pub scheduling_name: String,
}Expand description
Symbolization metadata for HLO Instructions.
This metadata is used for debugging XLA code generation, as well as performance profiling of XLA-generated executables.
Fields§
§op_type: StringThe framework op name that generated this XLA op.
Frameworks that build on top of XLA should mirror the names of their ops back to users by specifying the op_type. In this way, even if the framework’s “ops” are implemented as multiple XLA HLO Ops, they can be grouped appropriately. (e.g. if a SoftMax layer is emitted into XLA as multiple ops, then each op should have the op_type be “SoftMax”.)
op_name: StringThe user-specified name of the op.
This name is often unique within a computation. Note: some frameworks add auto-generated names if the user does not provide one.
source_file: StringIndicate a file and line that this op is associated to in a user’s program.
e.g. it could be the file and line of user code that generated the op.
source_line: i32§profile_type: Vec<i32>Deprecated, use [ProfileInfo][profile_type] instead.
size_of_generated_code_in_bytes: i64The footprint of the generated code for the instruction.
size_of_memory_working_set_in_bytes: i64The size of the working set, i.e., the amount of memory, used by the instruction in a compiler-managed fast device memory.
profile_info: Option<ProfileInfo>Profile information for the Op.
deduplicated_name: StringDeduplicated HLO name for this op. In some cases, we can have multiple instructions (e.g. fusions) that are considered duplicates. We want to group them together under the same name so that we can group them together during analysis (e.g. HLO Op Profile tool in Xprof). E.g. If we have fusion.1, fusion.2, and fusion.3 marked as duplicates, fusion.2 and fusion.3 will have deduplicated_name = fusion.1
preserve_layout: boolWhether to preserve the layout of the HLO op.
stack_frame_id: i321-based position of the frame in frames flat array. Ids are 1-based to keep 0 value as representation of non-set property.
scheduling_name: StringInstruction name available upon scheduling.
Implementations§
Source§impl OpMetadata
impl OpMetadata
Sourcepub fn profile_type(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<ProfileType>>
pub fn profile_type( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<ProfileType>>
Returns an iterator which yields the valid enum values contained in profile_type.
Sourcepub fn push_profile_type(&mut self, value: ProfileType)
pub fn push_profile_type(&mut self, value: ProfileType)
Appends the provided enum value to profile_type.
Trait Implementations§
Source§impl Clone for OpMetadata
impl Clone for OpMetadata
Source§fn clone(&self) -> OpMetadata
fn clone(&self) -> OpMetadata
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OpMetadata
impl Debug for OpMetadata
Source§impl Default for OpMetadata
impl Default for OpMetadata
Source§impl Message for OpMetadata
impl Message for OpMetadata
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for OpMetadata
impl PartialEq for OpMetadata
impl StructuralPartialEq for OpMetadata
Auto Trait Implementations§
impl Freeze for OpMetadata
impl RefUnwindSafe for OpMetadata
impl Send for OpMetadata
impl Sync for OpMetadata
impl Unpin for OpMetadata
impl UnwindSafe for OpMetadata
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)