-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
DNN module fails to compile against cuDNN 9.0 #24983
Copy link
Copy link
Closed
Labels
bugcategory: dnncategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib
Milestone
Description
System Information
OpenCV version: 4.x (09/02/2024)
OS: Windows 11
Compiler: VS 2022
CUDA: 12.3
cuDNN: 9.0
Detailed description
Switching from cuDNN 8.9.7 to 9.0 results in the following build error
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\csl\cudnn/recurrent.hpp(122): error C3861: 'cudnnSetRNNDescriptor_v6': identifier not found
when compiling the DNN module.
Full error trace
[372/491] Building CXX object modules\dnn\CMakeFiles\opencv_dnn.dir\Release\src\layers\recurrent_layers.cpp.obj
FAILED: modules/dnn/CMakeFiles/opencv_dnn.dir/Release/src/layers/recurrent_layers.cpp.obj
C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe /nologo /TP -DCVAPI_EXPORTS -DCV_CUDA4DNN=1 -DCV_OCL4DNN=1 -DENABLE_PLUGINS -DHAVE_FLATBUFFERS=1 -DHAVE_PROTOBUF=1 -D_CRT_SECURE_NO_WARNINGS=1 -D_USE_MATH_DEFINES -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCMAKE_INTDIR=\"Release\" -ID:\build\opencv\cuda_12_3_dnn\3rdparty\ippicv\ippicv_win\icv\include -ID:\build\opencv\cuda_12_3_dnn\3rdparty\ippicv\ippicv_win\iw\include -ID:\repos\opencv\opencv\modules\dnn\src -ID:\repos\opencv\opencv\modules\dnn\include -ID:\build\opencv\cuda_12_3_dnn\modules\dnn -ID:\repos\opencv\contrib\modules\cudev\include -ID:\repos\opencv\opencv\modules\core\include -ID:\repos\opencv\opencv\modules\imgproc\include -ID:\repos\opencv\opencv\modules\dnn\misc\caffe -ID:\repos\opencv\opencv\modules\dnn\misc\tensorflow -ID:\repos\opencv\opencv\modules\dnn\misc\onnx -ID:\repos\opencv\opencv\modules\dnn\misc\tflite -ID:\repos\opencv\opencv\3rdparty\include\opencl\1.2 -ID:\repos\opencv\opencv\modules\ts\include -ID:\repos\opencv\opencv\modules\imgcodecs\include -ID:\repos\opencv\opencv\modules\videoio\include -ID:\repos\opencv\opencv\modules\highgui\include -external:ID:\build\opencv\cuda_12_3_dnn -external:I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -external:ID:\repos\opencv\opencv\3rdparty\flatbuffers\include -external:ID:\repos\opencv\opencv\3rdparty\protobuf\src -external:W0 /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /FS /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 /wd4125 /wd4267 /wd4127 /wd4244 /wd4512 /wd4702 /wd4456 /wd4510 /wd4610 /wd4800 /wd4701 /wd4703 /wd4505 /wd4458 /O2 /Ob2 /DNDEBUG /Zi -MD /showIncludes /Fomodules\dnn\CMakeFiles\opencv_dnn.dir\Release\src\layers\recurrent_layers.cpp.obj /Fdlib\Release\opencv_dnn490.pdb /FS -c D:\repos\opencv\opencv\modules\dnn\src\layers\recurrent_layers.cpp
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\csl\cudnn/recurrent.hpp(122): error C3861: 'cudnnSetRNNDescriptor_v6': identifier not found
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\csl\cudnn/recurrent.hpp(100): note: while compiling class template member function 'cv::dnn::cuda4dnn::csl::cudnn::RNNDescriptor<T>::RNNDescriptor(const cv::dnn::cuda4dnn::csl::cudnn::Handle &,cv::dnn::cuda4dnn::csl::cudnn::RNNDescriptor<T>::RNNMode,int,int,bool,const cv::dnn::cuda4dnn::csl::cudnn::DropoutDescriptor &)'
with
[
T=float
]
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\primitives\../csl/tensor_ops.hpp(541): note: see the first reference to 'cv::dnn::cuda4dnn::csl::cudnn::RNNDescriptor<T>::RNNDescriptor' in 'cv::dnn::cuda4dnn::csl::LSTM<T>::LSTM'
with
[
T=float
]
D:\repos\opencv\opencv\modules\dnn\src\layers\../cuda4dnn/primitives/recurrent_cells.hpp(48): note: see the first reference to 'cv::dnn::cuda4dnn::csl::LSTM<T>::LSTM' in 'cv::dnn::cuda4dnn::LSTMOp<float>::LSTMOp'
with
[
T=float
]
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\primitives\../../op_cuda.hpp(196): note: see the first reference to 'cv::dnn::cuda4dnn::LSTMOp<float>::LSTMOp' in 'cv::dnn::make_cuda_node'
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\primitives\../csl/tensor_ops.hpp(511): note: see reference to class template instantiation 'cv::dnn::cuda4dnn::csl::cudnn::RNNDescriptor<T>' being compiled
with
[
T=float
]
D:\repos\opencv\opencv\modules\dnn\src\layers\../cuda4dnn/primitives/recurrent_cells.hpp(88): note: see reference to class template instantiation 'cv::dnn::cuda4dnn::csl::LSTM<T>' being compiled
with
[
T=float
]
D:\repos\opencv\opencv\modules\dnn\src\cuda4dnn\primitives\../../op_cuda.hpp(196): note: see reference to class template instantiation 'cv::dnn::cuda4dnn::LSTMOp<float>' being compiled
D:\repos\opencv\opencv\modules\dnn\src\layers\recurrent_layers.cpp(763): note: see reference to function template instantiation 'cv::Ptr<cv::dnn::dnn4_v20231225::BackendNode> cv::dnn::make_cuda_node<cv::dnn::cuda4dnn::LSTMOp,cv::dnn::cuda4dnn::csl::Stream,cv::dnn::cuda4dnn::csl::cudnn::Handle,cv::Mat&,cv::Mat&,cv::Mat&,cv::dnn::cuda4dnn::RNNConfiguration&>(int,cv::dnn::cuda4dnn::csl::Stream &&,cv::dnn::cuda4dnn::csl::cudnn::Handle &&,cv::Mat &,cv::Mat &,cv::Mat &,cv::dnn::cuda4dnn::RNNConfiguration &)' being compiled
[393/491] Building CXX object modules\dnn\CMakeFiles\opencv_dnn.dir\Release\src\layers\split_layer.cpp.obj
ninja: build stopped: subcommand failed.
Steps to reproduce
cmake --build . --target opencv_dnn
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: dnncategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib