Skip to content

Commit

Permalink
disable nested debug inside prepare_debug
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao committed Mar 6, 2024
1 parent 8b4bbd6 commit 12d2c79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depyf/explain/enable_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ def prepare_debug(dump_src_dir, clean_wild_fx_code=True, log_bytecode=False):
@contextlib.contextmanager
def debug():
from .global_variables import data
if data["is_inside_prepare_debug"]:
raise RuntimeError("You cannot use `depyf.debug` inside `depyf.prepare_debug`.")
dump_src_dir = data["dump_src_dir"]
import torch
callback = torch._dynamo.eval_frame.set_eval_frame(False)
Expand Down

0 comments on commit 12d2c79

Please sign in to comment.