How to run detectron2 using rtx 3090 and with cuda 11.x on ubuntu?

mobassir94: <p>hi <a class="mention" href="/u/ptrblck">@ptrblck</a><br>
i get the following error log while running detectron2 on ubuntu using rtx 3090,</p>
<p>Requirement already satisfied: PyYAML in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from yacs&gt;=0.1.6-&gt;detectron2==0.4) (5.3.1)<br>
Requirement already satisfied: kiwisolver&gt;=1.0.1 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (1.3.0)<br>
Requirement already satisfied: numpy&gt;=1.15 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (1.19.2)<br>
Requirement already satisfied: cycler&gt;=0.10 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (0.10.0)<br>
Requirement already satisfied: python-dateutil&gt;=2.1 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (2.8.1)<br>
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,&gt;=2.0.3 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (2.4.7)<br>
Requirement already satisfied: certifi&gt;=2020.06.20 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from matplotlib-&gt;detectron2==0.4) (2020.12.5)<br>
Requirement already satisfied: absl-py&gt;=0.4 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (0.12.0)<br>
Requirement already satisfied: google-auth-oauthlib&lt;0.5,&gt;=0.4.1 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (0.4.4)<br>
Requirement already satisfied: requests&lt;3,&gt;=2.21.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (2.24.0)<br>
Requirement already satisfied: wheel&gt;=0.26; python_version &gt;= “3” in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (0.35.1)<br>
Requirement already satisfied: protobuf&gt;=3.6.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (3.15.8)<br>
Requirement already satisfied: werkzeug&gt;=0.11.15 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (1.0.1)<br>
Requirement already satisfied: grpcio&gt;=1.24.3 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (1.37.0)<br>
Requirement already satisfied: setuptools&gt;=41.0.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (50.3.1.post20201107)<br>
Requirement already satisfied: google-auth&lt;2,&gt;=1.6.3 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (1.29.0)<br>
Requirement already satisfied: markdown&gt;=2.6.8 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (3.3.4)<br>
Requirement already satisfied: tensorboard-data-server&lt;0.7.0,&gt;=0.6.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (0.6.0)<br>
Requirement already satisfied: tensorboard-plugin-wit&gt;=1.6.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from tensorboard-&gt;detectron2==0.4) (1.8.0)<br>
Requirement already satisfied: portalocker in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from iopath&lt;0.1.9,&gt;=0.1.7-&gt;detectron2==0.4) (2.3.0)<br>
Requirement already satisfied: cython&gt;=0.27.3 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from pycocotools&gt;=2.0.2-&gt;detectron2==0.4) (0.29.21)<br>
Requirement already satisfied: antlr4-python3-runtime==4.8 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from omegaconf==2.1.0.dev22-&gt;detectron2==0.4) (4.8)<br>
Requirement already satisfied: six in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from cycler&gt;=0.10-&gt;matplotlib-&gt;detectron2==0.4) (1.15.0)<br>
Requirement already satisfied: requests-oauthlib&gt;=0.7.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from google-auth-oauthlib&lt;0.5,&gt;=0.4.1-&gt;tensorboard-&gt;detectron2==0.4) (1.3.0)<br>
Requirement already satisfied: idna&lt;3,&gt;=2.5 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from requests&lt;3,&gt;=2.21.0-&gt;tensorboard-&gt;detectron2==0.4) (2.10)<br>
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,&lt;1.26,&gt;=1.21.1 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from requests&lt;3,&gt;=2.21.0-&gt;tensorboard-&gt;detectron2==0.4) (1.25.11)<br>
Requirement already satisfied: chardet&lt;4,&gt;=3.0.2 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from requests&lt;3,&gt;=2.21.0-&gt;tensorboard-&gt;detectron2==0.4) (3.0.4)<br>
Requirement already satisfied: cachetools&lt;5.0,&gt;=2.0.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from google-auth&lt;2,&gt;=1.6.3-&gt;tensorboard-&gt;detectron2==0.4) (4.2.1)<br>
Requirement already satisfied: pyasn1-modules&gt;=0.2.1 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from google-auth&lt;2,&gt;=1.6.3-&gt;tensorboard-&gt;detectron2==0.4) (0.2.8)<br>
Requirement already satisfied: rsa&lt;5,&gt;=3.1.4; python_version &gt;= “3.6” in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from google-auth&lt;2,&gt;=1.6.3-&gt;tensorboard-&gt;detectron2==0.4) (4.7.2)<br>
Requirement already satisfied: oauthlib&gt;=3.0.0 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from requests-oauthlib&gt;=0.7.0-&gt;google-auth-oauthlib&lt;0.5,&gt;=0.4.1-&gt;tensorboard-&gt;detectron2==0.4) (3.1.0)<br>
Requirement already satisfied: pyasn1&lt;0.5.0,&gt;=0.4.6 in ./anaconda3/envs/pydetectron2/lib/python3.8/site-packages (from pyasn1-modules&gt;=0.2.1-&gt;google-auth&lt;2,&gt;=1.6.3-&gt;tensorboard-&gt;detectron2==0.4) (0.4.8)<br>
Installing collected packages: detectron2<br>
Running setup.py develop for detectron2<br>
ERROR: Command errored out with exit status 1:<br>
command: /home/apsisdev/anaconda3/envs/pydetectron2/bin/python -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/home/apsisdev/detectron2/setup.py’"’"’; <strong>file</strong>=’"’"’/home/apsisdev/detectron2/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(<strong>file</strong>);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, <strong>file</strong>, ‘"’"‘exec’"’"’))’ develop --no-deps<br>
cwd: /home/apsisdev/detectron2/<br>
Complete output (92 lines):<br>
running develop<br>
running egg_info<br>
writing detectron2.egg-info/PKG-INFO<br>
writing dependency_links to detectron2.egg-info/dependency_links.txt<br>
writing requirements to detectron2.egg-info/requires.txt<br>
writing top-level names to detectron2.egg-info/top_level.txt<br>
reading manifest file ‘detectron2.egg-info/SOURCES.txt’<br>
writing manifest file ‘detectron2.egg-info/SOURCES.txt’<br>
running build_ext<br>
building ‘detectron2.<em>C’ extension<br>
Emitting ninja build file /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/build.ninja…<br>
Compiling objects…<br>
Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)<br>
[1/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em>_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’"’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
[2/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
[3/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
[4/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
[5/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
[6/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“<em>gcc"’ '-DPYBIND11_STDLIB="<em>libstdcpp"’ '-DPYBIND11_BUILD_ABI="<em>cxxabi1011"’ -DTORCH_EXTENSION_NAME=<em>C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
FAILED: /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.o<br>
/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.o.d -DWITH_CUDA -I/home/apsisdev/detectron2/detectron2/layers/csrc -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/TH -I/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/include/THC -I/include -I/home/apsisdev/anaconda3/envs/pydetectron2/include/python3.8 -c -c /home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.cu -o /home/apsisdev/detectron2/build/temp.linux-x86_64-3.8/home/apsisdev/detectron2/detectron2/layers/csrc/cuda_version.o -D__CUDA_NO_HALF_OPERATORS</em></em> -D__CUDA_NO_HALF_CONVERSIONS</em></em> -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’"’-fPIC’"’"’’ -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE="_gcc"’ ‘-DPYBIND11_STDLIB="_libstdcpp"’ ‘-DPYBIND11_BUILD_ABI="_cxxabi1011"’ -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14<br>
nvcc fatal   : Unknown option ‘-generate-dependencies-with-compile’<br>
ninja: build stopped: subcommand failed.<br>
Traceback (most recent call last):<br>
File “/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/utils/cpp_extension.py”, line 1667, in _run_ninja_build<br>
subprocess.run(<br>
File “/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/subprocess.py”, line 512, in run<br>
raise CalledProcessError(retcode, process.args,<br>
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.</p>
<pre><code>The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "/home/apsisdev/detectron2/setup.py", line 193, in &lt;module&gt;
    setup(
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/setuptools/command/develop.py", line 136, in install_for_development
    self.run_command('build_ext')
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
    build_ext.build_extensions(self)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 529, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/apsisdev/anaconda3/envs/pydetectron2/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
----------------------------------------
</code></pre>
<p>ERROR: Command errored out with exit status 1: /home/apsisdev/anaconda3/envs/pydetectron2/bin/python -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/home/apsisdev/detectron2/setup.py’"’"’; <strong>file</strong>=’"’"’/home/apsisdev/detectron2/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(<strong>file</strong>);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, <strong>file</strong>, ‘"’"‘exec’"’"’))’ develop --no-deps Check the logs for full command output.</p>

mobassir94: <p><a class="mention" href="/u/ptrblck">@ptrblck</a></p>
<p>when i run :<br>
python -c ‘import torch; print(torch.<strong>config</strong>.show())’</p>
<p>i get,</p>
<p>PyTorch built with:</p>
<ul>
<li>GCC 7.3</li>
<li>C++ Version: 201402</li>
<li>Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications</li>
<li>Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)</li>
<li>OpenMP 201511 (a.k.a. OpenMP 4.5)</li>
<li>NNPACK is enabled</li>
<li>CPU capability usage: AVX2</li>
<li>CUDA Runtime 11.1</li>
<li>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_61,code=sm_61;-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;-gencode;arch=compute_37,code=compute_37</li>
<li>CuDNN 8.0.5</li>
<li>Magma 2.5.2</li>
<li>Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/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 -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.1, USE_CUDA=ON, USE_CUDNN=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,</li>
</ul>

ptrblck: <p>Unfortunately, no error message is shown, so it should either be mentioned earlier or you might need to disable e.g. <code>ninja</code> while building this package.</p>

mobassir94: <p>sorry <a class="mention" href="/u/ptrblck">@ptrblck</a><br>
what do you mean by “no error message is shown”?</p>
<p>i can see from the log that i posted above the error message is <strong>RuntimeError: Error compiling objects for extension</strong><br>
if i disable ninja then performance will be painfully slow,no?<br>
i would like to learn how to solve this issue</p>

ptrblck: <p>The <code>RuntimeError</code> points only to the failure of the build, but no error message is shown.<br>
The log should thus have a proper error message explaining why it’s failing in the previous logs.<br>
Yes, disabling <code>ninja</code> might be slower, but could yield the error message closer to the actual failure.</p>

mobassir94: <p>thank you <a class="mention" href="/u/ptrblck">@ptrblck</a><br>
can you please tell me,how can i disable ninja in ubuntu?</p>

cskarthik7: <p>Also <a class="mention" href="/u/ptrblck">@ptrblck</a>, are pytorch binaries available for cuda 11.1? The problem could also because of cuda and pytorch compatibility right?</p>

mobassir94: <p>i tried cuda 11.0 and torch 1.7.1 and same error <img src="https://discuss.pytorch.org/images/emoji/apple/frowning.png?v=9" title=":frowning:" class="emoji" alt=":frowning:"></p>

ptrblck: <p>You could use:</p>
<pre><code class="lang-python">from torch.utils.cpp_extension import BuildExtension
cmdclass['build_ext'] = BuildExtension.with_options(use_ninja=False)
</code></pre>
<p>to disable <code>ninja</code> in custom extensions.</p>
<p><a class="mention" href="/u/cskarthik7">@cskarthik7</a> I don’t know, if binaries are available and you could ask the authors in their repository about it.</p>

mobassir94: <p>sorry <a class="mention" href="/u/ptrblck">@ptrblck</a>  i think my question was wrong,<br>
i tried to build Detectron2 from local clone in Ubuntu like this : <a href="https://github.com/facebookresearch/detectron2/issues/2712" class="inline-onebox" rel="noopener nofollow ugc">Error when building Detectron2 from local clone in Ubuntu · Issue #2712 · facebookresearch/detectron2 · GitHub</a></p>
<p>now how do i do use_ninja=False there for detectron2?</p>
<p>please check this related solution on windows 10 : <a href="https://github.com/facebookresearch/detectron2/issues/2390" class="inline-onebox" rel="noopener nofollow ugc">Build: Command '['ninja', '-v']' returned non-zero exit status 1. · Issue #2390 · facebookresearch/detectron2 · GitHub</a></p>
<p>they do something like this :</p>
<p>conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.2 -c pytorch<br>
git clone <a href="https://github.com/facebookresearch/detectron2.git" rel="noopener nofollow ugc">https://github.com/facebookresearch/detectron2.git</a><br>
“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat”<br>
set USE_NINJA=OFF<br>
set DISTUTILS_USE_SDK=1<br>
set USE_CUDA=ON<br>
python -m pip install -e detectron2</p>
<p>how can i do similar work on linux/ubuntu</p>

markstrefford: <p>The error I see is this:</p>
<pre><code class="lang-auto">nvcc fatal : Unknown option ‘-generate-dependencies-with-compile’
[5/6] /bin/nvcc --generate-dependencies-with-compile --dependency-output 
</code></pre>
<p>Have you checked CUDA versions?</p>
<p>Also, here’s a script to install Detectron2 using Anaconda. I’ve used it on Windows 10 with RTX3070, I don’t see why it won’t work on Ubuntu:</p>
<aside class="onebox githubblob">
  <header class="source">
      <a href="https://github.com/markstrefford/running-detectron2-on-windows-wsl2-rtx30xx/blob/d6f31ba7d3728cda8e223c24aa64b43f81818cdf/detectron2-windows-conda.yml" target="_blank" rel="noopener nofollow ugc">github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://github.com/markstrefford/running-detectron2-on-windows-wsl2-rtx30xx/blob/d6f31ba7d3728cda8e223c24aa64b43f81818cdf/detectron2-windows-conda.yml" target="_blank" rel="noopener nofollow ugc">markstrefford/running-detectron2-on-windows-wsl2-rtx30xx/blob/d6f31ba7d3728cda8e223c24aa64b43f81818cdf/detectron2-windows-conda.yml</a></h4>
<pre><code class="lang-yml">name: detectron2
channels:
  - pytorch
  - conda-forge
  - anaconda
  - defaults
dependencies:
  - python=3.8
  - numpy
  - pywin32
  - cudatoolkit=11.0
  - pytorch==1.7.1
  - torchvision
  - git
  - pip
  - pip:
    - git+https://github.com/facebookresearch/detectron2.git@v0.3
</code></pre>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


mobassir94: <p>i updated cuda … previously i had nvidia-smi and nvcc -V version missmatch,where i had nvcc 10.2 installed which detectron2 doesn’t support for new gpu like rtx 3090,i updated nvcc and currently i have 11.2 and now detectron2 is working fine for me,but version 0.1 of detectron2 isn’t working for me when i try to run this project : <a href="https://github.com/ying09/TextFuseNet" class="inline-onebox" rel="noopener nofollow ugc">GitHub - ying09/TextFuseNet: A PyTorch implementation of "TextFuseNet: Scene Text Detection with Richer Fused Features".</a></p>
<p>i get the exact same error for version 0.1</p>
<p>“RuntimeError: Error compiling objects for extension”</p>
<p>seems like version 0.1 of detectron2 won’t work on rtx 30xx</p>

HaFred: <p>Hi did you figure it out? Same issue occurred to me. I tried many methods including different pytorch version, but seems like detectron2 cannot work on rtx3090 with <code>NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compcondaatible</code> .</p>

mobassir94: <p>i was able to solve this issue,i tried to install detectron2 version 0.4 after updating pytorch,cuda,cudnn etc,i had version missmatch,i had pytorch latest version installed but cuda 10.2 installed,so because of that detectron2 was not running in my pc and showed me error like you are getting,you need to install latest pytorch,cuda,cudnn,nvcc etc and after that you need to check if all package version is similar or there is no version missmatch among those and then you will be able to run detectron2 on rtx3090,i carefully set up my environment by following this beautiful tutorial : <a href="https://medium.com/analytics-vidhya/install-cuda-11-2-cudnn-8-1-0-and-python-3-9-on-rtx3090-for-deep-learning-fcf96c95f7a1" rel="noopener nofollow ugc"><strong>https://medium.com/analytics-vidhya/install-cuda-11-2-cudnn-8-1-0-and-python-3-9-on-rtx3090-for-deep-learning-fcf96c95f7a1</strong></a></p>
<p>follow step by step procedure and make sure you are not making any mistakes,once done,you will be able to run detectron2 on rtx3090 like i did,if you still can’t then surely you missed something from here : <a href="https://medium.com/analytics-vidhya/install-cuda-11-2-cudnn-8-1-0-and-python-3-9-on-rtx3090-for-deep-learning-fcf96c95f7a1" rel="noopener nofollow ugc"><strong>https://medium.com/analytics-vidhya/install-cuda-11-2-cudnn-8-1-0-and-python-3-9-on-rtx3090-for-deep-learning-fcf96c95f7a1</strong></a></p>
<p>so carefully follow the tutorial and best of luck</p>