-
-
Notifications
You must be signed in to change notification settings - Fork 55.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNN module fails to compile against cuDNN 9.0 #24983
Comments
I have what I think is the same issue on Ubuntu 22.04.3 LTS |
No, although I suspect its the same issue if your using cuDNN 9.0. You can see my error in the original issue if you expand Full error trace. |
Indeed I am on cuDNN 9.0.0-1. It appears to me that it's the default version. apt-cache search cudnn
apt-cache show cudnn
apt list --installed | grep cudnn
|
The older versions are available under archived releases. |
@cudawarped Thanks; cuDNN 8.9.7 fixed the issue for me. |
Having same issue here but installing cuDNN 8.9.7 did not fix it for me 😔 |
@RaceIsIm Can you check your CMake configuration output to make sure you are using 8.9.7 and not still using 9.0, i.e.
|
Yeah i realised that cudNN files are in cuda folder aswell, made a spare folder with the 8.9.7 files and am now compiling. if i have further errors I will post here but consider it fixed for now. thanks. (edit: after changing the dirs on cmake gui it all worked as intended) |
Anybody have qustion about LNK2019 无法解析的外部符号 "public: void __cdecl cv::cuda::GpuMat::upload(class cv::debug_build_guard::_InputArray const &)" when you use opencv in your cmake project? |
FYI have hit the same issue with FROM nvidia/cuda:12.3.1-devel-ubuntu22.04, |
I hit the same issue on Windows with Cuda 12,3 and cuDNN 9.0 with generator Visual Studio 16 2019 |
Same issue here: #25192 |
Have you solved the issue?? If you have please mention what you have done |
I went down to cuDNN 8.9.7 and that fixed this issue for me. |
What is the Opencv version used and can you please mention what flags have you enabled |
Use the latest version of OpenCV with CUDA 12.3 and cuDNN 8.97 (currently neither CUDA 12.4 or cuDNN 9.0 are supported by OpenCV). For flags see https://cudawarped.github.io/opencv-experiments/qmd/opencv_cuda_python_windows.html#building-opencv-with-cmake |
Seeing a similar issue following the directions on http://jamesbowley.co.uk/qmd/opencv_cuda_python_windows.html#building-opencv-with-cmake. CUDA 12.3 and CUDNN 8.9.7 The errors below all refer to "recurrent_layers.cpp.obj" ? My build gets 90% done and then fails.
|
The error looks to be the same, I suspect you need to clean your build directory after atempting to build with cuDNN 9.0. Check the NVIDIA output of the CMake configure step to confirm you are really using cuDNN 8.9.7. e.g.
|
Out of boredom and curiosity I tried to update the code on my own to accommodate for the breaking changes. For now it seems to build with cudnn 9, I just need to update it to be compatible with CUDA 12.4 as well. Will push a PR upwards when I'm done. I'm guessing this will need to be for OpenCV 5? @cudawarped This would be my first contribution to openCV. |
@ZelboK That's great, if you subit your PR ontop of the 4.x branch the 5.x branch will get manually updated in due time. |
Can confirm downgrading to cuDNN 8.97 worked for me( cuda 11.8, opencv 4.9 ) |
Yes, In my case is compatible with cuda 12.2 and cudnn 8.9. |
Didn't you meet my the following issue??? |
yes, I had this problem |
I just tried the solution provided opencv/opencv_contrib#3690 , I mean: template <int N, typename... P, typename... R, class... Op>
__device__ __forceinline__ void blockReduce(const tuple<P...>& smem,
const tuple<R...>& val,
uint tid,
const tuple<Op...>& op)
{
block_reduce_detail::Dispatcher<N>::reductor::template reduce<
const tuple<P...>&,
const tuple<R...>&,
const tuple<Op...>&>(smem, val, tid, op);
} But problem persists... |
I have a PR up for this but it seems like one of hte builds broke. I don't have time to fix this for a while but I am pretty sure cuda 12.4's thrust toolkit has some problems when it comes to the tuples. If you're getting errors like
then be aware that there was a bug in calculating the fake tuple_size. That is fixed in CCCL's main however. |
@miscco Could you comment please? |
@ZelboK Where is your PR? Let me try... |
Nope, I was using a lower version of opencv (4.9.0) and you are using opencv 5.x, that could've changed a few things |
@josyulavt |
Whats your cuda and cudnn versions? |
cuda: 12.4 |
From the comments here, it looks like cuda 12.2 would work, however I used : |
anyone is working on cuda 12.4 update 1 and cudnn 9.1.1? |
Refactor DNN module to build with cudnn 9 #25412 A lot of APIs that are currently being used in the dnn module have been removed in cudnn 9. They were deprecated in 8. This PR updates said code accordingly to the newer API. Some key notes: 1) This is my first PR. I am new to openCV. 2) `opencv_test_core` tests pass 3) On a 3080, cuda 12.4(should be irrelevant since I didn't build the `opencv_modules`, gcc 11.4, WSL 2. 4) For brevity I will avoid including macro code that will allow for older versions of cudnn to build. I was unable to get the tests working for `opencv_test_dnn` and `opencv_perf_dnn`. The errors I get are of the following: ``` OpenCV tests: Can't find required data file: dnn/onnx/conformance/node/test_reduce_prod_default_axes_keepdims_example/model.onnx in function 'findData' " thrown in the test body. ``` So before I spend more time investigating I was hoping to get a maintainer to point me in the right direction here. I would like to run these tests and confirm things are working as intended. I may have missed some details. ### Pull Request Readiness Checklist relevant issue (#24983 - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
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
Steps to reproduce
cmake --build . --target opencv_dnn
Issue submission checklist
The text was updated successfully, but these errors were encountered: