-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
OpenCV with CUDA cannot be compiled any more with Cuda 10.2 SDK (CMake) #23010
Copy link
Copy link
Closed
Labels
bugcategory: build/installcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contribplatform: win32
Milestone
Description
System Information
Windows 7 64 b
Cuda 10.2 (latest version supported by Windows 7)
Visual Studio 2019 (latest)
OpenCV 4.x branch
CMake-gui (3.25.1)
Detailed description
Some time ago, OpenCVDetectCUDA.cmake must have been modified since it now contains
if(WIN32)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcudafe --display_error_number --diag-suppress 1394,1388)
However, the diag-suppress option seems to have been introduced in Cuda 11.2
https://www.readkong.com/page/nvidia-cuda-toolkit-release-notes-for-cuda-11-2-nvidia-2844708
https://docs.nvidia.com/cuda/archive/11.2.0/cuda-compiler-driver-nvcc/index.html#generic-tool-options-diag-suppress
This results in *.cu files of OpenCV stopping compilation with an nvcc "unknown option" error
Steps to reproduce
- use Cuda 10.2 SDK
- generate the OpenCV 4.x branch Visual studio 2019 project files with CMake (with CUDA enabled)
- try to compile, it will stop at the first *.cu file
To fix the problem :
- edit
OpenCVDetectCUDA.cmakeand remove--diag-suppress 1394,1388 - regenerate Visual Studio project files with CMake
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: build/installcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contribplatform: win32