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>
|
String | name |
| The name of pattern. It becomes the value of the kComposite attribute of a fused function after successful matching. More...
|
|
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. More...
|
|
Map< 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 . More...
|
|
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. More...
|
|
Optional< ffi::Function > | attrs_getter |
| The function to get attributes for fused function. More...
|
|
|
static constexpr const char * | _type_key = "relax.transform.FusionPattern" |
|
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.
◆ RegisterReflection()
static void tvm::relax::transform::FusionPatternNode::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_DECLARE_FINAL_OBJECT_INFO()
tvm::relax::transform::FusionPatternNode::TVM_DECLARE_FINAL_OBJECT_INFO |
( |
FusionPatternNode |
, |
|
|
Object |
|
|
) |
| |
◆ _type_key
constexpr const char* tvm::relax::transform::FusionPatternNode::_type_key = "relax.transform.FusionPattern" |
|
staticconstexpr |
◆ annotation_patterns
Map<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
.
◆ attrs_getter
Optional<ffi::Function> tvm::relax::transform::FusionPatternNode::attrs_getter |
The function to get attributes for fused function.
It should have signature Map<String, Any>(const Map<String, Expr>& context)
◆ check
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)
◆ name
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.
◆ pattern
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.
The documentation for this class was generated from the following file: