Search This Blog

Sunday, 12 January 2025

Installing Cuda 12.5 on Windows 11

I want to make a note. I did this update because I received an error when I tried to run a code of mine. A similar error can be seen in:

https://forums.developer.nvidia.com/t/cannot-run-samples-on-ms-visual-studi-2019/72472/37


So what I did was to reinstall the cudatoolkit 12.5 with the cuda samples 12.5 but before that I reinstall the driver for my nvidia card

Go to the windows icon and in search type system so you know what driver you need, then go to:

https://www.nvidia.com/es-la/drivers/

https://developer.nvidia.com/cuda-12-5-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local

https://github.com/NVIDIA/cuda-samples/releases


I deleted the past  nvidia toolkits I had and then it work like a charm. 


Related with these topic there is an error that I got after doing the update. It is related with the path of the common files.  The cuda samples that I download from github work fine but when I copy and paste an example in another folder, I got:

Cannot open include file: 'helper_cuda.h': No such file or directory

The way I solved it was:

I added the path to the  common files. I went to Project / NameofProject properties /Configuration Properties / VC++ Directories /$(IncludePath) / Edit / Include Directories / Click on the file icon / Then on the ellipsis icon / Add the path of the common folder 

In my case that was something like:

C:\Users\myuser\cuda-samples-12.5\cuda-samples-12.5\Common

Then:


Select folder / Ok / Ok /

In this way we add the path for the common folder and the compiler can recognize headers like  

helper_cuda.h

Another link relate with this error is:

https://forums.developer.nvidia.com/t/vs-2019-include-helper-cuda-h-and-other-helper-suffix-cant-be-found-compilation-error/258651

PS. 

I added one cuda project in a One Drive folder (one which shares my laptop and desktop) and then added the both common paths to the project, the one in my desktop computer and the one in my laptop computer. I made the project to work in both machines and obviously to sincronize any change. Ok, some of you would say, why don't you use git instead but in this way the changes are totally automatic. This procedure feels a little bit artistic, don't you think?

No comments:

Post a Comment