MCPcopy Index your code
hub / github.com/apache/tvm / PrinterConfig

Class PrinterConfig

python/tvm/runtime/script_printer.py:31–106  ·  view source on GitHub ↗

Configuration of TVMScript printer

Source from the content-addressed store, hash-verified

29
30@register_object("script.PrinterConfig")
31class PrinterConfig(Object):
32 """Configuration of TVMScript printer"""
33
34 binding_names: Sequence[str]
35 show_meta: bool
36 ir_prefix: str
37 module_alias: str
38 buffer_dtype: str
39 int_dtype: str
40 float_dtype: str
41 verbose_expr: bool
42 indent_spaces: int
43 print_line_numbers: bool
44 num_context_lines: int
45 syntax_sugar: bool
46 show_object_address: bool
47 extra_config: dict
48 path_to_underline: list[AccessPath] | None
49 path_to_annotate: dict[AccessPath, str] | None
50 obj_to_underline: list[AccessPath] | None
51 obj_to_annotate: dict[AccessPath, str] | None
52
53 def __init__(
54 self,
55 *,
56 name: str | None = None,
57 show_meta: bool = False,
58 ir_prefix: str = "I",
59 module_alias: str = "cls",
60 buffer_dtype: str = "float32",
61 int_dtype: str = "int32",
62 float_dtype: str = "void",
63 verbose_expr: bool = False,
64 indent_spaces: int = 4,
65 print_line_numbers: bool = False,
66 num_context_lines: int | None = None,
67 syntax_sugar: bool = True,
68 show_object_address: bool = False,
69 show_all_struct_info: bool = True,
70 extra_config: dict | None = None,
71 path_to_underline: list[AccessPath] | None = None,
72 path_to_annotate: dict[AccessPath, str] | None = None,
73 obj_to_underline: list[Object] | None = None,
74 obj_to_annotate: dict[Object, str] | None = None,
75 ) -> None:
76 if num_context_lines is None:
77 num_context_lines = -1
78 cfg: dict = {
79 "show_meta": show_meta,
80 "ir_prefix": ir_prefix,
81 "module_alias": module_alias,
82 "buffer_dtype": buffer_dtype,
83 "int_dtype": int_dtype,
84 "float_dtype": float_dtype,
85 "verbose_expr": verbose_expr,
86 "indent_spaces": indent_spaces,
87 "print_line_numbers": print_line_numbers,
88 "num_context_lines": num_context_lines,

Callers 4

to_python_scriptFunction · 0.90
assert_structural_equalFunction · 0.90
scriptMethod · 0.85
_relax_scriptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…