-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy path__init__.py
49 lines (41 loc) · 1009 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
NOTICE: torchinductor has moved to torch._inductor
This file is a shim to redirect to the new location
For more info see:
https://github.com/pytorch/torchdynamo/issues/681
"""
import importlib
import sys
import torch._inductor
def _populate():
for name in (
"codecache",
"codegen",
"compile_fx",
"config",
"cuda_properties",
"debug",
"decomposition",
"dependencies",
"exc",
"graph",
"ir",
"lowering",
"metrics",
"overrides",
"scheduler",
"sizevars",
"triton_ops",
"utils",
"virtualized",
):
try:
globals()[name] = sys.modules[
f"torchinductor.{name}"
] = importlib.import_module(f"torch._inductor.{name}")
except ImportError:
pass
for name, val in torch._inductor.__dict__.items():
if not name.startswith("_"):
globals()[name] = val
_populate()