op_types
Utility functions to categorize onnx ops.
Functions
Returns whether the given op is a binary operator or not. |
|
Returns whether the given op type is of Control Flow category or not. |
|
Returns whether the given op type is of Conversion category or not. |
|
Returns whether the given op is a copy operator or not. |
|
Returns if ORT quantizes the op type by default. |
|
Returns whether the given op type is of reduction category and fusible by the compiler. |
|
Returns whether the given op type is of scaling category and fusible with input. |
|
Returns whether the given op type is of Generator category or not. |
|
Returns whether the given op type is of Irreggular mem access category or not. |
|
Returns whether the given op type is of Linear category or not. |
|
Returns whether the given op type is of Modifier category or not. |
|
Returns whether the given op type is of Multiclass category or not. |
|
Returns whether the given op is a non-reshape copy op or not. |
|
Returns whether the given op type is of Normalization category or not. |
|
Returns whether the given op type is of Pointwise or Elementwise category or not. |
|
Returns whether the given op type is of Pooling/Window category or not. |
|
Returns whether the given op type is of Recurrent category or not. |
|
Returns whether the given op type is of Selection category or not. |
|
Returns whether the given op type is of Sequence category or not. |
|
Returns whether the given op type is of Shape category or not. |
|
Returns whether the given op is a unary operator or not. |
- is_binary_op(op_type)
Returns whether the given op is a binary operator or not.
- Parameters:
op_type (str) –
- is_control_flow_op(op_type)
Returns whether the given op type is of Control Flow category or not.
- Parameters:
op_type (str) –
- is_conversion_op(op_type)
Returns whether the given op type is of Conversion category or not.
- Parameters:
op_type (str) –
- is_copy_op(op_type)
Returns whether the given op is a copy operator or not.
- Parameters:
op_type (str) –
- is_default_quantizable_op_by_ort(op_type)
Returns if ORT quantizes the op type by default.
Note. Subject to change with different ORT versions. Note. Users can use nodes_to_quantize and/or op_types_to_quantize arguments to quantize non-default operations. Reference: https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/tools/quantization/registry.py
- Parameters:
op_type (str) –
- is_fusible_reduction_op(op_type)
Returns whether the given op type is of reduction category and fusible by the compiler.
- Parameters:
op_type (str) –
- is_fusible_scaling_op(op_type)
Returns whether the given op type is of scaling category and fusible with input.
- Parameters:
op_type (str) –
- is_generator_op(op_type)
Returns whether the given op type is of Generator category or not.
- Parameters:
op_type (str) –
- is_irregular_mem_access_op(op_type)
Returns whether the given op type is of Irreggular mem access category or not.
- Parameters:
op_type (str) –
- is_linear_op(op_type)
Returns whether the given op type is of Linear category or not.
- Parameters:
op_type (str) –
- is_modifier_op(op_type)
Returns whether the given op type is of Modifier category or not.
- Parameters:
op_type (str) –
- is_multiclass_op(op_type)
Returns whether the given op type is of Multiclass category or not.
- Parameters:
op_type (str) –
- is_non_reshape_copy_op(op_type)
Returns whether the given op is a non-reshape copy op or not.
- Parameters:
op_type (str) –
- is_normalization_op(op_type)
Returns whether the given op type is of Normalization category or not.
- Parameters:
op_type (str) –
- is_pointwise_or_elementwise_op(op_type)
Returns whether the given op type is of Pointwise or Elementwise category or not.
This considers only the fusible types.
- Parameters:
op_type (str) –
- is_pooling_or_window_op(op_type)
Returns whether the given op type is of Pooling/Window category or not.
- Parameters:
op_type (str) –
- is_recurrent_op(op_type)
Returns whether the given op type is of Recurrent category or not.
- Parameters:
op_type (str) –
- is_selection_op(op_type)
Returns whether the given op type is of Selection category or not.
- Parameters:
op_type (str) –
- is_sequence_op(op_type)
Returns whether the given op type is of Sequence category or not.
- Parameters:
op_type (str) –
- is_shape_op(op_type)
Returns whether the given op type is of Shape category or not.
- Parameters:
op_type (str) –
- is_unary_op(op_type)
Returns whether the given op is a unary operator or not.
- Parameters:
op_type (str) –