你好,从报错看已经出现Loading extension module npu_matmul_add_fp32... ,根据经验,出现这个打印的时候,已经加载完数据集,下一步就是出loss。如果还没加载数据集,请尝试
js1234567所提到的排查方法。如果已经加载完数据集,可以尝试如下方法
1 . 模型减层,都减到一层,降低计算量,看是否正常出loss。减到一层,还是不正常,请通过减少视频数量缩减序列长度。
2 . 设置export ASCEND_LAUNCH_BLOCKING=1并增加环境变量export ASCEND_PROCESS_LOG_PATH= 指定plog日志落盘路径,将plog发出。现在怀疑可能是序列长度太长,算子执行时间太长,超时了。
最后,这么长的序列,你可以开启CP试试。


感谢您使用Mindspeed-MM,您可以先试试缩小数据集,看看是否因为数据集过大,前期加载过久
你好,我把数据集换成了一个平均40s的视频问答数据集,然后每秒抽一帧,进行全量微调,然后就可以正常训练了,128帧的无法训练可能是序列过长?有没有什么办法解决


感谢您使用Mindspeed-MM,您可以先试试缩小数据集,看看是否因为数据集过大,前期加载过久
你好,我把数据集换成了一个平均40s的视频问答数据集,然后每秒抽一帧,进行全量微调,然后就可以正常训练了,128帧的无法训练可能是序列过长?有没有什么办法解决
序列过长可能需要采集一下profiling结果看看优化方向了,推测可能出现了长序列fa降频问题


你好,从报错看已经出现
Loading extension module npu_matmul_add_fp32...,根据经验,出现这个打印的时候,已经加载完数据集,下一步就是出loss。如果还没加载数据集,请尝试
js1234567所提到的排查方法。如果已经加载完数据集,可以尝试如下方法1 . 模型减层,都减到一层,降低计算量,看是否正常出loss。减到一层,还是不正常,请通过减少视频数量缩减序列长度。
2 . 设置export ASCEND_LAUNCH_BLOCKING=1并增加环境变量export ASCEND_PROCESS_LOG_PATH=指定plog日志落盘路径,将plog发出。现在怀疑可能是序列长度太长,算子执行时间太长,超时了。最后,这么长的序列,你可以开启CP试试。
这个MindSpeed-MM更换成了master版本,当我设置export ASCEND_LAUNCH_BLOCKING=1和export ASCEND_PROCESS_LOG_PATH=1后下面为报错的日志信息,设置数据集最大帧数为120帧,TP=2,PP=4。之前尝试开启CP会报错
training ...
(min, max) time across ranks (ms):
model-and-optimizer-setup ......................: (3027.20, 3038.69)
train/valid/test-data-iterators-setup ..........: (52762.04, 52763.42)
[before the start of training step] datetime: 2025-11-26 07:56:12
[2025-11-26 07:56:12] [WARNING] [745] profiler.py: Invalid parameter export_type: None, reset it to text.
[2025-11-26 07:56:12] [WARNING] [745] profiler.py: Profiler won't be using warmup, this can skew profiler results
...
/usr/local/python3.11.13/lib/python3.11/site-packages/torch/autograd/function.py:575: UserWarning: Cannot create tensor with interal format while allow_internel_format=False, tensor will be created with base format. (Triggered internally at build/CMakeFiles/torch_npu.dir/compiler_depend.ts:335.)
return super().apply(*args, **kwargs) # type: ignore[misc]
Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root...
Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py311_cpu/npu_matmul_add_fp32/build.ninja...
Building extension module npu_matmul_add_fp32...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module npu_matmul_add_fp32...
Loading extension module npu_matmul_add_fp32...
Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root...
Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py311_cpu/npu_matmul_add_fp32/build.ninja...
Building extension module npu_matmul_add_fp32...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module npu_matmul_add_fp32...
Loading extension module npu_matmul_add_fp32...
[rank4]: Traceback (most recent call last):
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/pretrain_vlm.py", line 252, in <module>
[rank4]: pretrain(
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 292, in pretrain
[rank4]: iteration, num_floating_point_operations_so_far = train(
[rank4]: ^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 113, in wrapper
[rank4]: return step_fn(*args, **kwargs)
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 546, in train
[rank4]: loss_dict, skipped_iter, grad_norm, num_zeros_in_grad = train_step(
[rank4]: ^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 126, in wrapper
[rank4]: ret = step_fn(*args, **kwargs)
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 753, in train_step
[rank4]: losses_reduced = forward_backward_func(
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1940, in forward_backward_pipelining_without_interleaving
[rank4]: input_tensor = send_backward_recv_forward(
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1712, in send_backward_recv_forward
[rank4]: input_tensor = p2p_communication.send_backward_recv_forward(
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 554, in send_backward_recv_forward
[rank4]: input_tensor, _, _ = _communicate(
[rank4]: ^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/adaptor.py", line 77, in mindspeed_communicate
[rank4]: return communicate_impl(
[rank4]: ^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 205, in communicate_impl
[rank4]: recv_prev_shape, recv_next_shape = communicate_shapes_impl(
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 102, in communicate_shapes_impl
[rank4]: reqs = p2p_func(
[rank4]: ^^^^^^^^^
[rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 198, in _p2p_ops
[rank4]: send_prev_req = torch.distributed.isend(
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 2375, in isend
[rank4]: return group.send([tensor], group_dst, tag)
[rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank4]: RuntimeError: InnerRunOpApi:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:281 OPS function error: HcclSend, error code is 6
[rank4]: [ERROR] 2025-11-26-08:00:42 (PID:749, Device:4, RankID:4) ERR01100 OPS call acl api failed.
[rank4]: EI0006: [PID: 749] 2025-11-26-08:00:12.177.688 Getting socket times out. Reason: Remote Rank did not send the data in time. Please check the reason for the rank being stuck
[rank4]: Solution: 1. Check the rank service processes with other errors or no errors in the cluster.2. If this error is reported for all NPUs, check whether the time difference between the earliest and latest errors is greater than the connect timeout interval (120s by default). If so, adjust the timeout interval by using the HCCL_CONNECT_TIMEOUT environment variable.3. Check the connectivity of the communication link between nodes. (For example, run the 'hccn_tool -i $devid -tls -g' command to check the TLS status of each NPU).
[rank4]: TraceBack (most recent call last):
[rank4]: Transport init error. Reason: [Create][DestLink]Create Dest error! createLink para:rank[1]-localUserrank[1]-localIpAddr[10.44.154.66], dst_rank[0]-remoteUserrank[0]-remote_ip_addr[10.44.154.66]


[rank3]: Traceback (most recent call last):
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/pretrain_vlm.py", line 252, in <module>
[rank3]: pretrain(
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 292, in pretrain
[rank3]: iteration, num_floating_point_operations_so_far = train(
[rank3]: ^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 113, in wrapper
[rank3]: return step_fn(*args, **kwargs)
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 546, in train
[rank3]: loss_dict, skipped_iter, grad_norm, num_zeros_in_grad = train_step(
[rank3]: ^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 126, in wrapper
[rank3]: ret = step_fn(*args, **kwargs)
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 753, in train_step
[rank3]: losses_reduced = forward_backward_func(
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1912, in forward_backward_pipelining_without_interleaving
[rank3]: output_tensor_grad = send_forward_recv_backward(
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1695, in send_forward_recv_backward
[rank3]: output_tensor_grad = p2p_communication.send_forward_recv_backward(
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 529, in send_forward_recv_backward
[rank3]: _, output_tensor_grad, _ = _communicate(
[rank3]: ^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/adaptor.py", line 77, in mindspeed_communicate
[rank3]: return communicate_impl(
[rank3]: ^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 205, in communicate_impl
[rank3]: recv_prev_shape, recv_next_shape = communicate_shapes_impl(
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 102, in communicate_shapes_impl
[rank3]: reqs = p2p_func(
[rank3]: ^^^^^^^^^
[rank3]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 223, in _p2p_ops
[rank3]: recv_next_req = torch.distributed.irecv(
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 2420, in irecv
[rank3]: return group.recv([tensor], group_src, tag)
[rank3]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank3]: RuntimeError: InnerRunOpApi:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:281 OPS function error: HcclRecv, error code is 6
[rank3]: [ERROR] 2025-11-26-08:04:56 (PID:748, Device:3, RankID:3) ERR01100 OPS call acl api failed.
[rank3]: EI0009: [PID: 748] 2025-11-26-08:04:56.668.126 Transport init error. Reason: [Create][DestLink]Create Dest error! createLink para:rank[0]-localUserrank[0]-localIpAddr[10.44.154.66], dst_rank[1]-remoteUserrank[1]-remote_ip_addr[10.44.154.66]
[rank3]: Solution: Check other NPUs that are not reporting errors, or check if there are any abnormalities on the other end's NPU.
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
W1126 08:05:52.697000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 745 closing signal SIGTERM
W1126 08:05:52.698000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 746 closing signal SIGTERM
W1126 08:05:52.699000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 747 closing signal SIGTERM
W1126 08:05:52.699000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 748 closing signal SIGTERM
W1126 08:05:52.700000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 750 closing signal SIGTERM
W1126 08:05:52.700000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 751 closing signal SIGTERM
W1126 08:05:52.701000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 752 closing signal SIGTERM
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError


/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
E1126 08:05:55.239000 676 site-packages/torch/distributed/elastic/multiprocessing/api.py:869] failed (exitcode: 1) local_rank: 4 (pid: 749) of binary: /usr/local/python3.11.13/bin/python3.11
Traceback (most recent call last):
File "/usr/local/python3.11.13/bin/torchrun", line 7, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/run.py", line 918, in main
run(args)
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/run.py", line 909, in run
elastic_launch(
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/launcher/api.py", line 138, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/launcher/api.py", line 269, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
pretrain_vlm.py FAILED
------------------------------------------------------------
Failures:
<NO_OTHER_FAILURES>
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
time : 2025-11-26_08:05:52
host : worker-66
rank : 4 (local_rank: 4)
exitcode : 1 (pid: 749)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================
[ERROR] 2025-11-26-08:05:55 (PID:676, Device:-1, RankID:-1) ERR99999 UNKNOWN applicaiton exception


这里我设置最大帧数是30的时候,可以训练了,但是训练速度很慢。是不是视频的长度和训练速度有关?我之前是40s的视频抽40帧,可以正常训练;这里是三四分钟的视频抽40帧,发现训练的非常慢,并且AI core几乎不动
Loading extension module npu_matmul_add_fp32...
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/fp8_utils.py:11: UserWarning: Currently, it is not supported to Cast shard fp32 main params to fp8 model params
warnings.warn("Currently, it is not supported to Cast shard fp32 main params to fp8 model params")
[2025-11-26 11:28:23] iteration 1/ 150 | consumed samples: 10 | elapsed time per iteration (ms): 2477289.2 | learning rate: 0.000000E+00 | global batch size: 10 | loss: 1.401060E-01 | loss scale: 1.0 | grad norm: 18.441 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
[Rank 4] (after 2 iterations) memory (MB) | allocated: 20306.8779296875 | max allocated: 24916.529296875 | reserved: 25866.0 | max reserved: 25866.0
[2025-11-26 12:03:45] iteration 2/ 150 | consumed samples: 20 | elapsed time per iteration (ms): 2121580.4 | learning rate: 1.333333E-06 | global batch size: 10 | loss: 1.388947E-01 | loss scale: 1.0 | grad norm: 15.587 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
Number of parameters in transformer block in billions: 7.14
Number of parameters in embedding layers in billions: 0.55
Total number of parameters in billions: 7.69
Number of parameters in most loaded shard in billions: 1.1653
Number of parameters in other shards in billions: 0.8928
Theoretical memory footprints: weight and optimizer=20003.44 MB
[Rank 5] (after 2 iterations) memory (MB) | allocated: 20306.8779296875 | max allocated: 24916.529296875 | reserved: 25866.0 | max reserved: 25866.0
[Rank 2] (after 2 iterations) memory (MB) | allocated: 20306.8779296875 | max allocated: 25901.46044921875 | reserved: 26826.0 | max reserved: 26826.0
[Rank 7] (after 2 iterations) memory (MB) | allocated: 18983.4248046875 | max allocated: 31476.9443359375 | reserved: 35006.0 | max reserved: 35006.0
[Rank 6] (after 2 iterations) memory (MB) | allocated: 18983.4248046875 | max allocated: 31476.9443359375 | reserved: 35006.0 | max reserved: 35006.0
[Rank 3] (after 2 iterations) memory (MB) | allocated: 20306.8779296875 | max allocated: 25901.46044921875 | reserved: 26826.0 | max reserved: 26826.0
[Rank 0] (after 2 iterations) memory (MB) | allocated: 7555.14892578125 | max allocated: 12718.77294921875 | reserved: 12668.0 | max reserved: 12784.0
[Rank 1] (after 2 iterations) memory (MB) | allocated: 7555.14892578125 | max allocated: 12718.77294921875 | reserved: 12668.0 | max reserved: 12784.0
[2025-11-26 12:25:42] iteration 3/ 150 | consumed samples: 30 | elapsed time per iteration (ms): 1317859.7 | learning rate: 2.666667E-06 | global batch size: 10 | loss: 1.073673E-01 | loss scale: 1.0 | grad norm: 11.223 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
[2025-11-26 12:37:36] iteration 4/ 150 | consumed samples: 40 | elapsed time per iteration (ms): 713827.5 | learning rate: 4.000000E-06 | global batch size: 10 | loss: 8.372531E-02 | loss scale: 1.0 | grad norm: 7.456 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
[2025-11-26 13:01:39] iteration 5/ 150 | consumed samples: 50 | elapsed time per iteration (ms): 1443274.1 | learning rate: 5.333333E-06 | global batch size: 10 | loss: 5.440528E-02 | loss scale: 1.0 | grad norm: 9.984 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
[2025-11-26 13:32:51] iteration 6/ 150 | consumed samples: 60 | elapsed time per iteration (ms): 1871255.3 | learning rate: 6.666667E-06 | global batch size: 10 | loss: 1.172730E-01 | loss scale: 1.0 | grad norm: 9.300 | num zeros: 0.0 | number of skipped iterations: 0 | number of nan iterations: 0 |
W1126 13:58:49.707000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4541 closing signal SIGTERM
W1126 13:58:49.708000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4542 closing signal SIGTERM
W1126 13:58:49.708000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4543 closing signal SIGTERM
W1126 13:58:49.709000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4544 closing signal SIGTERM
W1126 13:58:49.710000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4545 closing signal SIGTERM
W1126 13:58:49.710000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4547 closing signal SIGTERM
W1126 13:58:49.711000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 4548 closing signal SIGTERM
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
[ERROR] TBE Subprocess[task_distribute] raise error[], main process disappeared!
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()


File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/python3.11.13/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
self.run()
File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/repository_manager/utils/multiprocess_util.py", line 88, in run
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
item = self.task_q.get()
^^^^^^^^^^^^^^^^^
File "<string>", line 2, in get
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/managers.py", line 822, in _callmethod
kind, result = conn.recv()
^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
kind, result = conn.recv()
buf = self._recv_bytes()
^^^^^^^ ^ ^ ^ ^
^^ File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 250, in recv
^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv_bytes()
buf = self._recv(4)
^^^^^^^^^^^^^^^^ ^ ^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
buf = self._recv(4)raise EOFError
^^^^^^^EOFError^^
^^^^
File "/usr/local/python3.11.13/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/usr/local/python3.11.13/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 30 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
E1126 13:58:52.744000 4472 site-packages/torch/distributed/elastic/multiprocessing/api.py:869] failed (exitcode: -9) local_rank: 5 (pid: 4546) of binary: /usr/local/python3.11.13/bin/python3.11
Traceback (most recent call last):
File "/usr/local/python3.11.13/bin/torchrun", line 7, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/run.py", line 918, in main
run(args)
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/run.py", line 909, in run
elastic_launch(
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/launcher/api.py", line 138, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/launcher/api.py", line 269, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
=====================================================
pretrain_vlm.py FAILED
-----------------------------------------------------
Failures:
<NO_OTHER_FAILURES>
-----------------------------------------------------
Root Cause (first observed failure):
[0]:
time : 2025-11-26_13:58:49
host : worker-66
rank : 5 (local_rank: 5)
exitcode : -9 (pid: 4546)
error_file: <N/A>
traceback : Signal 9 (SIGKILL) received by PID 4546
=====================================================
[ERROR] 2025-11-26-13:58:52 (PID:4472, Device:-1, RankID:-1) ERR99999 UNKNOWN applicaiton exception
find: '/data/gWX1447552/data/StreamingBench/models/trained/MindSpeed/Qwen2.5VL-7B-SRC': No such file or directory
find: '/data/gWX1447552/data/StreamingBench/models/trained/MindSpeed/Qwen2.5VL-7B-SRC': No such file or directory
Elapsed Time Per iteration: 1657514.4
Average Samples per Second: 0.006


你好,从报错看已经出现
Loading extension module npu_matmul_add_fp32...,根据经验,出现这个打印的时候,已经加载完数据集,下一步就是出loss。如果还没加载数据集,请尝试
js1234567所提到的排查方法。如果已经加载完数据集,可以尝试如下方法1 . 模型减层,都减到一层,降低计算量,看是否正常出loss。减到一层,还是不正常,请通过减少视频数量缩减序列长度。
2 . 设置export ASCEND_LAUNCH_BLOCKING=1并增加环境变量export ASCEND_PROCESS_LOG_PATH=指定plog日志落盘路径,将plog发出。现在怀疑可能是序列长度太长,算子执行时间太长,超时了。最后,这么长的序列,你可以开启CP试试。
这个MindSpeed-MM更换成了master版本,当我设置export ASCEND_LAUNCH_BLOCKING=1和export ASCEND_PROCESS_LOG_PATH=1后下面为报错的日志信息,设置数据集最大帧数为120帧,TP=2,PP=4。之前尝试开启CP会报错
training ... (min, max) time across ranks (ms): model-and-optimizer-setup ......................: (3027.20, 3038.69) train/valid/test-data-iterators-setup ..........: (52762.04, 52763.42) [before the start of training step] datetime: 2025-11-26 07:56:12 [2025-11-26 07:56:12] [WARNING] [745] profiler.py: Invalid parameter export_type: None, reset it to text. [2025-11-26 07:56:12] [WARNING] [745] profiler.py: Profiler won't be using warmup, this can skew profiler results ... /usr/local/python3.11.13/lib/python3.11/site-packages/torch/autograd/function.py:575: UserWarning: Cannot create tensor with interal format while allow_internel_format=False, tensor will be created with base format. (Triggered internally at build/CMakeFiles/torch_npu.dir/compiler_depend.ts:335.) return super().apply(*args, **kwargs) # type: ignore[misc] Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root... Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root... Emitting ninja build file /root/.cache/torch_extensions/py311_cpu/npu_matmul_add_fp32/build.ninja... Building extension module npu_matmul_add_fp32... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module npu_matmul_add_fp32... Loading extension module npu_matmul_add_fp32... Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root... Using /root/.cache/torch_extensions/py311_cpu as PyTorch extensions root... Emitting ninja build file /root/.cache/torch_extensions/py311_cpu/npu_matmul_add_fp32/build.ninja... Building extension module npu_matmul_add_fp32... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module npu_matmul_add_fp32... Loading extension module npu_matmul_add_fp32... [rank4]: Traceback (most recent call last): [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/pretrain_vlm.py", line 252, in <module> [rank4]: pretrain( [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 292, in pretrain [rank4]: iteration, num_floating_point_operations_so_far = train( [rank4]: ^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 113, in wrapper [rank4]: return step_fn(*args, **kwargs) [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 546, in train [rank4]: loss_dict, skipped_iter, grad_norm, num_zeros_in_grad = train_step( [rank4]: ^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/utils/auto_setting.py", line 126, in wrapper [rank4]: ret = step_fn(*args, **kwargs) [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/mindspeed_mm/training.py", line 753, in train_step [rank4]: losses_reduced = forward_backward_func( [rank4]: ^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1940, in forward_backward_pipelining_without_interleaving [rank4]: input_tensor = send_backward_recv_forward( [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/schedules.py", line 1712, in send_backward_recv_forward [rank4]: input_tensor = p2p_communication.send_backward_recv_forward( [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 554, in send_backward_recv_forward [rank4]: input_tensor, _, _ = _communicate( [rank4]: ^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/adaptor.py", line 77, in mindspeed_communicate [rank4]: return communicate_impl( [rank4]: ^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 205, in communicate_impl [rank4]: recv_prev_shape, recv_next_shape = communicate_shapes_impl( [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/MindSpeed/mindspeed/core/pipeline_parallel/variable_seq_length/communicate.py", line 102, in communicate_shapes_impl [rank4]: reqs = p2p_func( [rank4]: ^^^^^^^^^ [rank4]: File "/data/gWX1447552/ACL/SFT/MindSpeed-MM/megatron/core/pipeline_parallel/p2p_communication.py", line 198, in _p2p_ops [rank4]: send_prev_req = torch.distributed.isend( [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: File "/usr/local/python3.11.13/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 2375, in isend [rank4]: return group.send([tensor], group_dst, tag) [rank4]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [rank4]: RuntimeError: InnerRunOpApi:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:281 OPS function error: HcclSend, error code is 6 [rank4]: [ERROR] 2025-11-26-08:00:42 (PID:749, Device:4, RankID:4) ERR01100 OPS call acl api failed. [rank4]: EI0006: [PID: 749] 2025-11-26-08:00:12.177.688 Getting socket times out. Reason: Remote Rank did not send the data in time. Please check the reason for the rank being stuck [rank4]: Solution: 1. Check the rank service processes with other errors or no errors in the cluster.2. If this error is reported for all NPUs, check whether the time difference between the earliest and latest errors is greater than the connect timeout interval (120s by default). If so, adjust the timeout interval by using the HCCL_CONNECT_TIMEOUT environment variable.3. Check the connectivity of the communication link between nodes. (For example, run the 'hccn_tool -i $devid -tls -g' command to check the TLS status of each NPU). [rank4]: TraceBack (most recent call last): [rank4]: Transport init error. Reason: [Create][DestLink]Create Dest error! createLink para:rank[1]-localUserrank[1]-localIpAddr[10.44.154.66], dst_rank[0]-remoteUserrank[0]-remote_ip_addr[10.44.154.66]
@weixin_57734188
看了上下文,是一台8卡 910B3在跑那么长的序列吗?序列长度太长,计算量很多,等待超时了。调大HCCL_CONNECT_TIMEOUT 试试(不过,一步时间太长了,真能训练吗.......),这是这个环境变量的说明文档:https://www.hiascend.com/document/detail/zh/canncommercial/83RC1/maintenref/envvar/envref_07_0077.html 。 如果能有更多的硬件资源,请参考该模型的readme https://gitcode.com/Ascend/MindSpeed-MM/blob/master/examples/qwen2.5vl/README.md#长序列支持


您好,此issue已经超过一周没有更新,现先将issue关闭,有需要可以重新打开,谢谢!


Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
MindSpeed训练过程中长时间卡住不出现第一个epoch,数据集为长视频问答数据集,大多数视频都在3分钟-5分钟,我设置"video_fps": 1.0,"video_maxlen": 128,这里设置最大帧数是128帧。在多图场景下,已验证130张以下的多图问答数据可以正常训练,在多图场景下,已经验证过模型可以训练,AI Core一直在变化,并且最终也训练出来了。但是在视频问答的情况下,AI core长时间为0,偶尔某两张卡可能功率上升,其他时间都是沉寂状态,并且控制台也没有输出。在长时间的静默下,最终会出现报错
Environment / 环境信息 (Mandatory / 必填)
训练设备:8*910B 64G
软件版本:
系统版本
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
.
Describe the expected behavior / 预期结果 (Mandatory / 必填)
模型可以正常训练,AI core不长时间为0
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
以下为日志,长时间卡在Loading extension module npu_matmul_add_fp32...的控制台输出下,没有任何反应,不会输出第一个epoch信息,当长时间运行的情况下,会出现报错.
长时间没有反应的情况下出现的报错
top显示的cpu信息
npu-smi info
Special notes for this issue/备注 (Optional / 选填)
data_7b.json
finetune_qwen2_5_vl_7b.sh
model_7b.json