facebookresearch / facebookresearch/detectron2

Unable to compile detectron2 with compatble versions of CUDA & pytorch

Open
#4,409 4 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

If you do not know the root cause of the problem, please post according to this template:

## Instructions To Reproduce the Issue:

An error was caused while compiling with cuda 11.6.
I used these commands to attempt to compile, I've also tried running `pip uninstall detectron2` which leads to an identical error.
```
git clone https://github.com/facebookresearch/detectron2
cd detectron2
rm -rf build/ **/*.so
python3 -m pip install -e detectron2
```
__Full logs__ or other relevant observations:
See this link, as it is too large to paste into a GitHub issue: https://pastebin.com/2HwakgeF

## Expected behavior:

Detectron2 compiles.

## Environment:

Paste the output of the following command:
```
(base) [ghostdog@ghostdog ~]$ wget -nc -nv https://github.com/facebookresearch/detectron2/raw/main/detectron2/utils/collect_env.py && python collect_env.py
2022-07-18 12:11:44 URL:https://raw.githubusercontent.com/facebookresearch/detectron2/main/detectron2/utils/collect_env.py [8391/8391] -> "collect_env.py" [1]
---------------------- ------------------------------------------------------------------------------
sys.platform linux
Python 3.9.7 (default, Sep 16 2021, 13:09:58) [GCC 7.5.0]
numpy 1.19.3
detectron2 imported a wrong installation
detectron2._C not built correctly: No module named 'detectron2._C'
Compiler ($CXX) c++ (GCC) 12.1.0
CUDA compiler Build cuda_11.6.r11.6/compiler.31057947_0
DETECTRON2_ENV_MODULE
PyTorch 1.12.0+cu116 @/home/ghostdog/anaconda3/lib/python3.9/site-packages/torch
PyTorch debug build False
GPU available Yes
GPU 0 NVIDIA GeForce GTX 1070 (arch=6.1)
Driver version 515.57
CUDA_HOME /opt/cuda
Pillow 9.2.0
torchvision 0.13.0+cu116 @/home/ghostdog/anaconda3/lib/python3.9/site-packages/torchvision
torchvision arch flags 3.5, 5.0, 6.0, 7.0, 7.5, 8.0, 8.6
fvcore 0.1.5.post20220512
iopath 0.1.9
cv2 4.6.0
---------------------- ------------------------------------------------------------------------------
PyTorch built with:
- GCC 9.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 v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- LAPACK is enabled (usually provided by MKL)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 11.6
- 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;-gencode;arch=compute_86,code=sm_86
- CuDNN 8.3.2 (built against CUDA 11.5)
- Magma 2.6.1
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -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 -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
```

Things I've checked:
* `torch.version.cuda` returns the same version as `nvcc --version`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.