Pose-Group / DCPose

This is an official implementation of our CVPR 2021 paper "Deep Dual Consecutive Network for Human Pose Estimation" (https://openaccess.thecvf.com/content/CVPR2021/papers/Liu_Deep_Dual_Consecutive_Network_for_Human_Pose_Estimation_CVPR_2021_paper.pdf)
371 stars 61 forks source link

ValueError: Unknown CUDA arch (8.6) or GPU not supported #34

Open anas-zafar opened 2 years ago

anas-zafar commented 2 years ago

Thank you for the amazing work! I am having an issue while installing DCN

 File "C:\Users\92336\anaconda3\envs\DCPose\lib\site-packages\torch\utils\cpp_extension.py", line 1027, in _get_cuda_arch_flags
    raise ValueError("Unknown CUDA arch ({}) or GPU not supported".format(arch))
ValueError: Unknown CUDA arch (8.6) or GPU not supported

I am using python 3.6.12, pytorch-1.4.0, and CUDA 10.0

My GPU Specifications: GeForce RTX 3080

Windows System

Any solutions for this?

peteruhrig commented 2 years ago

RTX 3080 is Ampere architecture (https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/) and requires CUDA 11.x I'm also looking to find a solution that will work with Ampere cards.

peteruhrig commented 2 years ago

Here is the solution: Use Ubuntu 20.04 with CUDA 11.3.1, e.g. with Nvidia's docker container: docker://nvidia/cuda:11.3.1-devel-ubuntu20.04

Install system tools and dependencies:

apt install -y --no-install-recommends \
wget \
nano \
python3-setuptools \
python3-dev \
python3-pip \
cython \
git \
libx264-dev \
libglibd-2.0-dev \
libsm6 \
libxext6 \
libxrender-dev

Install Python dependencies without the version numbers given in the original requirements.txt!

pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
pip3 install absl-py attrs cachetools certifi chardet click cycler Cython flake8 flake8-import-order future google-auth google-auth-oauthlib grpcio idna importlib-metadata iniconfig kiwisolver Markdown matplotlib mccabe motmetrics numpy oauthlib opencv-python packaging pandas Pillow pluggy protobuf py py-cpuinfo pyasn1 pyasn1-modules pycocotools pycodestyle pyflakes pyparsing pytest pytest-benchmark python-dateutil pytz PyYAML requests requests-oauthlib rsa scipy Shapely sheen six tabulate tensorboard tensorboard-plugin-wit tensorboardX termcolor toml tqdm urllib3 Werkzeug xmltodict yacs zipp gdown

Ignore the error messages about version incompatibilities. These are about packages that are probably not used anyway.

Patch two files to use new function call:

cd thirdparty/deform_conv
sed -i -e 's@AT_CHECK@TORCH_CHECK@' src/deform_conv_cuda.cpp
sed -i -e 's@AT_CHECK@TORCH_CHECK@' src/deform_pool_cuda.cpp

And then install as before.