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

Method show

python/tvm/runtime/script_printer.py:297–418  ·  view source on GitHub ↗

A sugar for print highlighted TVM script. Parameters ---------- style : str, optional Pygmentize printing style, auto-detected if None. See `tvm.script.highlight.cprint` for more details. black_format: Optional[bool] If true, us

(
        self,
        style: str | None = None,
        black_format: bool | None = None,
        *,
        name: str | None = None,
        show_meta: bool = False,
        ir_prefix: str = "I",
        module_alias: str = "cls",
        int_dtype: str = "int32",
        float_dtype: str = "void",
        verbose_expr: bool = False,
        indent_spaces: int = 4,
        print_line_numbers: bool = False,
        num_context_lines: int = -1,
        syntax_sugar: bool = True,
        show_object_address: bool = False,
        show_all_struct_info: bool = True,
        extra_config: dict | None = None,
        path_to_underline: list[AccessPath] | None = None,
        path_to_annotate: dict[AccessPath, str] | None = None,
        obj_to_underline: list[Object] | None = None,
        obj_to_annotate: dict[Object, str] | None = None,
    )

Source from the content-addressed store, hash-verified

295 )
296
297 def show(
298 self,
299 style: str | None = None,
300 black_format: bool | None = None,
301 *,
302 name: str | None = None,
303 show_meta: bool = False,
304 ir_prefix: str = "I",
305 module_alias: str = "cls",
306 int_dtype: str = "int32",
307 float_dtype: str = "void",
308 verbose_expr: bool = False,
309 indent_spaces: int = 4,
310 print_line_numbers: bool = False,
311 num_context_lines: int = -1,
312 syntax_sugar: bool = True,
313 show_object_address: bool = False,
314 show_all_struct_info: bool = True,
315 extra_config: dict | None = None,
316 path_to_underline: list[AccessPath] | None = None,
317 path_to_annotate: dict[AccessPath, str] | None = None,
318 obj_to_underline: list[Object] | None = None,
319 obj_to_annotate: dict[Object, str] | None = None,
320 ) -> None:
321 """A sugar for print highlighted TVM script.
322
323 Parameters
324 ----------
325 style : str, optional
326 Pygmentize printing style, auto-detected if None. See
327 `tvm.script.highlight.cprint` for more details.
328
329 black_format: Optional[bool]
330
331 If true, use the formatter Black to format the TVMScript.
332 If false, do not apply the auto-formatter.
333
334 If None (default), determine the behavior based on the
335 environment variable "TVM_BLACK_FORMAT". If this
336 environment variable is unset, set to the empty string, or
337 set to the integer zero, black auto-formatting will be
338 disabled. If the environment variable is set to a
339 non-zero integer, black auto-formatting will be enabled.
340
341 Note that the "TVM_BLACK_FORMAT" environment variable only
342 applies to the `.show()` method, and not the underlying
343 `.script()` method. The `.show()` method is intended for
344 human-readable output based on individual user
345 preferences, while the `.script()` method is intended to
346 provided a consistent output regardless of environment.
347
348 name : Optional[str] = None
349 The name of the object
350 show_meta : bool = False
351 Whether to print the meta data of the object
352 ir_prefix : str = "I"
353 The prefix of AST nodes from tvm.ir
354 module_alias : str = "cls"

Callers

nothing calls this directly

Calls 3

scriptMethod · 0.95
cprintFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected