question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detectron2 CUDA Compiler not available

See original GitHub issue

After so many commits since October, I tried to reinstall my Detectron2. However, I met some problems with the code

  1. what changes you made (git diff) or what code you wrote
I didn't change anything

  1. what exact command you run: I tried to install by typing python setup.py build develop

  2. what you observed (including the full logs):

File "setup.py", line 63
    def get_model_zoo_configs() -> List[str]:
                                ^
SyntaxError: invalid syntax

Expected behavior

File “setup.py”, line 63 def get_model_zoo_configs() -> List[str]: ^ SyntaxError: invalid syntax

Environment

sys.platform linux Python 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] Numpy 1.17.4 detectron2._C failed to import DETECTRON2_ENV_MODULE <not set> PyTorch 1.3.0 PyTorch Debug Build False torchvision 0.4.1 CUDA available True GPU 0 GeForce RTX 2070 SUPER CUDA_HOME None Pillow 6.2.1 cv2 3.2.0


PyTorch built with:

  • GCC 7.3
  • Intel® Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel® 64 architecture applications
  • Intel® MKL-DNN v0.20.5 (Git Hash 0125f28c61c1f822fd48570b4c1066f96fcb9b2e)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CUDA Runtime 10.1
  • NVCC architecture flags: -gencode;arch=compute_35,code=sm_35;-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_50,code=compute_50
  • CuDNN 7.6.3
  • Magma 2.5.1
  • Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -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-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -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 -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=True, 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, USE_STATIC_DISPATCH=OFF,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ppwwyyxxcommented, Dec 11, 2019

CUDA_HOME None

This means pytorch cannot find cuda compiler. You can verify this by

from torch.utils.cpp_extension import CUDA_HOME

and print it. This is then not a detectron2 issue.

You can try including nvcc in your $PATH or some other ways to inform pytorch of your cuda installation. You can also ask in https://discuss.pytorch.org/.

Closing as the original issue is solved and the new issue is not about detectron2.

0reactions
jas-natcommented, Dec 11, 2019

Thank you very much for the explanation. Sorry for asking question outside of detectron2

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - detectron2 - CUDA is not available - Stack Overflow
I'm using Detectron2 on Windows 10 with RTX3060 Laptop GPU CUDA enabled. The first thing you should check is the CUDA. You can...
Read more >
Installation — detectron2 0.5 documentation
You often need to rebuild detectron2 after reinstalling PyTorch. ... "nvcc not found" or "Not compiled with GPU support" or "Detectron2 CUDA Compiler:...
Read more >
Detectron 2 — Installation Guide - Medium
This is a basic tutorial to configure detectron2 i.e. an open-source ... You can Check the CUDA compiler & Pytorch built CUDA Runtime...
Read more >
How to run detectron2 using rtx 3090 and with cuda 11.x on ...
[1/6] /bin/nvcc --generate-dependencies-with-compile ... fine for me,but version 0.1 of detectron2 isn't working for me when i try to run ...
Read more >
Training and Evaluating FiftyOne Datasets with Detectron2
We'll train a license plate segmentation model from an existing model pre-trained on COCO dataset, available in detectron2's model zoo. Since the COCO...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found