Skip to content

Commit b7e5a10

Browse files
authored
Remove the experimental IR graph builder (#2104)
`onnxscript/function_libs/torch_lib/graph_building/_graph_building_ir.py` was experimental and unused. So remove.
1 parent 5575c01 commit b7e5a10

File tree

3 files changed

+6
-742
lines changed

3 files changed

+6
-742
lines changed

onnxscript/function_libs/torch_lib/_flags.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,3 @@ def _load_boolean_flag(
5151
this_will="trace all traceable functions to fold if branches and collapse constant expressions",
5252
default=True,
5353
)
54-
EXPERIMENTAL_USE_IR: bool = _load_boolean_flag(
55-
"TORCHLIB_EXPERIMENTAL_USE_IR",
56-
this_will="use the ONNX IR instead of the PyTorch Graph for graph building",
57-
deprecated=True,
58-
)

onnxscript/function_libs/torch_lib/graph_building/__init__.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,9 @@
4040
"TorchScriptTracingEvaluator",
4141
]
4242

43-
from onnxscript.function_libs.torch_lib import _flags
44-
45-
if _flags.EXPERIMENTAL_USE_IR:
46-
from ._graph_building_ir import (
47-
TorchScriptGraph,
48-
TorchScriptTensor,
49-
TorchScriptTracingEvaluator,
50-
)
51-
else:
52-
from ._graph_building_torch import ( # type: ignore[assignment]
53-
TorchScriptGraph,
54-
TorchScriptTensor,
55-
TorchScriptTracingEvaluator,
56-
)
43+
44+
from ._graph_building_torch import (
45+
TorchScriptGraph,
46+
TorchScriptTensor,
47+
TorchScriptTracingEvaluator,
48+
)

0 commit comments

Comments
 (0)