[][src]Struct tensorflow_proto::xla::HloInstructionProto

pub struct HloInstructionProto {
    pub name: String,
    pub opcode: String,
    pub shape: Option<ShapeProto>,
    pub metadata: Option<OpMetadata>,
    pub literal: Option<LiteralProto>,
    pub parameter_number: i64,
    pub fusion_kind: String,
    pub tuple_index: i64,
    pub dimensions: Vec<i64>,
    pub window: Option<Window>,
    pub convolution_dimension_numbers: Option<ConvolutionDimensionNumbers>,
    pub feature_group_count: i64,
    pub batch_group_count: i64,
    pub slice_dimensions: Vec<SliceDimensions>,
    pub exponent_bits: i32,
    pub mantissa_bits: i32,
    pub dynamic_slice_sizes: Vec<i64>,
    pub padding_config: Option<PaddingConfig>,
    pub outfeed_config: Vec<u8>,
    pub distribution: i32,
    pub epsilon: f32,
    pub feature_index: i64,
    pub channel_id: i64,
    pub infeed_config: Vec<u8>,
    pub custom_call_target: String,
    pub outfeed_shape: Option<ShapeProto>,
    pub dot_dimension_numbers: Option<DotDimensionNumbers>,
    pub fft_type: i32,
    pub fft_length: Vec<i64>,
    pub comparison_direction: String,
    pub gather_dimension_numbers: Option<GatherDimensionNumbers>,
    pub gather_slice_sizes: Vec<i64>,
    pub channel_name: String,
    pub cost_estimate_ns: i64,
    pub id: i64,
    pub operand_ids: Vec<i64>,
    pub control_predecessor_ids: Vec<i64>,
    pub called_computation_ids: Vec<i64>,
    pub sharding: Option<OpSharding>,
    pub backend_config: String,
    pub replica_groups: Vec<ReplicaGroup>,
    pub all_reduce_id: i64,
    pub is_host_transfer: bool,
    pub is_stable: bool,
    pub scatter_dimension_numbers: Option<ScatterDimensionNumbers>,
    pub precision_config: Option<PrecisionConfig>,
    pub source_target_pairs: Vec<SourceTarget>,
    pub domain_entry_sharding: Option<OpSharding>,
    pub domain_exit_sharding: Option<OpSharding>,
    pub constrain_layout: bool,
    pub operand_shapes_with_layout: Vec<ShapeProto>,
    pub triangular_solve_options: Option<TriangularSolveOptions>,
    pub cholesky_options: Option<CholeskyOptions>,
    pub parameter_replication: Option<ParameterReplication>,
    pub outer_dimension_partitions: Vec<i64>,
    pub custom_call_has_side_effect: bool,
    pub delta: i64,
    pub indices_are_sorted: bool,
}

Serialization of HloInstruction. Next ID: 68

Fields

name: Stringopcode: Stringshape: Option<ShapeProto>metadata: Option<OpMetadata>literal: Option<LiteralProto>

Literal, only present for kConstant.

parameter_number: i64

Parameter number is only present for kParameter.

fusion_kind: String

Fusion state, only present for kFusion.

tuple_index: i64

Index for kGetTupleElement.

dimensions: Vec<i64>

Dimensions present for some operations that require reshaping or broadcasting, including Reshape, Reduce, ReduceWindow, and Reverse.

window: Option<Window>

Describes the window in a windowed operation such as convolution.

convolution_dimension_numbers: Option<ConvolutionDimensionNumbers>

Describes the dimension numbers used for a convolution.

feature_group_count: i64

The number of feature groups. Used for a convolution. Must be a divisor of the input feature dimension and output feature dimension. If not specified, it will use a default value of 1.

batch_group_count: i64slice_dimensions: Vec<SliceDimensions>exponent_bits: i32

The bit sizes for a reduce-precision operation.

mantissa_bits: i32dynamic_slice_sizes: Vec<i64>

Describes the [start, start + size) range size for a dynamic slice ('start' is specified dynamically in the second operand of the operation).

padding_config: Option<PaddingConfig>

The padding configuration that describes the edge padding and interior padding of this pad instruction. Only set for pad instructions.

outfeed_config: Vec<u8>

Outfeed configuration information, only present for kOutfeed.

distribution: i32

The distribution requested for random number generation. Only present for kRng.

epsilon: f32

A small float number added to the variance to avoid divide-by-zero error. Only present for kBatchNormTraining.

feature_index: i64

An integer value representing the index of the feature dimension. Only present for kBatchNormTraining.

channel_id: i64

Represents a unique identifier for each Send/Recv instruction pair or optionally for collective instructions (AllReduce, CollectivePermute, AllToAll). Non-positive channel_id is equivalent to no channel id.

infeed_config: Vec<u8>

The string representation of the infeed configuration.

custom_call_target: String

Name of a external target (eg, global symbol) to call, only present for kCustomCall.

outfeed_shape: Option<ShapeProto>

Shape of outfeed request.

dot_dimension_numbers: Option<DotDimensionNumbers>

Describes the dimension numbers used for a dot operation

fft_type: i32

FFT type (FFT, IFFT, etc).

fft_length: Vec<i64>

FFT length.

comparison_direction: String

Comparison direction only used for kCompare.

gather_dimension_numbers: Option<GatherDimensionNumbers>

Gather dimension numbers.

gather_slice_sizes: Vec<i64>channel_name: String

Compute Host.

cost_estimate_ns: i64id: i64

The id of this instruction.

operand_ids: Vec<i64>control_predecessor_ids: Vec<i64>called_computation_ids: Vec<i64>sharding: Option<OpSharding>backend_config: String

Backend configuration for the instruction. Has backend-specific meaning.

replica_groups: Vec<ReplicaGroup>

Cross replica op fields.

all_reduce_id: i64
👎 Deprecated

Deprecated, but keeping it for backward compatibility. Use channel_id. Non-positive all_reduce_id is equivalent to no all_reduce_id.

is_host_transfer: bool

Whether this Send/Recv instruction transfers data to/from the host. Only present for Send and Recv instructions and their SendDone and RecvDone partners.

is_stable: bool

Whether this Sort instruction should be stable.

scatter_dimension_numbers: Option<ScatterDimensionNumbers>precision_config: Option<PrecisionConfig>

Precision configuration for the instruction. Has backend-specific meaning.

source_target_pairs: Vec<SourceTarget>

Collective permute field.

domain_entry_sharding: Option<OpSharding>

Sharding for kDomain instructions.

domain_exit_sharding: Option<OpSharding>constrain_layout: bool

For custom call this indicates that the layouts are constrained. If constrain_layout is true then the 'shape' field must contain a layout, and 'operand_shapes_with_layout' must contain a shape with layout for each operand.

operand_shapes_with_layout: Vec<ShapeProto>triangular_solve_options: Option<TriangularSolveOptions>

Options for TriangularSolve

cholesky_options: Option<CholeskyOptions>

Options for Cholesky

parameter_replication: Option<ParameterReplication>

Describes how parameters behave with regards to replicas.

outer_dimension_partitions: Vec<i64>

If set, the given instruction is run in parallel on e.g. multiple CPU cores. The outermost dimension gets split up into outer_dimension_partitions[0] pieces, the next-outermost dim gets split into outer_dimension_partitions[1] pieces, etc.

It's illegal to partition a dimension into more shards than there are elements in that dimension.

custom_call_has_side_effect: bool

Whether the kCustomCall instruction has side-effects, only present for kCustomCall.

delta: i64

The delta value for kRngGetAndUpdateState.

indices_are_sorted: bool

Specifies if the gather/scatter indices are guaranteed to be sorted by the caller.

Implementations

impl HloInstructionProto[src]

pub fn distribution(&self) -> RandomDistribution[src]

Returns the enum value of distribution, or the default if the field is set to an invalid enum value.

pub fn set_distribution(&mut self, value: RandomDistribution)[src]

Sets distribution to the provided enum value.

pub fn fft_type(&self) -> FftType[src]

Returns the enum value of fft_type, or the default if the field is set to an invalid enum value.

pub fn set_fft_type(&mut self, value: FftType)[src]

Sets fft_type to the provided enum value.

Trait Implementations

impl Clone for HloInstructionProto[src]

impl Debug for HloInstructionProto[src]

impl Default for HloInstructionProto[src]

impl Message for HloInstructionProto[src]

impl PartialEq<HloInstructionProto> for HloInstructionProto[src]

impl StructuralPartialEq for HloInstructionProto[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.