I am using zed camera for 3D mapping(https://www.stereolabs.com/). The camera comes with a software devolopment kit. The development kit makes use of Nvidia graphics card and CUDA7.5 toolkit. The SDK setup automatically checks for CUDA on pc and installs it if not present.
The problem I am facing is that when I run the software it gives an error messages that it cannot find nppi64_75.dll, cudart64_75.dll, nppc64_75.dll. However, CUDA 7.5 is already installed and I can see these dll files in "NVIDIA GPU Computing Toolkit" folder in the same drive. But why the software cannot find these files? And what should I do? I am using windows 10, 64 bit. I have tried reinstalling the software and CUDA toolkit but it doesn't work and it works easily on other computers.
Note: I would like to mention that earlier I had some problem with the camera drivers and camera wasn't working but the software was able to locate the CUDA dll files. I uninstalled everything including CUDA toolkit and reinstalled and now i am stuck with this problem.
However, cuda 7.5 is already installed and i can see these dll files in "NVIDIA GPU Computing Toolkit" folder in the same drive. But why the software cannot find these files?
The DLLs are not found, because the CUDA Computing Toolkit installation folder is not a standard search path. Either add it to the system's PATH environment variable, or copy the DLLs into the same folder in which your .exe resides. You can also implement a wrapper .bat file that sets path accordingly (just for that invocation) and then launches the program.
Related
I want to install tensorflow-gpu on my linux machine on google cloud platform. I am not using an deep learning vm gcp provide. So I installed anaconda on my linux instance and now i want to install tensorflow. I already installed nvidia drivers and cuda. They can be downloaded straight in to the cloud instances. But for cuDNN I have to download it into my local machine and then upoad it into the cloud instance. Is there a way to download that file directly from nvidia site to my cloud instance? Thank you
EDIT
CUDNN_URL="developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
wget -c ${CUDNN_URL}
Using these lines of commands we can directly download cudnnv5.1 and I have seen the links for version 6.5 as well. I tried the same link by putting the version I want but it did not work. Anyone knows a way to use this CUDNN_URL to directly download cudnn v7.1 or higher directly using wget or curl but not logging into the an Nvidia account?
There was a change in the naming convention of cuDNN archives.
Since version 7.2.1, NVIDIA added the full version number into the archive name instead of the previously used short one.
That means that the resulting download link for 7.2.1 is:
https://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.2-linux-x64-v7.2.1.38.tgz
instead of,
https://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.2-linux-x64-v7.2.tgz
You can follow this pattern:
VERSION_FULL="8.1.0.77"
VERSION="${VERSION_FULL%.*}"
CUDA_VERSION="11.2"
OS_ARCH="linux-x64"
CUDNN_URL="https://developer.download.nvidia.com/compute/redist/cudnn/v${VERSION}/cudnn-${CUDA_VERSION}-${OS_ARCH}-v${VERSION_FULL}.tgz"
wget -c ${CUDNN_URL}
The resulting link would be:
https://developer.download.nvidia.com/compute/redist/cudnn/v8.1.0/cudnn-10.2-linux-x64-v8.1.0.77.tgz
Because you need to have a developer account to get cuDNN there are no direct links to download files.
As a workaround you can download cuDNN and other software to your local machine and then follow documentation Transferring files to instances to copy files to your VM instance:
For example, if you use Windows I'd recommend you to use WinSCP to copy files to your VM.
In addition, have a look at this article Deep Learning environment setup on Ubuntu(16.04) | CUDA, cuDNN, OpenCV(3.x), TensorFlow, Keras.
If your really concerned about(I was) data to download cuda and cudnn files to your local machine and then upload it to the gcp instance. You can set up an GUI for your GCP instance in no time. check this https://www.youtube.com/watch?v=e3RnnmcNI_E or any vnc server tutorial. After that you can directly download any file from using a web browser.
I am working on a Python script (I use Python 3.7.3) that uses tensorflow-gpu (1.14.0) and used PyInstaller 3.5 to convert this script to an executable. I am using CUDA 10.0 and cuDNN 7.6.1 and my graphics card is a NVIDIA GeForce GTX 960M. I recently deinstalled CUDA to test if the executable of the Python script still runs and surprisingly it still runs via GPU, which does not work when I now run the Python script directly.
My question is, can this executable be run on systems without the CUDA toolkit but with a CUDA-capable graphics card?
According to this documentation PyInstaller will make and store a private copy of all of the dependent external libraries which Python code relies on when building a single file executable.
Therefore it is safe to assume that your executable runs irrespective of the installation status of the CUDA toolkit because it has a full private copy of the necessary CUDA libraries internally which it uses when the executable is run.
According to the GitHub issues in the official repository (here and here for example) CUDA libraries are usually dynamically loaded at run-time and not at link-time, so they are typically not included in the final exe file (or folder) with the result that the exe file won't work on a machine without CUDA installed. The solution (please refer to the linked issues too) is to put the DLLs necessary to run the exe in its dist folder (if generated without the --onefile option) or install the CUDA runtime on the target machine.
The behaviour that you're experimenting maybe it's due to the specific version of TF, that loads the libraries in a different fashion with respect to what described above, but it's not the expected behaviour nowadays.
I am currently using the cmake-gui to compile yolo darknet at https://github.com/AlexeyAB/darknet.git. However, it will not enable cuda and I am having a few other odd issues. These include when I run darknet.exe from the Release folder after building it using VS2017, it states that it cannot find pthreadVC2.dll or opencv_world410.dll.
To fix the other issues, I copied the exe and those files and put them all in the root folder of the project. This seems to work but I am not sure why it wouldn't work otherwise.
For cuda, I am not sure what to try. I have these system variables and path:
Here is my cmake-gui:
It can be seen that CMAKE_CUDA_COMPILER is NOTFOUND. Which I am thinking is the problem, but I am not sure why it cannot be found. If I run nvcc -V in the command prompt, it returns:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130
Also here is the output for cmake configuration:
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
OpenCV ARCH: x64
OpenCV RUNTIME: vc15
OpenCV STATIC: OFF
Found OpenCV 4.1.0 in C:/opencv/build/x64/vc15/lib
You might need to add C:\opencv\build\x64\vc15\bin to your PATH to be able to run your applications.
ZED SDK not enabled, since it requires CUDA
Configuring done
If you have any tips for any of these problems, please let me know. Just an FYI, currently darknet does work and if I test it on dog.jpg, it successfully detects the classes. However, this is of course without Cuda or cudnn and I would like to use these eventually. Thank you! If you need anything else from me please let me know!
Unlike above said, i didn't reinstall CUDA, i just copy 4 files from
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions
to
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
The answer was given by #Andropogon: CUDA has to be reinstalled after Visual Studio.
This is what we found when I dug into it a bit with my colleague:
Similar to OP, all compilation steps seemed to run without error and generate an executable.
Taking a closer look at cmake, under CMAKE/CMAKE_CUDA_COMPILER it said NOT FOUND, despite nvcc.exe being on the Path. (nvcc --version runs fine in Powershell.) We manually entered the location of nvcc.exe to this option, and now configure comes up with a more helpful error message: No CUDA toolset found. with reference to line numbers in various cmake files. Among those lines was this message, which seems to confirm that Visual Studio (VS) is part of the problem,
if(NOT CMAKE_VS_PLATFORM_TOOLSET_CUDA)
message(FATAL_ERROR "No CUDA toolset found.")
So after reinstalling CUDA the compilation looked more like I would expect - but I still get an executable which doesn't appear to do anything (no output on the command line, no prediction.jpg generated). Anyway, hopefully that can shed a bit of light on the CUDA/VS/cmake issue.
I had the same problem, I tried many ways to make GPU available for transe, and finally cmake started to see CUDA when I reinstalled VS2019 (from disk D to disk C) and reinstalled CUDA in version v.10.1. After this, cmake began to find CUDA, and after compiling the project in VS2019, everything start to work correctly.
Important thing to install Visual Studio firstly and later CUDA.
I installed CUDA 9.0 because without it, Tensorflow gives the error:
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable.
I have the path variable set to the bin directory of CUDA 9.0 installation, where the required DLL file is present. I tried setting it to its parent directory too. But it still gives me the same error.
I found the solution. And it was the good old advice - "Have you tried turning it off and on again?"
I restarted the computer, Tensorflow found cudart64_90.dll, but now it could not find cudnn64_7.dll. I'm providing the steps ahead to get rid of the issues I encountered.
If you've installed Tensorflow GPU version, you're likely to run into the problem mentioned in the post. Especially if you've not installed NVDIA development toolkits before. Follow these steps:
1. Install CUDA
Get it from here. Install only the version mentioned in Tensorflow's ImportError.
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
It explicitly tells you the version number. Initially, I installed CUDA 9.1 instead of 9.0, it didn't work. The installation on Windows is straight forward. Run the .exe, uncheck NVIDIA Geforce and other packages if you already have them installed.
2. Include CUDA path in PATH variable
Point it to the bin directory of your tensorflow installation.
Check here if you don't know how to set the PATH variable. Now try importing Tensorflow, if it still doesn't work, try rebooting the system.
Now you will likely run into the error:
ImportError: Could not find 'cudnn64_7.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn
3. Install cuDNN
Once again, only install the version mentioned in the error.To get the installer, you need to have an NVIDIA developer account. If you don't have it, sign up and it will direct you to the link to download cuDNN. Select the version compatible with your CUDA version (it's in the package name). Download the zip archive. Extract it somewhere on your disk.
4. Include cuDNN path in PATH variable
Similar to step two. This time, point it to the bin directory in your extracted archive of cuDNN. Now import Tensorflow. Restart system if required.
It should now work.
When I reached to step 3, I copied and pasted the files inside the archive
as in here
Copy <installpath>\cuda\bin\cudnn64_7.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin.
Copy <installpath>\cuda\ include\cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include.
Copy <installpath>\cuda\lib\x64\cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64.
I had the same problem for a couple hours as well. Just restarted my computer and that fixed the issue you were having, so give that a try.
Always check the cuda version, in this case you have to install cuda version 9.0 this will create the cudart64_90.dll file in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin folder.
This will surely work.
I'm a python newbie and I'm trying to install pyopencl. I've found Andreas Klöckner's website. And I'm trying to use the Windows 7 64bit, Python 2.7, Visual Studio 2010, Intel OpenCL SDK 1.5 directions to install. The problem is that Intel OpenCL SDK has been integrated into INDE. So I'm wondering what the equivalent library file is for C:\Program Files (x86)\Intel\OpenCL SDK\1.5\include and C:\Program Files (x86)\Intel\OpenCL SDK\1.5\lib\x64 ? After installing INDE, I didn't see anything under that specific file location.
Under C:\Intel\INDE, if I just look for folders that contain libraries I saw the code_builder_5.0.0.43 (contains OpenCL), IDEintegration (contains a bunch of stuff), the media_raw_accelerator_1.0.3, media_sdk_6.0.0.308. Anyone know which one I should be using?
It's 'C:\Intel\INDE\code_builder_5.0.0.43\include' and 'C:\Intel\INDE\code_builder_5.0.0.43\lib\x64'
Let me add a few points that could be useful to others who want to use PyOpenCL on Windows. First, if you are not a Python developer, you will want to use the Intel OpenCL Code Builder. When you install the INDE Suite, you integrate in Visual Studio and you get all the syntax highlighting amongst others. This video gives a great overview: http://bcove.me/xrcs5bze
The latest OpenCL 2.0 (as of time of writing) is now part of OpenCL Code Builder. In order to access the OpenCL framework to use with PyOpenCL, do the following installation on Windows (if not yet done):
Detailed instructions can be found here: http://wiki.tiker.net/PyOpenCL/Installation/Windows
Install Visual Studio
Install Python 2.7
Install NumPy
Install PyOpenCL
Install Intel INDE (OpenCL Code Builder component)
Once this is done, locate the siteconf.py file and edit accordingly. On my machine, I have INDE Update 2 which comes with OpenCL Code Builder 5.1.0.25 installed.
Thus, the following lines are edited:
CL_INC_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\include']
CL_LIB_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x64', r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x86']
I hope that helped.