Skip to content

Commit 409c59d

Browse files
SigureMoCopilot
andauthored
[Dy2St] Drop legacy IR support in SOT mode (#71520)
--------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e04d497 commit 409c59d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/paddle/jit/sot/translate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ def symbolic_translate(fn: Callable[P, R], **kwargs) -> Callable[P, R]:
8888
8989
"""
9090

91+
if not paddle.framework.use_pir_api():
92+
raise RuntimeError(
93+
"SOT is only supported when running in PIR mode. Please set the environment variable "
94+
"FLAGS_enable_pir_api=1 to enable it."
95+
)
96+
9197
kwargs.setdefault('training', True)
9298

9399
def callback(frame):

0 commit comments

Comments
 (0)