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

Method _relax_script

python/tvm/runtime/script_printer.py:253–295  ·  view source on GitHub ↗
(
        self,
        *,
        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,
        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

251 )
252
253 def _relax_script(
254 self,
255 *,
256 name: str | None = None,
257 show_meta: bool = False,
258 ir_prefix: str = "I",
259 module_alias: str = "cls",
260 int_dtype: str = "int32",
261 float_dtype: str = "void",
262 verbose_expr: bool = False,
263 indent_spaces: int = 4,
264 print_line_numbers: bool = False,
265 num_context_lines: int = -1,
266 syntax_sugar: bool = True,
267 show_object_address: bool = False,
268 extra_config: dict | None = None,
269 path_to_underline: list[AccessPath] | None = None,
270 path_to_annotate: dict[AccessPath, str] | None = None,
271 obj_to_underline: list[Object] | None = None,
272 obj_to_annotate: dict[Object, str] | None = None,
273 ) -> str:
274 return _relax_script(
275 self,
276 PrinterConfig(
277 name=name,
278 show_meta=show_meta,
279 ir_prefix=ir_prefix,
280 module_alias=module_alias,
281 int_dtype=int_dtype,
282 float_dtype=float_dtype,
283 verbose_expr=verbose_expr,
284 indent_spaces=indent_spaces,
285 print_line_numbers=print_line_numbers,
286 num_context_lines=num_context_lines,
287 syntax_sugar=syntax_sugar,
288 show_object_address=show_object_address,
289 extra_config=extra_config,
290 path_to_underline=path_to_underline,
291 path_to_annotate=path_to_annotate,
292 obj_to_underline=obj_to_underline,
293 obj_to_annotate=obj_to_annotate,
294 ),
295 )
296
297 def show(
298 self,

Callers 2

test_tuple_typeFunction · 0.80
test_func_typeFunction · 0.80

Calls 2

_relax_scriptFunction · 0.85
PrinterConfigClass · 0.85

Tested by 2

test_tuple_typeFunction · 0.64
test_func_typeFunction · 0.64