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§
- Chain
Step - One step of a
KernelPattern::ElementWiseChain:acc = acc <op> operand. - Conv2D
Shape - Conv2D shape parameters extracted from uniform params.
- Embedded
Weight - Embedded constant weight data extracted from GlobalVariable initializers.
- MatMul
Shape - Symbolic dimension names for matrix multiplication.
- Pool
Shape - Pooling shape parameters.
- Scalar
Binding - A scalar the host supplies at dispatch time.
- Tensor
Binding - A storage buffer bound as a tensor.
Enums§
- Activation
Op - Activation function kind.
- Analysis
Error - Errors during IR pattern analysis.
- Chain
Operand - One operand of a
KernelPattern::ElementWiseChainstep. - Element
Wise Op - Element-wise binary operation kind.
- Kernel
Pattern - A classified kernel pattern that maps to ONNX operators.
- Norm
Type - Normalization type.
- Pool
Kind - Pooling operation kind.
- Reduce
Op - Reduction operation kind.
- Tensor
Role - 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.