diff --git a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/debugger/precision_debugger.py b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/debugger/precision_debugger.py index fa4346873895a1872400a5a9d6ee9458f4b6998e..20edab073ba1efc3c03034e48b0c6ef9f68327bc 100644 --- a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/debugger/precision_debugger.py +++ b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/debugger/precision_debugger.py @@ -154,8 +154,12 @@ class PrecisionDebugger: def iter_tracer(func): def func_wrapper(*args, **kwargs): - PrecisionDebugger.stop() + debugger_instance = PrecisionDebugger._instance + temp_enable_dataloader = debugger_instance.enable_dataloader + debugger_instance.enable_dataloader = False + debugger_instance.stop() result = func(*args, **kwargs) - PrecisionDebugger.incr_iter_num_maybe_exit() + debugger_instance.incr_iter_num_maybe_exit() + debugger_instance.enable_dataloader = temp_enable_dataloader return result return func_wrapper