AttributeError: 'NoneType' object has no attribute 'nranks'
Created by: xsliangjxing
-
版本、环境信息: 1)PaddlePaddle版本:paddlepaddle-gpu 1.8.4post 107 2)GPU:NVIDIA-SMI 441.22 Driver Version: 441.22 CUDA Version: 10.2 cuDNN Version: 7.6 4)系统环境:win10,Python 3.7.6
-
训练信息 1)单机/多卡(selected_gpus=0) 2)workerlog.0: Traceback (most recent call last): File "E:\VBA\python\linear_knowledge\train.py", line 92, in train_multi_gpu() File "E:\VBA\python\linear_knowledge\train.py", line 81, in train_multi_gpu avg_loss = model.scale_loss(avg_loss) File "E:\mdw\b_env\lib\site-packages\paddle\fluid\dygraph\parallel.py", line 333, in scale_loss if not self._is_data_parallel_mode(): File "E:\mdw\b_env\lib\site-packages\paddle\fluid\dygraph\parallel.py", line 457, in _is_data_parallel_mode return self._strategy.nranks > 1 AttributeError: 'NoneType' object has no attribute 'nranks' W0908 23:01:58.059443 13476 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 50, Driver API Version: 10.2, Runtime API Version: 10.0 W0908 23:01:58.132462 13476 device_context.cc:260] device: 0, cuDNN Version: 7.6.
-
复现信息:本人在尝试使用GPU多卡训练的时候,跳出以上错误,代码为飞桨平台课程原码(https://aistudio.baidu.com/aistudio/projectdetail/882250),训练前终端启用过launch(python -m paddle.distributed.launch --selected_gpus=0 --log_dir E:\python\mypractice E:\python\mypractice\train_multi_gpu.py)无报错。 另外我在尝试使用跟原码不一样个人版本(处理数据方式不一样)并在终端启用launch时,直接报出同样错误。我想不出解决办法了特此提出这个issue。 求解答, 谢谢!