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

Method show

python/tvm/relax/base_py_module.py:603–616  ·  view source on GitHub ↗

A sugar for print highlighted TVM script with Python function support. This method extends the standard IRModule show() method to handle Python functions stored in the IRModule's pyfuncs attribute.

(self, style: str | None = None, black_format: bool | None = None, **kwargs)

Source from the content-addressed store, hash-verified

601 return "\n".join(formatted_lines)
602
603 def show(self, style: str | None = None, black_format: bool | None = None, **kwargs) -> None:
604 """A sugar for print highlighted TVM script with Python function support.
605
606 This method extends the standard IRModule show() method to handle
607 Python functions stored in the IRModule's pyfuncs attribute.
608 """
609 from tvm.script.highlight import cprint # pylint: disable=import-outside-toplevel
610
611 if black_format is None:
612 env = os.environ.get("TVM_BLACK_FORMAT")
613 black_format = env and int(env)
614
615 script_content = self.script(**kwargs)
616 cprint(script_content, style=style, black_format=black_format)

Callers 2

_checkMethod · 0.45

Calls 3

scriptMethod · 0.95
cprintFunction · 0.90
getMethod · 0.45

Tested by 1