fluid.io.PyReader单机多卡下出现ValueError
Created by: JingChunzhen
paddle 版本 1.5.0 cuda 9.0 cudnn 7.0 使用io.Pyreader 在单机多卡情况下出现错误
export CUDA_VISIBLE_DEVICES=4,5
export FLAGS_enable_parallel_graph=1
export FLAGS_sync_nccl_allreduce=1
export FLAGS_fraction_of_gpu_memory_to_use=0.1
export FLAGS_eager_delete_tensor_gb=0.0
export FLAGS_fast_eager_deletion_mode=1
place = fluid.CUDAPlace(0)
train_reader = fluid.io.PyReader(
feed_list=[
instance.input_src_ids,
instance.input_txt_ids,
instance.input_pos_ids,
instance.input_mask,
instance.input_image,
instance.input_soft_label],
capacity=10,
iterable=True)
train_reader.decorate_batch_generator(dev_batch_gen, places=place)
报错如下
Traceback (most recent call last):
File "distill_ernie_asyn.py", line 348, in <module>
train()
File "distill_ernie_asyn.py", line 241, in train
fetch_list=[train_loss.name])
File "/home/work/lixiaokang04/tools/paddle_release_home/python/lib/python2.7/site-packages/paddle/fluid/parallel_executor.py", line 280, in run
return_numpy=return_numpy)
File "/home/work/lixiaokang04/tools/paddle_release_home/python/lib/python2.7/site-packages/paddle/fluid/executor.py", line 666, in run
return_numpy=return_numpy)
File "/home/work/lixiaokang04/tools/paddle_release_home/python/lib/python2.7/site-packages/paddle/fluid/executor.py", line 508, in _run_parallel
"Feed a list of tensor, the list should be the same size as places"
ValueError: Feed a list of tensor, the list should be the same size as places