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 26ba15dfe0f01c5b347997874f229f7c8568c72e..42a5b0bf692bbe2329a528e0c642edfbb23f6767 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 ea86db0f2397eaa759ea50f6b4b0d02fcc7d28ac..34afaa60c2958991e33d351373d0c06cd1e146cc 100644 --- a/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py +++ b/debug/accuracy_tools/msprobe/mindspore/debugger/precision_debugger.py @@ -164,7 +164,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() @@ -179,7 +179,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() @@ -218,7 +218,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: