facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.99k stars 7.41k forks source link

nvcc fatal: Unsupported gpu architecture 'compute_86' #2225

Closed batrlatom closed 3 years ago

batrlatom commented 3 years ago

Trying to install on the clean docker with cuda 11.0, pytorch 1.7 cu11 on new rtx3070 card I am getting the following error during build:

nvcc fatal: Unsupported gpu architecture 'compute_86'

Is it possible to add compute_86 ?

My env stack is:

----------------------  ---------------------------------------------------------------
sys.platform            linux
Python                  3.6.9 (default, Jul 17 2020, 12:50:27) [GCC 8.4.0]
numpy                   1.19.1
detectron2              0.2.1 @/workspace/detectron2/detectron2
detectron2._C           failed to import. detectron2 is not built correctly
Compiler                c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CUDA compiler           Build cuda_11.0_bu.TC445_37.28845127_0
DETECTRON2_ENV_MODULE   <not set>
PyTorch                 1.7.0+cu110 @/usr/local/lib/python3.6/dist-packages/torch
PyTorch debug build     True
GPU available           True
GPU 0                   Graphics Device (arch=8.6)
CUDA_HOME               /usr/local/cuda
Pillow                  7.2.0
torchvision             0.8.1+cu110 @/usr/local/lib/python3.6/dist-packages/torchvision
torchvision arch flags  3.5, 5.0, 6.0, 7.0, 7.5, 8.0
fvcore                  0.1.2.post20201103
cv2                     Not found
----------------------  ---------------------------------------------------------------
PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.0
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80
  - CuDNN 8.0.4
  - Magma 2.5.2
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, 
ppwwyyxx commented 3 years ago

It (compute_86) is not supported by CUDA11.0.

If you need help to solve an unexpected issue you observed, please include other details following the "Unexpected behaviors" issue template.

batrlatom commented 3 years ago

do you plan support for cuda 11 in near future?

ppwwyyxx commented 3 years ago

We already supported cuda 11. CUDA 11.0 does not support compute_86.

ppwwyyxx commented 3 years ago

PyTorch chooses wrong compilation flags - this can probably can be workaround by export TORCH_CUDA_ARCH_LIST=8.0 before build.

batrlatom commented 3 years ago

@ppwwyyxx Ok, so I change my question a little bit. When pytorch will be officially available with cuda 11.1 ( or 11.2 later on ), will detectron build correctly with cuda 11.1 (2 ) ?

ppwwyyxx commented 3 years ago

When pytorch will be officially available with cuda 11.1 ( or 11.2 later on ), will detectron build correctly with cuda 11.1 (2 ) ?

I think yes. But there is no way we can tell for sure until pytorch is available for cuda 11.1

ppwwyyxx commented 3 years ago

fixed by https://github.com/pytorch/pytorch/pull/47585