|
tvm
|
The pattern object used as the input of FuseOpsByPattern. For bindings to be fused, it needs to be matched with pattern and the check function needs to return true.
More...
#include <transform.h>
Public Member Functions | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("relax.transform.FusionPattern", FusionPatternNode, ffi::Object) | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Public Attributes | |
| ffi::String | name |
| The name of pattern. It becomes the value of the kComposite attribute of a fused function after successful matching. | |
| DFPattern | pattern |
| The dataflow pattern that will be used to match expression in the DataflowBlock. All the call nodes covered by the pattern will be extracted into the fused function. | |
| ffi::Map< ffi::String, DFPattern > | annotation_patterns |
The map which is used to extract important expressions from the pattern match result. All DFPattern in this map should be part of the pattern. | |
| ffi::Optional< ffi::Function > | check |
| The function to determine whether the match result is accepted. This can be std::nullopt if check function is not necessary for this pattern. | |
| ffi::Optional< ffi::Function > | attrs_getter |
| The function to get attributes for fused function. | |
The pattern object used as the input of FuseOpsByPattern. For bindings to be fused, it needs to be matched with pattern and the check function needs to return true.
| tvm::relax::transform::FusionPatternNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "relax.transform.FusionPattern" | , |
| FusionPatternNode | , | ||
| ffi::Object | |||
| ) |
| ffi::Map<ffi::String, DFPattern> tvm::relax::transform::FusionPatternNode::annotation_patterns |
The map which is used to extract important expressions from the pattern match result. All DFPattern in this map should be part of the pattern.
| ffi::Optional<ffi::Function> tvm::relax::transform::FusionPatternNode::attrs_getter |
The function to get attributes for fused function.
It should have signature ffi::Map<ffi::String, Any>(const ffi::Map<ffi::String, Expr>& context)
| ffi::Optional<ffi::Function> tvm::relax::transform::FusionPatternNode::check |
The function to determine whether the match result is accepted. This can be std::nullopt if check function is not necessary for this pattern.
It should have signature bool(const PatternCheckContext& context)
| ffi::String tvm::relax::transform::FusionPatternNode::name |
The name of pattern. It becomes the value of the kComposite attribute of a fused function after successful matching.
| DFPattern tvm::relax::transform::FusionPatternNode::pattern |
The dataflow pattern that will be used to match expression in the DataflowBlock. All the call nodes covered by the pattern will be extracted into the fused function.