optypes

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 StableHLO can support -- not all are implemented yet.

const (
	Invalid OpType = iota
	Parameter
	Constant
	Identity
	ReduceWindow
	RngBitGenerator
	BatchNormForInference
	BatchNormForTraining
	BatchNormGradient
	BitCount

	Abs
	Add
	ArgMinMax
	Bitcast
	BitwiseAnd
	BitwiseNot
	BitwiseOr
	BitwiseXor
	Broadcast
	BroadcastInDim
	Ceil
	Clz
	Complex
	Concatenate
	Conj
	ConvGeneralDilated
	ConvertDType
	Cos
	Div
	Dot
	DotGeneral
	DynamicSlice
	DynamicUpdateSlice
	Equal
	EqualTotalOrder
	Erf
	Exp
	Expm1
	FFT
	Floor
	Gather
	GreaterOrEqual
	GreaterOrEqualTotalOrder
	GreaterThan
	GreaterThanTotalOrder
	Imag
	Iota
	IsFinite
	LessOrEqual
	LessOrEqualTotalOrder
	LessThan
	LessThanTotalOrder
	Log
	Log1p
	LogicalAnd
	LogicalNot
	LogicalOr
	LogicalXor
	Logistic
	Max
	Min
	Mul
	Neg
	NotEqual
	NotEqualTotalOrder
	Pad
	Pow
	Real
	ReduceBitwiseAnd
	ReduceBitwiseOr
	ReduceBitwiseXor
	ReduceLogicalAnd
	ReduceLogicalOr
	ReduceLogicalXor
	ReduceMax
	ReduceMin
	ReduceProduct
	ReduceSum
	Rem
	Reshape
	Reverse
	Round
	Rsqrt
	ScatterMax
	ScatterMin
	ScatterSum
	SelectAndScatterMax
	SelectAndScatterMin
	SelectAndScatterSum
	ShiftLeft
	ShiftRightArithmetic
	ShiftRightLogical
	Sign
	Sin
	Slice
	Sqrt
	Sub
	Tanh
	Transpose
	Where

	// Last should always be kept the last, it is used as a counter/marker for .
	Last
)

func OpTypeString

func OpTypeString(s string) (OpType, error)

OpTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OpTypeValues

func OpTypeValues() []OpType

OpTypeValues returns all values of the enum

func (OpType) IsAOpType

func (i OpType) IsAOpType() bool

IsAOpType returns "true" if the value is listed in the enum definition. "false" otherwise

func (OpType) String

func (i OpType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL