-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CUDA error in JavaCV 1.5.7 #1767
Comments
Please try to use the Dependencies tool: |
Thanks for the hint! I ran the test with the
When using JavaCV 1.5.7 I got an Not sure if this was as expected. My hopes where to be able to drill down into Looks like there is a new dependency that was not needed before:
With (Windows) install instructions:
So after downloading that DLL and copying it into my java program's working directory, the test code above and the sample Is it perhaps a good idea to bundle zlib into the cuda-platform-redist package? I found the example preset: |
Huh, I would have said that this is a bug in cuDNN. I wonder why they ask users to install it separately 🤔 Thanks for debugging this! I'll be adding the DLL... |
…sets for CUDA (issue bytedeco/javacv#1767)
I've fixed that in commit bytedeco/javacpp-presets@54a3b30. |
Thanks! Will do! Do we also have to handle zlib for linux? |
I don't think so, I wouldn't worry about zlib not being installed by default on Linux. |
Okey, great! Turns out I got some sync/update problems with the SNAPSHOT-builds. So right now I can't trust the result of my tests. |
This might still be an error on my side, but I can't get it to work with the snapshot-builds. I've checked that the downloaded jar file ( Most of the DLLs from the jar are extracted but not all. Are all DLLs in the jar file supposed to be extracted into the cache? |
For info: DLLs in cache:
DLLs in jar:
|
It's possible you still have an older version of the main cuda artifact. You'll need to make sure you have a new one, in the case of Maven, with |
It's possible that DLL doesn't work with your version of Windows? Set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console. |
Debug output when errorWhen I run with debug enabled I get this output:
Debug output when workingIf I extract
|
I don't see "zlib" anywhere in there, so for some reason it's not using the most recent version of the snapshots. You'll need to figure out why, that's unrelated to JavaCPP or JavaCV. |
That's a valid point! I'll continue my tests... One last question as a "sanity check" for me: Even for the jars in the 1.5.7-release where there shouldn't be any "snapshot-update-problem", not all the DLLs get extracted into the cache on my machine. I'll try to get hold on another machine soon where I can run more tests. |
If you don't try to use cuDNN, for example, its DLLs won't get extracted, that's fine. |
I think I've found something. Running the "dependency test" with However, the example The I think we also need to add When using this version, |
Yes, you're right, I forgot, that also needs to be updated. I've done that in commit bytedeco/javacpp-presets@24846f5. Please let me know if you encounter any other issues with this! Thanks for testing |
Great! One problem though: The lib name will now get the default ending lib += ... : lib.equals("zlibwapi") ? "" : "64_11"; Another thought: Since |
You're right, I fixed that in commit bytedeco/javacpp-presets@45ec402. Thanks! |
Nice! This version works. 😃 Does the |
It's not going to try to load the same library twice, no. Those code segments and the logic in Loader can still obviously be improved, but anyway it's not a problem, it doesn't do anything bad anyway. |
Perfect! Thanks for fixing this! |
The fix has been released with JavaCV 1.5.8! Thanks for reporting and for testing. |
Working great in v1.5.8. Thanks! |
The problem
I'm using OpenCV DNN to do object detection very similar to the sample in
YOLONet.java
. Both my code and the sample stopped working after upgrading JavaCV from 1.5.6 to 1.5.7.When I'm using the following dependencies:
the sample will crash on the network interference here:
https://github.com/bytedeco/javacv/blob/1.5.7/samples/YOLONet.java#L175
The java process will exit with error code:
Steps I've taken to get some clues:
1) Run on CPU -> Works
If I force the interference to run on CPU instead of GPU everything works fine.
This can be done by not including the gpu dependencies
or by comment out the CUDA setup:
https://github.com/bytedeco/javacv/blob/1.5.7/samples/YOLONet.java#L143-L144
2) Use old cuda-platform-redist -> Works
If I mix the versions of the dependencies like this:
to use the older cuda distribution, I get the following warning:
but everything works fine.
3) Enable debug logging
I added the following line to enable debug logging:
System.setProperty("org.bytedeco.javacpp.logger.debug", "true");
And noticed that I get a lot of error messages like this for all the CUDA DLLs:
I only get these messages when using JavaCV 1.5.7, but not when using JavaCV 1.5.6.
Questions
1) Missing DLLs?
Right now I don't have any other computers to run the tests on. Could it be that my computer is missing some nvidia DLLs that the newer CUDA DLLs depends on? (I'm using the latest drivers for my RTX 2080 GPU)
2) More logs?
Is it possible to enable more logging to get further clues?
The text was updated successfully, but these errors were encountered: