PyTorchでGPUが使えない

Docker でPyTorchを環境構築して、CUDAを使用しようとしたら使えなかった。(PyTorch自体は動く、過去のバージョンでも動く) Dockerは以下のもの。

pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel

出ている警告は以下の通り。どうやらGPUが対応していないらしい。使っているのはRTX 1070Ti。

/opt/conda/lib/python3.7/site-packages/torch/cuda/__init__.py:80: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at  /opt/conda/conda-bld/pytorch_1634272168290/work/c10/cuda/CUDAFunctions.cpp:112.)
  return torch._C._cuda_getDeviceCount() > 0

CUDAのバージョン下げて以下にしたら動くようになった。

pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel