Skip to content

Commit

Permalink
cleanup no_eval_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Feb 26, 2025
1 parent 12eaf3e commit 31f8732
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions python/paddle/jit/sot/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,6 @@ def log_enabled(level):
return level <= ENV_SOT_LOG_LEVEL.get_with_cache()


def no_eval_frame(func):
def no_eval_frame_func(*args, **kwargs):
old_cb = paddle.framework.core.set_eval_frame(None)
try:
retval = func(*args, **kwargs)
except:
raise
finally:
paddle.framework.core.set_eval_frame(old_cb)
return retval

return no_eval_frame_func


def is_comprehensive_name(name):
return name in ["<listcomp>", "<dictcomp>", "<setcomp>", "<genexpr>"]

Expand Down

0 comments on commit 31f8732

Please sign in to comment.