tvm
|
#include <script_printer.h>
Public Member Functions | |
Array< String > | GetBuiltinKeywords () |
TVM_DECLARE_FINAL_OBJECT_INFO (PrinterConfigNode, Object) | |
Static Public Member Functions | |
static void | RegisterReflection () |
Public Attributes | |
Array< String > | binding_names = {} |
A stack that tracks the names of the binding hierarchy. More... | |
bool | show_meta = false |
Whether or not to show metadata. More... | |
std::string | ir_prefix = "I" |
The prefix of IR nodes. More... | |
std::string | tir_prefix = "T" |
The prefix of TIR nodes. More... | |
std::string | relax_prefix = "R" |
The prefix of Relax nodes. More... | |
std::string | module_alias = "cls" |
The alias of the current module at cross-function call. More... | |
DataType | buffer_dtype = DataType::Float(32) |
Default data type of TIR buffer. More... | |
DataType | int_dtype = DataType::Int(32) |
Default data type of integer literals. More... | |
DataType | float_dtype = DataType::Void() |
Default data type of float literals. Right now we always print out the explicit type of floating point values, so setting it to Void means we do not print without the T.float32/T.float64 wrapper. More... | |
bool | verbose_expr = false |
Whether or not to verbose print expressions. More... | |
int | indent_spaces = 4 |
Number of spaces used for indentation. More... | |
bool | print_line_numbers = false |
Whether to print line numbers. More... | |
int | num_context_lines = -1 |
Number of context lines to print around the underlined text. More... | |
bool | syntax_sugar = true |
Whether to output with syntax sugar, set false for complete printing. More... | |
bool | show_object_address = false |
Whether variable names should include the object's address. More... | |
bool | show_all_struct_info = true |
In Relax, whether to show all StructInfo annotations. More... | |
Array< ffi::reflection::AccessPath > | path_to_underline |
Map< ffi::reflection::AccessPath, String > | path_to_annotate |
Object path to be annotated. More... | |
Array< ObjectRef > | obj_to_underline = Array<ObjectRef>() |
Object to be underlined. More... | |
Map< ObjectRef, String > | obj_to_annotate = Map<ObjectRef, String>() |
Object to be annotated. More... | |
Static Public Attributes | |
static constexpr const char * | _type_key = "script.PrinterConfig" |
Array<String> tvm::PrinterConfigNode::GetBuiltinKeywords | ( | ) |
|
inlinestatic |
tvm::PrinterConfigNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | PrinterConfigNode | , |
Object | |||
) |
|
staticconstexpr |
Array<String> tvm::PrinterConfigNode::binding_names = {} |
A stack that tracks the names of the binding hierarchy.
DataType tvm::PrinterConfigNode::buffer_dtype = DataType::Float(32) |
Default data type of TIR buffer.
DataType tvm::PrinterConfigNode::float_dtype = DataType::Void() |
Default data type of float literals. Right now we always print out the explicit type of floating point values, so setting it to Void means we do not print without the T.float32/T.float64 wrapper.
int tvm::PrinterConfigNode::indent_spaces = 4 |
Number of spaces used for indentation.
DataType tvm::PrinterConfigNode::int_dtype = DataType::Int(32) |
Default data type of integer literals.
std::string tvm::PrinterConfigNode::ir_prefix = "I" |
The prefix of IR nodes.
std::string tvm::PrinterConfigNode::module_alias = "cls" |
The alias of the current module at cross-function call.
int tvm::PrinterConfigNode::num_context_lines = -1 |
Number of context lines to print around the underlined text.
Map<ObjectRef, String> tvm::PrinterConfigNode::obj_to_annotate = Map<ObjectRef, String>() |
Object to be annotated.
Array<ObjectRef> tvm::PrinterConfigNode::obj_to_underline = Array<ObjectRef>() |
Object to be underlined.
Map<ffi::reflection::AccessPath, String> tvm::PrinterConfigNode::path_to_annotate |
Object path to be annotated.
Array<ffi::reflection::AccessPath> tvm::PrinterConfigNode::path_to_underline |
bool tvm::PrinterConfigNode::print_line_numbers = false |
Whether to print line numbers.
std::string tvm::PrinterConfigNode::relax_prefix = "R" |
The prefix of Relax nodes.
bool tvm::PrinterConfigNode::show_all_struct_info = true |
In Relax, whether to show all StructInfo annotations.
If true (default), all variable bindings will be annotated with the struct info of the variable being bound.
If false, the annotations will only be shown when they are required for correct parsing of the Relax function. For example, function parameters must always have struct info annotations, but the struct info for expressions within a function body may be inferred from their arguments, and are therefore
Example:
bool tvm::PrinterConfigNode::show_meta = false |
Whether or not to show metadata.
bool tvm::PrinterConfigNode::show_object_address = false |
Whether variable names should include the object's address.
bool tvm::PrinterConfigNode::syntax_sugar = true |
Whether to output with syntax sugar, set false for complete printing.
std::string tvm::PrinterConfigNode::tir_prefix = "T" |
The prefix of TIR nodes.
bool tvm::PrinterConfigNode::verbose_expr = false |
Whether or not to verbose print expressions.