error: use of enum 'cudaDeviceP2PAttr' without previous declaration

Hello,

I’m trying to build pytorch on ppc64le.
I’m building inside an official Nvidia docker container (nvidia/cuda-ppc64le:8.0-cudnn6-devel-ubuntu16.04) and I’m getting the following error:

powerpc64le-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pytorch -I/tmp/pytorch/torch/csrc -I/tmp/pytorch/torch/lib/pybind11/include -I/tmp/pytorch/torch/lib/tmp_install/include -I/tmp/pytorch/torch/lib/tmp_install/include/TH -I/tmp/pytorch/torch/lib/tmp_install/include/THPP -I/tmp/pytorch/torch/lib/tmp_install/include/THNN -I/tmp/pytorch/torch/lib/tmp_install/include/ATen -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/tmp/pytorch/torch/lib/tmp_install/include/THD -I/usr/local/cuda/include -I/tmp/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/include/ -I/usr/include/python2.7 -c torch/csrc/cudnn/Handles.cpp -o build/temp.linux-ppc64le-2.7/torch/csrc/cudnn/Handles.o -D_THP_CORE -std=gnu++14 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_DISTRIBUTED -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib64 -DWITH_NCCL -DWITH_CUDNN
In file included from /usr/local/cuda/include/channel_descriptor.h:62:0,
                 from /usr/local/cuda/include/cuda_runtime.h:90,
                 from /usr/include/cudnn.h:64,
                 from torch/csrc/cudnn/BatchNorm.h:6,
                 from torch/csrc/cudnn/BatchNorm.cpp:1:
/usr/local/cuda/include/cuda_runtime_api.h:1628:101: error: use of enum 'cudaDeviceP2PAttr' without previous declaration

To recreate the problem, build https://github.com/j4zzcat/ppc64le/blob/master/poc/poc1pytorch.dockerfile on ppc64le as usual (nvidia-docker build --rm -f poc1pytorch.dockerfile .).