Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

源码编译报错:module 'paddle.fluid.core_avx.ops' has no attribute 'c_allreduce_sum_'

Open TXacs opened this issue 4 years ago • 5 comments

  • 版本、环境信息:    1)PaddlePaddle版本:develop v2.2.4    2)CPU:Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz    3)GPU:cuda11.3    4)系统环境:ubuntu18.04
****************************************
Paddle version: 0.0.0
Paddle With CUDA: True

OS: Ubuntu 18.04
Python version: 3.6.13

CUDA version: 11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0
cuDNN version: None.None.None
Nvidia driver version: 460.91.03
****************************************
  • 安装方式信息: 本地编译:
cmake ../ -DPY_VERSION=3.6 -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DNCCL_INCLUDE_DIR=/dat/software/cuda-11.3/include

报错内容如下:

Traceback (most recent call last):
  File "run_pretrain.py", line 495, in <module>
    do_train(args)
  File "run_pretrain.py", line 143, in do_train
    fleet.init(is_collective=True, strategy=strategy)
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/fleet/base/fleet_base.py", line 284, in init
    self._init_hybrid_parallel_env()
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/fleet/base/fleet_base.py", line 369, in _init_hybrid_parallel_env
    self._hcg = tp.HybridCommunicateGroup(self._topology)
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/fleet/base/topology.py", line 139, in __init__
    self._dp_group, self._dp_comm_group = self._set_comm_group("data")
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/fleet/base/topology.py", line 199, in _set_comm_group
    comm_group = paddle.distributed.new_group(ranks=group)
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/collective.py", line 284, in new_group
    paddle.distributed.all_reduce(tmp, use_calc_stream=True)
  File "/gf3/home/txacs/gv3/anaconda3/envs/pp/lib/python3.6/site-packages/paddle/distributed/collective.py", line 480, in all_reduce
    return _C_ops.c_allreduce_sum_(tensor, 'use_calc_stream',
AttributeError: module 'paddle.fluid.core_avx.ops' has no attribute 'c_allreduce_sum_'
INFO 2022-03-21 16:41:49,836 launch_utils.py:343] terminate all the procs
INFO 2022-03-21 16:41:49,836 launch_utils.py:343] terminate all the procs
ERROR 2022-03-21 16:41:49,836 launch_utils.py:642] ABORT!!! Out of all 4 trainers, the trainer process with rank=[0, 1, 2, 3] was aborted. Please check its log.
ERROR 2022-03-21 16:41:49,836 launch_utils.py:642] ABORT!!! Out of all 4 trainers, the trainer process with rank=[0, 1, 2, 3] was aborted. Please check its log.
INFO 2022-03-21 16:41:53,841 launch_utils.py:343] terminate all the procs
INFO 2022-03-21 16:41:53,841 launch_utils.py:343] terminate all the procs
INFO 2022-03-21 16:41:53,841 launch.py:401] Local processes completed.
INFO 2022-03-21 16:41:53,841 launch.py:401] Local processes completed.

TXacs avatar Mar 21 '22 08:03 TXacs

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!

paddle-bot-old avatar Mar 21 '22 08:03 paddle-bot-old

使用collective编译请开选项 -DWITH_DISTRIBUTE=ON fleet.init(is_collective=True, strategy=strategy)

zhaocaibei123 avatar Mar 21 '22 11:03 zhaocaibei123

使用collective编译请开选项 -DWITH_DISTRIBUTE=ON fleet.init(is_collective=True, strategy=strategy)

好的,我试一下

TXacs avatar Mar 22 '22 08:03 TXacs

多谢,解决了

TXacs avatar Mar 24 '22 02:03 TXacs

你好,现在Paddle已经有编译好的安装包了,请问你在什么任务场景下需要编译Paddle呀?比如是需要新增算子、还是需要修改飞桨源代码,或者有什么其他的用途呢?

yang131313 avatar May 11 '22 05:05 yang131313