Skip to content
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

System.DllNotFoundException - Unable to load DLL 'x64\yolo_cpp_dll_gpu.dll': The specified module could not be found. #6

Closed
dttson opened this issue Aug 28, 2018 · 17 comments
Assignees
Labels
question Further information is requested

Comments

@dttson
Copy link

dttson commented Aug 28, 2018

Hi, i got this error when trying to test on a gpu environment. Could you help me?

@tinohager
Copy link
Contributor

tinohager commented Aug 28, 2018 via email

@chesslove
Copy link

Thank for your reply, i recorded a video to show step by step. Hope it could help.
https://youtu.be/wChPfgpk-0k

@tinohager
Copy link
Contributor

Dont change the existing code in the YoloWrapper.cs, copy the cudnn64_7.dll in the x64 output directory.

@tinohager tinohager self-assigned this Aug 29, 2018
@tinohager tinohager added the question Further information is requested label Aug 29, 2018
@chesslove
Copy link

It is working perfectly now, thank for your help!

@omarattia3143
Copy link

omarattia3143 commented Nov 7, 2018

i get the same error in this line
case DetectionSystem.GPU:
var deviceCount = GetDeviceCount(); //this one
i am using nvidia optimus, both of my cuda and cudnn flags are true
but it's not getting my gpu name
so there error mainly inthe GetDeviceCount(); method
[DllImport(YoloLibraryGpu, EntryPoint = "get_device_count")]
internal static extern int GetDeviceCount(); //this one

haaaalp!

@tinohager
Copy link
Contributor

@omarattia3143 have you some result with this tool "%PROGRAMFILES%\NVIDIA Corporation\NVSMI\nvidia-smi.exe"?

https://stackoverflow.com/questions/30693704/no-cuda-capable-device-is-detected-with-cuda-capable-gpu-installed-win7

@omarattia3143
Copy link

omarattia3143 commented Nov 7, 2018

@tinohager thanks for the fast replay, here is the result >

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 411.31 Driver Version: 411.31 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce 920M WDDM | 00000000:08:00.0 N/A | N/A |
| N/A 44C P8 N/A / N/A | 38MiB / 2048MiB | N/A Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+

@tinohager
Copy link
Contributor

Do you have experience with c++? I call this method in background cudaGetDeviceCount.

https://github.com/AlexeyAB/darknet/blob/master/src/yolo_v2_class.cpp -> int get_device_count() {

@omarattia3143
Copy link

i understand the code ... but i can't figure out the problem with gpu though everything works great with cpu. as soon as i put cudnn64_7.dll i get this exact error building for x64:
System.DllNotFoundException: 'Unable to load DLL 'x64\yolo_cpp_dll_gpu.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

i think i have to try it on a different machine.

@tinohager
Copy link
Contributor

Check you have missing dependency and send a screenshot please
http://www.dependencywalker.com/

@tinohager
Copy link
Contributor

Have you copy the cudnn64_7.dll in the x64 directory.?

@omarattia3143
Copy link

omarattia3143 commented Nov 7, 2018

Have you copy the cudnn64_7.dll in the x64 directory.?

yes i did
also here is dependency walker

image

image


i am using VS2017

@tinohager
Copy link
Contributor

Your system miss the msvcr100.dll

@tinohager
Copy link
Contributor

Try this dll please msvcr100.zip

@omarattia3143
Copy link

excuse my limited knowledge, my msvcr100 files are OK tried different version and tried yours and even Microsoft Visual C++ Redistributable for Visual Studio 2017 ... is there problem with my kernel32.dll too?
thank you for helping me i will take it from here and try to fix it.

@omarattia3143
Copy link

finally the detection has been using gpu with these configurations:
Nvidia Driver 416.34
CUDA 9.2.148
cuNdd 7.1.4
and fixing all the missing dependencies using dependency walker
thanks @tinohager

@tinohager
Copy link
Contributor

perfect 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants