27#ifndef TVM_SCRIPT_PRINTER_CONFIG_H_
28#define TVM_SCRIPT_PRINTER_CONFIG_H_
30#include <tvm/ffi/any.h>
31#include <tvm/ffi/container/array.h>
32#include <tvm/ffi/container/map.h>
33#include <tvm/ffi/dtype.h>
34#include <tvm/ffi/reflection/access_path.h>
35#include <tvm/ffi/reflection/registry.h>
36#include <tvm/ffi/string.h>
68 ffi::Map<ffi::ObjectRef, ffi::String>
obj_to_annotate = ffi::Map<ffi::ObjectRef, ffi::String>();
93 return (*it).second.as_or_throw<T>();
97 namespace refl = tvm::ffi::reflection;
98 refl::ObjectDef<PrinterConfigObj>()
122 ffi::Map<ffi::String, ffi::Any> config_dict = ffi::Map<ffi::String, ffi::Any>());
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("script.PrinterConfig", PrinterConfigObj, ffi::Object)
static void RegisterReflection()
Definition config.h:96
bool print_line_numbers
Whether to print line numbers.
Definition config.h:54
ffi::Array< ffi::reflection::AccessPath > path_to_underline
Definition config.h:62
bool show_meta
Whether or not to show metadata.
Definition config.h:48
ffi::Map< ffi::ObjectRef, ffi::String > obj_to_annotate
ffi::Object to be annotated.
Definition config.h:68
ffi::Map< ffi::reflection::AccessPath, ffi::String > path_to_annotate
ffi::Object path to be annotated.
Definition config.h:64
ffi::Array< ffi::ObjectRef > obj_to_underline
ffi::Object to be underlined.
Definition config.h:66
bool verbose_expr
Whether or not to verbose print expressions.
Definition config.h:50
bool render_invisible_path_info
Whether to render access-path context for invisible underlined paths. Defaults true.
Definition config.h:59
ffi::Map< ffi::String, ffi::Any > extra_config
Generic extension map for dialect-specific config knobs.
Definition config.h:81
int num_context_lines
Number of context lines to print around the underlined text.
Definition config.h:56
ffi::Array< ffi::String > binding_names
A stack that tracks the names of the binding hierarchy.
Definition config.h:46
static constexpr const bool _type_mutable
Definition config.h:115
T GetExtraConfig(const ffi::String &key, T fallback) const
Look up a value in extra_config with type cast and fallback.
Definition config.h:90
int indent_spaces
Number of spaces used for indentation.
Definition config.h:52
ffi::Array< ffi::String > GetBuiltinKeywords()
PrinterConfig(ffi::Map< ffi::String, ffi::Any > config_dict=ffi::Map< ffi::String, ffi::Any >())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(PrinterConfig, ffi::ObjectRef, PrinterConfigObj)
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
TVM_TIRX_DLL std::string RedirectedReprPrinterMethod(const ffi::ObjectRef &obj)
Render an IR object for its registered repr callback.
#define TVM_TIRX_DLL
Definition base.h:83