YonghaoHe / LFD-A-Light-and-Fast-Detector

LFD is a big update upon LFFD. Generally, LFD is a multi-class object detector characterized by lightweight, low inference latency and superior precision. It is for real-world appilcations.
416 stars 83 forks source link

在3090显卡 CUDA11.0 环境下编译的问题 #12

Closed Watebear closed 3 years ago

Watebear commented 3 years ago

您好,我的显卡是3090,用的是CUDA11.0,在执行 python3 setup.py build_ext 的时候遇到问题:

/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/lib/python3.8/site-packages/torch/cuda/init.py:104: UserWarning:

GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.

The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.

If you want to use the GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))

:/usr/local/cuda-11.0/bin/nvcc -DWITH_CUDA -I/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/lib/python3.8/site-packages/torch/include -I/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/lib/python3.8/site-packages/torch/include/TH -I/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/lib/python3.8/site-packages/torch/include/THC -I:/usr/local/cuda-11.0/include -I/home/dddzz/worksapce/Codes/FaceDetection2/LFD-A-Light-and-Fast-Detector-master/venv/include -I/usr/include/python3.8 -c lfd/model/utils/build/nms/src/cuda/nms_kernel.cu -o build/temp.linux-x86_64-3.8/lfd/model/utils/build/nms/src/cuda/nms_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=nms_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14

unable to execute ':/usr/local/cuda-11.0/bin/nvcc': No such file or directory

error: command ':/usr/local/cuda-11.0/bin/nvcc' failed with exit status 1

请问应该从文件中哪些地方进行修改,来匹配我的硬件设备。非常感谢!

YonghaoHe commented 3 years ago

@Watebear 很明显,提示你Pytorch的版本和当前的cuda版本不兼容,你先保证pytorch能够正常安装使用。

Watebear commented 3 years ago

@Watebear 很明显,提示你Pytorch的版本和当前的cuda版本不兼容,你先保证pytorch能够正常安装使用。 这个问题我解决了,不是兼容问题,而是3090的算力太高(8.6),需要手动降低算力。 在编译前输入: export TORCH_CUDA_ARCH_LIST="7.5" 这样就可以解决了。 非常感谢您的开源!