API List
This topic describes the APIs for developing scope fusion patterns.
You can view the API definition in Ascend-CANN-Toolkit installation path/ascend-toolkit/latest/compiler/include/register/scope/scope_fusion_pass_register.h.
The library file corresponding to the following APIs is libregister.so.
Class Scope
API |
Introduction |
|---|---|
Constructs/Destructs a Scope object. |
|
Initializes a Scope object. |
|
Obtains the name of a scope. |
|
Obtains the name of a scope subtype. |
|
Obtains the node map associated with a scope, |
|
Obtains the subscope information of a scope. |
|
Obtains the string after the last slash (/) in the scope name. |
|
Obtains the subscopes associated with a scope. A collection of all the associated subscopes are obtained through recursion. |
|
Obtains the parent scope information of a scope. |
Class FusionScopesResult
API |
Introduction |
|---|---|
Constructs/Destructs a FusionScopesResult object. |
|
Initializes a FusionScopesResult object. |
|
Specifies the name of a scope result. |
|
Sets the scope result type. |
|
Sets the description of a scope result. |
|
Obtains the scope result name. |
|
Obtains the node information in the scope result. |
|
Inserts the input information of the fused operator into FusionScopesResult. |
|
Inserts the output information of the fused operator into FusionScopesResult. |
|
Sets the name of an InnerNodeInfo object. |
|
Sets the type of an InnerNodeInfo object. |
|
Inserts the input operator information into an InnerNodeInfo object. |
|
Inserts the output operator information into an InnerNodeInfo object. |
|
Builds an inner node. |
|
Sets the input format of an inner node. |
|
Sets the output operator format of an inner node. |
|
Sets the dynamic input format. |
|
Sets the dynamic output format. |
|
Defines operator information. |
|
Obtains the name of an InnerNodeInfo object. |
|
Obtains the type of an InnerNodeInfo object. |
|
Obtains the input information of an InnerNodeInfo object. |
|
Obtains the output information of an InnerNodeInfo object. |
|
Constructs/Destructs an InnerNodeInfo object. |
|
Specially defined constant type, indicating that the scope will be mapped to multiple D operators. |
|
Specially defined constant type, indicating that an error occurs. |
|
Defines a constant indicating that the input of small operators comes from the scope boundary. |
|
Defines a constant indicating that the output of small operators is output to the scope boundary. |
|
Checks whether FusionScopesResult meets the requirements. |
|
Adds an inner node. |
|
Defines an inner node that is added recently. |
|
Obtains the InnerNode of a specified index. You can modify the returned InnerNode. |
|
Checks the input and output of an InnerNodeInfo object. |
Class ScopeTree
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeTree object. |
|
Initializes a ScopeTree object. |
|
Obtains all scope information contained in a scope tree. |
Class ScopeGraph
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeGraph object. |
|
Initializes a ScopeGraph object. |
|
Obtains a ScopeTree object. |
|
Obtains the node information contained in a ScopeGraph object. |
Class ScopeAttrValue
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeAttrValue object. |
|
Sets the value of a ScopeAttrValue object to an integer. |
|
Sets the floating-point value of a ScopeAttrValue object. |
|
Sets a value of the string type for a ScopeAttrValue object. |
|
Sets the Boolean value of a ScopeAttrValue object. |
Class ScopeBaseFeature
API |
Introduction |
|---|---|
Destructs a ScopeBaseFeature object. |
|
Matches a scope for fusion. |
Class NodeOpTypeFeature
API |
Introduction |
|---|---|
Constructs/Destructs a NodeOpTypeFeature object. |
|
Matches a scope for fusion. |
Class NodeAttrFeature
API |
Introduction |
|---|---|
Constructs/Destructs a NodeAttrFeature object. |
|
Matches a scope for fusion. |
Class ScopeFeature
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeFeature object. |
|
Matches a scope for fusion. |
Class ScopePattern
API |
Introduction |
|---|---|
Constructs/Destructs a ScopePattern object. |
|
Sets the type of a scope after it matches a fusion pattern. |
|
Adds a NodeOpTypeFeature object to a ScopePattern object. |
|
Adds a NodeAttrFeature object to a ScopePattern object. |
|
Adds a ScopeFeature object to a ScopePattern object. |
Class ScopesResult
API |
Introduction |
|---|---|
Constructs/Destructs a ScopesResult object. |
|
Sets the scopes contained in a ScopeResult object. |
|
Sets the nodes contained in a ScopeResult object. |
Class ScopeBasePass
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeBasePass object. |
|
Defines a pattern. The subclasses implement their own fusion policies and build patterns. |
|
Defines the name of a scope fusion pattern. |
|
Matches a scope and defines how operators are fused. |
|
Generates a fusion result and sets the input and output of the final fused operator. |
Class ScopeUtil
API |
Introduction |
|---|---|
Replaces the old_value string in str with new_value. |
|
Releases the resources of the ScopePattern set. |
|
Releases the ScopePattern resources contained in a batch. |
Class ScopeFusionPassRegistry
API |
Introduction |
|---|---|
Destructs a ScopeFusionPassRegistry object. |
|
Obtains a ScopeFusionPassRegistry singleton object. |
|
Registers a fused operator. |
Class ScopeFusionPassRegistrar
API |
Introduction |
|---|---|
Constructs/Destructs a ScopeFusionPassRegistrar object. |
Macro
API |
Introduction |
|---|---|
Registers the macro of a Scope fused operator. |