Documentation
¶
Overview ¶
Package optypes defines OpType and lists the supported operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpTypeStrings ¶
func OpTypeStrings() []string
OpTypeStrings returns a slice of all String values of the enum
Types ¶
type OpType ¶
type OpType int
OpType is an enum of all generic operations that ToStableHLO can support -- not all are implemented yet.
const ( Invalid OpType = iota FuncReturn Constant Identity Abs Add AllGather AllReduce AllToAll And Atan2 BatchNormInference BatchNormTraining BatchNormGrad BitcastConvert BroadcastInDim Call Cbrt Ceil Clamp CollectiveBroadcast CollectivePermute Compare Complex Concatenate Convert Convolution Cosine CountLeadingZeros Divide DotGeneral DynamicBroadcastInDim DynamicConv DynamicGather DynamicIota DynamicPad DynamicSlice DynamicUpdateSlice Erf Exponential ExponentialMinusOne Fft Floor Gather If Imag IsFinite Iota Log LogPlusOne Logistic Maximum Minimum Multiply Negate Not OptimizationBarrier Or Pad Popcnt Power Real Remainder Reduce ReduceWindow Reshape Reverse RNGBitGenerator RoundNearestAfz RoundNearestEven Rsqrt Scatter Select SelectAndScatter ShiftLeft ShiftRightArithmetic ShiftRightLogical Sign Sine Slice Sort Sqrt Subtract Tan Tanh Transpose UniformDequantize UniformQuantize While Xor GetDimensionSize Case Cholesky Composite CustomCall DynamicReshape GetTupleElement Infeed Outfeed PartitionId Recv ReducePrecision ReduceScatter Send TriangularSolve Tuple // Last should always be kept the last, it is used as a counter/marker for . Last )
func OpTypeString ¶
OpTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (OpType) IsAOpType ¶
IsAOpType returns "true" if the value is listed in the enum definition. "false" otherwise
func (OpType) ToStableHLO ¶
ToStableHLO returns the ToStableHLO name of the operation.