Skip to content

Remove the experimental IR graph builder #2104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions onnxscript/function_libs/torch_lib/_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,3 @@ def _load_boolean_flag(
this_will="trace all traceable functions to fold if branches and collapse constant expressions",
default=True,
)
EXPERIMENTAL_USE_IR: bool = _load_boolean_flag(
"TORCHLIB_EXPERIMENTAL_USE_IR",
this_will="use the ONNX IR instead of the PyTorch Graph for graph building",
deprecated=True,
)
20 changes: 6 additions & 14 deletions onnxscript/function_libs/torch_lib/graph_building/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,9 @@
"TorchScriptTracingEvaluator",
]

from onnxscript.function_libs.torch_lib import _flags

if _flags.EXPERIMENTAL_USE_IR:
from ._graph_building_ir import (
TorchScriptGraph,
TorchScriptTensor,
TorchScriptTracingEvaluator,
)
else:
from ._graph_building_torch import ( # type: ignore[assignment]
TorchScriptGraph,
TorchScriptTensor,
TorchScriptTracingEvaluator,
)

from ._graph_building_torch import (
TorchScriptGraph,
TorchScriptTensor,
TorchScriptTracingEvaluator,
)
Loading
Loading