Skip to main content

Module analyze

Module analyze 

Source
Expand description

IR pattern classification for ONNX lowering.

Analyzes an entry point’s global variables and function body to classify the computation into a known ONNX-mappable pattern.

Modules§

data_type
ONNX-compatible data type constants (matches TensorProto.DataType).

Structs§

ChainStep
One step of a KernelPattern::ElementWiseChain: acc = acc <op> operand.
Conv2DShape
Conv2D shape parameters extracted from uniform params.
EmbeddedWeight
Embedded constant weight data extracted from GlobalVariable initializers.
MatMulShape
Symbolic dimension names for matrix multiplication.
PoolShape
Pooling shape parameters.
ScalarBinding
A scalar the host supplies at dispatch time.
TensorBinding
A storage buffer bound as a tensor.

Enums§

ActivationOp
Activation function kind.
AnalysisError
Errors during IR pattern analysis.
ChainOperand
One operand of a KernelPattern::ElementWiseChain step.
ElementWiseOp
Element-wise binary operation kind.
KernelPattern
A classified kernel pattern that maps to ONNX operators.
NormType
Normalization type.
PoolKind
Pooling operation kind.
ReduceOp
Reduction operation kind.
TensorRole
Role of a tensor in the computation.

Functions§

chain_op_names
The operators a chain lowers to, in order: ["Mul", "Add"], ["Cast", "Mul", "Mul"].
chain_summary
Name a chain by the operators it lowers to, in order: Mul+Add, Cast+Mul+Mul.
classify_entry_point
Classify an entry point into a known ONNX-mappable pattern.
extract_embedded_weights
Extract constant weight data from module globals with initializers.
normalize_axis
Normalize a potentially negative axis to a positive axis.
pattern_op_names
The operator names a pattern will emit, for asking a support matrix about.