From d6eab81b66a690d207b87acab199074128388768 Mon Sep 17 00:00:00 2001 From: z30043230 Date: Tue, 12 Aug 2025 14:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=96=99=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profiler/msprof_analyze/docs/pp_chart.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler/msprof_analyze/docs/pp_chart.md b/profiler/msprof_analyze/docs/pp_chart.md index 244ad4bb7..8535c1bbe 100644 --- a/profiler/msprof_analyze/docs/pp_chart.md +++ b/profiler/msprof_analyze/docs/pp_chart.md @@ -56,7 +56,7 @@ import torch_npu def step_wrapper(func, msg: str): def wrapper(*args, **kwargs): new_msg = {"name": msg} - if msg = "forward_step_with_model_graph" and kwargs.get("extra_block_kwargs") is not None: + if msg == "forward_step_with_model_graph" and kwargs.get("extra_block_kwargs") is not None: new_msg["name"] = "forward_backward_overlaping" if "current_microbatch" in kwargs: new_msg["current_microbatch"] = kwargs["current_microbatch"] @@ -80,7 +80,7 @@ WeightGradStore.pop = step_wrapper(WeightGradStore.pop, "WeightGradStore.pop") 同时,采集profiling数据时,如果使用的是MindSpeed,未使用MindSpeed-LLM,需要在prof定义(```prof = torch_npu.profiler.profile(...)```)的后面添加metadata代码: ``` -prof.add_metadata('pp_info', json.dumps( +prof.add_metadata_json('pp_info', json.dumps( { 'pp_type': 'dualpipev', 'microbatch_num': 10, @@ -90,7 +90,7 @@ prof.add_metadata('pp_info', json.dumps( ``` 如果使用MindSpeed-LLM,在```mindspeed-llm/training/training.py```中```prof.add_metadata_json('distributed_args'...)```的后面添加metadata代码: ``` -prof.add_metadata('pp_info', json.dumps( +prof.add_metadata_json('pp_info', json.dumps( { 'pp_type': args.schedules_method, 'microbatch_num': args.global_batch_size // args.micro_batch_size // args.data_parallel_size -- Gitee