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

Function _default_globals

python/tvm/script/parser/core/entry.py:39–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def _default_globals() -> dict[str, Any]:
40 # lazy import here to avoid circular deps
41 from tvm.script import tirx as _tirx_dsl # pylint: disable=import-outside-toplevel
42 from tvm.script.parser import (
43 ir, # pylint: disable=import-outside-toplevel
44 relax, # pylint: disable=import-outside-toplevel
45 )
46 from tvm.script.parser import tirx as _tirx_parser # pylint: disable=import-outside-toplevel
47 from tvm.script.tirx import tile as _tirx_tile # pylint: disable=import-outside-toplevel
48 from tvm.tirx import layout as _tirx_layout # pylint: disable=import-outside-toplevel
49
50 # Expose the layout `Axis` class so printed layout sugar like
51 # `4 @ Axis.laneid` round-trips without per-script imports. Injecting just
52 # `Axis` (one short symbol) avoids name collisions with common user shape
53 # vars like `m`, `P`, `F` that registered axes happen to share names with.
54 return {
55 "tvm": tvm,
56 "I": ir,
57 "ir": ir,
58 "T": _tirx_parser,
59 "tir": _tirx_parser,
60 "R": relax,
61 "relax": relax,
62 "Tx": _tirx_tile,
63 "tirx": _tirx_dsl,
64 "Axis": _tirx_layout.Axis,
65 }
66
67
68def scan_macro(program: Any | str, extra_vars: dict[str, Any] | None = None) -> Any:

Callers 2

scan_macroFunction · 0.85
parseFunction · 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…