kunzmi / managedCuda

ManagedCUDA aims an easy integration of NVidia's CUDA in .net applications written in C#, Visual Basic or any other .net language.
Other
449 stars 80 forks source link

Compiling for x86 in Windows 7 #9

Closed AeroClassics closed 8 years ago

AeroClassics commented 8 years ago

My application needs to be built for x86 because the code/driver for a hardware device in my system requires it. I did a nuget for the Managed CUDA x86-75 into my application. However, the first call to the NPP library (creating a NPPImage_8uC3 object) the system throws an exception saying

{"Unable to load DLL 'nppi32_75': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}

None of the module that came down has a 32_75 in the file name nor was there a nppi file.

What did I fail to do?

Thanks, Doug

kunzmi commented 8 years ago

Nvidia doesn't install the 32-bit versions of the Cuda toolkit libraries anymore if you're running a 64 bit Windows. You'd need to get the 32 bit NPP library from somewhere and I'm not even sure if Nvidia still has a 32 bit toolkit for Windows at all... The native DLLs can be found in the Cuda-toolkit folders, usually C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\

AeroClassics commented 8 years ago

Nvidia doesn't install the 32-bit versions of the Cuda toolkit libraries anymore if you're running a 64 bit Windows. You'd need to get the 32 bit NPP library from somewhere and I'm not even sure if Nvidia still has a 32 bit toolkit for Windows at all... The native DLLs can be found in the Cuda-toolkit folders, usually C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\


Reply to this email directly or view it on GitHub: https://github.com/kunzmi/managedCuda/issues/9#issuecomment-172459896

AeroClassics commented 8 years ago

Well I have cleared a bunch of hurdles today. But now when I try to allocate a NPPImage_8uC3 I get a "Cannot find nppi64_75.dll"

I would guess that it is part of NPP.DLL but I cannot prove it. I am absolutely sure I have managedCUDA x64_75 installed.

Any guesses?

Thanks.

kunzmi commented 8 years ago

nppi64_75.dll is the native NPP library from Nvidia. It should be located in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\ and the same path should also be part of your PATH settings. If the cuda toolkit version 7.5 is installed, these libraries/settings should all be there. Your application calls a function/method in managedCuda-library NPP.dll which then forwards the call to the native nppi64_75.dll and handles all the wrapping from managed to native world.

lorenzoviola commented 8 years ago

I can confirm that I tried myself to install the Nvidia GPU toolkit on a x86 Windows 7, and looks like it doesn't work anymore. Just the 64bit version seems complete and working.

AeroClassics commented 8 years ago

It seems since CUDA 7 they have dropped support for x86 altogether. I had to split my application up so the the WPF stuff could be built x86 and the managedCuda stuff could be built x64. Their new vision toolkit is only Windows 8.1 or Linux.

AeroClassics commented 8 years ago

Danke schoen.

Best Regards / Mit freundlichen Grüßen, Doug

Douglas R. Jones Sr. Software Engineer/AdVISE Project Mgr. Rohde & Schwarz USA, Inc. 1500 Lakeside Parkway Ste 100 Flower Mound, TX 75028 Mobile: +1 214-601-3301 Office: +1 469-713-5344 E-Mail: Doug.Jones@rsa.rohde-schwarz.com Website: http://www.rohde-schwarz.com/

From: Michael Kunz notifications@github.com To: kunzmi/managedCuda managedCuda@noreply.github.com Cc: AeroClassics doug.jones@rsa.rohde-schwarz.com, Author author@noreply.github.com Date: 10/24/2016 08:38 AM Subject: [Newsletter] Re: [kunzmi/managedCuda] Compiling for x86 in Windows 7 (#9)

Closed #9. ? You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.