PassContextNode contains the information that a pass can rely on, such as analysis results.
More...
#include <transform.h>
|
| PassContextNode ()=default |
|
template<typename TObjectRef > |
Optional< TObjectRef > | GetConfig (const std::string &key, Optional< TObjectRef > default_value=Optional< TObjectRef >(std::nullopt)) const |
| Get a config value from the pass context. More...
|
|
template<typename TObjectRef > |
Optional< TObjectRef > | GetConfig (const std::string &key, TObjectRef default_value) const |
|
| TVM_DECLARE_FINAL_OBJECT_INFO (PassContextNode, Object) |
|
|
static constexpr const char * | _type_key = "transform.PassContext" |
|
PassContextNode contains the information that a pass can rely on, such as analysis results.
- See also
- PassContext
◆ PassContextNode()
tvm::transform::PassContextNode::PassContextNode |
( |
| ) |
|
|
default |
◆ GetConfig() [1/2]
template<typename TObjectRef >
Optional<TObjectRef> tvm::transform::PassContextNode::GetConfig |
( |
const std::string & |
key, |
|
|
Optional< TObjectRef > |
default_value = Optional<TObjectRef>(std::nullopt) |
|
) |
| const |
|
inline |
Get a config value from the pass context.
- Parameters
-
key | The config key. |
default_value | The default value if the key does not exist, defaults to nullptr. |
- Returns
- The result
- Template Parameters
-
TOBjectRef | the expected object type. |
- Exceptions
-
Error | if the key exists but the value does not match TObjectRef. |
◆ GetConfig() [2/2]
template<typename TObjectRef >
Optional<TObjectRef> tvm::transform::PassContextNode::GetConfig |
( |
const std::string & |
key, |
|
|
TObjectRef |
default_value |
|
) |
| const |
|
inline |
◆ RegisterReflection()
static void tvm::transform::PassContextNode::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_DECLARE_FINAL_OBJECT_INFO()
tvm::transform::PassContextNode::TVM_DECLARE_FINAL_OBJECT_INFO |
( |
PassContextNode |
, |
|
|
Object |
|
|
) |
| |
◆ _type_key
constexpr const char* tvm::transform::PassContextNode::_type_key = "transform.PassContext" |
|
staticconstexpr |
◆ config
Map<String, Any> tvm::transform::PassContextNode::config |
Pass specific configurations.
◆ diag_ctx
◆ disabled_pass
Array<String> tvm::transform::PassContextNode::disabled_pass |
The list of disabled passes.
◆ instruments
A list of pass instrument implementations.
◆ opt_level
int tvm::transform::PassContextNode::opt_level {2} |
The default optimization level.
◆ required_pass
Array<String> tvm::transform::PassContextNode::required_pass |
The list of required passes.
The documentation for this class was generated from the following file: