1 | initial version |
So I get back to you with the solution. First of all, the PR itself did not really break it, but rather you should make sure that your system is set up correctly. Had the same issue of cuda_runtime.h
not being found, but doing the following steps clearly fixed it for me. I am on Ubuntu, but it will probably be quite similar on other systems.
/usr/local/
and simply deleting all folders containing cuda in their name. This will make sure old versions are completely gone. Do the same at your home location /home/username/
because samples and such tend to go there for a specific installation.Before we can continue to OpenCV, we need to make sure that our system is fully configured for using CUDA.
/etc/ld.so.conf.d
cuda.conf
and inside add this rule /usr/local/cuda/lib64
sudo ldconfig
.bashrc
file, adding both export PATH="$PATH:/usr/local/cuda/bin"
and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
at the end of the file. This will simply make sure that every time you open a terminal, that your system knows where CUDA can be found.Now you can go get the latest OpenCV 3 master branch from github. When running cmake
it will look for the installation and find the CUDA7.5 installation normally. It is very important that you check this. If it does not, run the cmake-gui
installer and manually set the paths to your installation.
Now you are all set up. However there are still 2 important things to do
-L /usr/local/cuda/lib64
to your linker settings./usr/local/cuda/lib64
and /usr/local/lib/
.Using these guidelines every OpenCV GPU sample will build and run. The suggested opencv.hpp
header expansion was partially undone, but there is a new PR going in to add the CUDA modules none the less, so if this above is set up correctly, the header will work just fine again!