diff --git a/debug/accuracy_tools/msprobe/docs/06.data_dump_MindSpore.md b/debug/accuracy_tools/msprobe/docs/06.data_dump_MindSpore.md index 32272668e8a700d2e4b873f63453dcf32f6b4716..aaf7c8a99b506fe29141c53ab4d8f19eac563d6a 100644 --- a/debug/accuracy_tools/msprobe/docs/06.data_dump_MindSpore.md +++ b/debug/accuracy_tools/msprobe/docs/06.data_dump_MindSpore.md @@ -88,7 +88,7 @@ PrecisionDebugger(config_path=None, task=None, dump_path=None, level=None, step= #### 6.1.1 start -**功能说明**:启动精度数据采集。如果没有使用 [Model](https://gitee.com/link?target=https%3A%2F%2Fwww.mindspore.cn%2Ftutorials%2Fzh-CN%2Fr2.3.1%2Fadvanced%2Fmodel.html) 高阶 API 进行训练,则需要与 stop 函数一起添加在 for 循环内,否则只有需要传入model参数时,才使用该接口。 +**功能说明**:启动精度数据采集。静态图场景下,必须在mindspore.communication.init 调用前添加。如果没有使用 [Model](https://gitee.com/link?target=https%3A%2F%2Fwww.mindspore.cn%2Ftutorials%2Fzh-CN%2Fr2.3.1%2Fadvanced%2Fmodel.html) 高阶 API 进行训练,则需要与 stop 函数一起添加在 for 循环内,否则只有需要传入model参数时,才使用该接口。 **原型**: diff --git a/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py b/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py index ddde912946f221af9962f81c4fa5db5be8e83169..eca71a4755f21625601f8beaeef2ebdd83af21ff 100644 --- a/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py +++ b/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py @@ -165,7 +165,7 @@ class PrecisionDebugger(BasePrecisionDebugger): instance.service.stop() else: Runtime.is_running = False - if enable_dynamic_kbyk_dump: + if enable_dynamic_kbyk_dump and instance.config.level_ori == Const.LEVEL_L2: _dump_stop() if cls._is_kernel_dump() and _msprobe_c: _msprobe_c._PrecisionDebugger().stop() @@ -181,7 +181,7 @@ class PrecisionDebugger(BasePrecisionDebugger): instance.service.step() if is_graph_mode_cell_dump_allowed(instance.config): GraphModeCellDump.step() - if enable_dynamic_kbyk_dump: + if enable_dynamic_kbyk_dump and instance.config.level_ori == Const.LEVEL_L2: _dump_step(1) if cls._is_kernel_dump() and _msprobe_c: _msprobe_c._PrecisionDebugger().step() @@ -222,7 +222,7 @@ class PrecisionDebugger(BasePrecisionDebugger): if not instance: raise Exception(MsgConst.NOT_CREATED_INSTANCE) if instance.config.level_ori == Const.LEVEL_L2: - return False + return not instance._is_graph_dump(instance.config) if instance.config.execution_mode != MsConst.PYNATIVE_MODE: return False else: