PassContextNode contains the information that a pass can rely on, such as analysis results.
More...
#include <transform.h>
|
| | PassContextNode ()=default |
| |
| template<typename TObjectRef > |
| ffi::Optional< TObjectRef > | GetConfig (const std::string &key, ffi::Optional< TObjectRef > default_value=ffi::Optional< TObjectRef >(std::nullopt)) const |
| | Get a config value from the pass context. More...
|
| |
| template<typename TObjectRef > |
| ffi::Optional< TObjectRef > | GetConfig (const std::string &key, TObjectRef default_value) const |
| |
| | TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("transform.PassContext", PassContextNode, Object) |
| |
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 >
| ffi::Optional<TObjectRef> tvm::transform::PassContextNode::GetConfig |
( |
const std::string & |
key, |
|
|
ffi::Optional< TObjectRef > |
default_value = ffi::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 >
| ffi::Optional<TObjectRef> tvm::transform::PassContextNode::GetConfig |
( |
const std::string & |
key, |
|
|
TObjectRef |
default_value |
|
) |
| const |
|
inline |
◆ RegisterReflection()
| static void tvm::transform::PassContextNode::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::transform::PassContextNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"transform.PassContext" |
, |
|
|
PassContextNode |
, |
|
|
Object |
|
|
) |
| |
◆ config
| ffi::Map<ffi::String, Any> tvm::transform::PassContextNode::config |
Pass specific configurations.
◆ diag_ctx
◆ disabled_pass
| ffi::Array<ffi::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
| ffi::Array<ffi::String> tvm::transform::PassContextNode::required_pass |
The list of required passes.
The documentation for this class was generated from the following file: