Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not locate deviceQuery on my installation Cuda toolkit v7.5 on Windows 10

As I was going through installing Cuda v7.5 following this link http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/#compiling-examples

I was not able to verify the installation as described in section 2.5. Verify the Installation. The reason was because I could not find deviceQuery program that should have been located in

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Release

Therefore, I could not run the deviceQuery for Cuda to be verified. Where is deviceQuery program located ? Is it still precompiled and deployed by the installation ?

like image 521
rsc05 Avatar asked May 09 '16 08:05

rsc05


People also ask

Where is deviceQuery?

Creating the deviceQuery.exe file: Go to the (default) directory C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9. 2\1_Utilities\deviceQuery.

Where is Cuda Toolkit installed Windows 10?

Download the NVIDIA CUDA Toolkit. The NVIDIA CUDA Toolkit is available at https://developer.nvidia.com/cuda-downloads. Choose the platform you are using and one of the following installer formats: Network Installer: A minimal installer which later downloads packages required for installation.

Where is Cudatoolkit installed?

By default, the CUDA SDK Toolkit is installed under /usr/local/cuda/. The nvcc compiler driver is installed in /usr/local/cuda/bin, and the CUDA 64-bit runtime libraries are installed in /usr/local/cuda/lib64.


3 Answers

Okay, so if you are a complete noob like me in using Visual Studio then you might be thrown off by the instruction "build the application first". Just watch this video to get an idea of how to build and run a project/program using VS.

https://www.youtube.com/watch?v=cL05xtTocmY

As soon as you open VS (I am using 15.6), you will be prompted to upgrade the SDK. Make sure to do so. If you've misclicked or skipped upgrading, you can go to the Project pull down menu and click "Retarget Solution" and click ok on the menu that appears. Then build and debug as shown in the video.

Creating the deviceQuery.exe file:

Go to the (default) directory C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.2\1_Utilities\deviceQuery. Just follow the procedure of running the MatMul file but this time build the deviceQuery_vs2017.sln file and debug it. Remember to retarget the solution.

like image 195
Hasan Al Shaikh Avatar answered Oct 25 '22 15:10

Hasan Al Shaikh


No, it's not precompiled any more.

You have to compile (build) the application first, before you can run it.

That is true for all the CUDA samples now.

like image 40
Robert Crovella Avatar answered Oct 25 '22 15:10

Robert Crovella


OK, I've had this problem with CUDA Toolkit 10 under Windows 10. In my case, I do never use the admin account, and the installation was done from the user account, entering the admin password when necessary. After repeated trials, here's what worked for me:

  1. Make sure to uninstall any old version of CUDA and Visual Studio (just to have a clean start)
  2. Restart the computer
  3. Install Microsoft Visual Studio Community Edition. During the install, make sure to select the C++ Development tools
  4. Restart
  5. Install the Cuda Toolkit
  6. Restart

With this, I had all the files. But the deviceQuery still would not compile because it was targeted to an older version of Windows. To compile it, one needs to 'Retarget' the project to the current windows SDK. However, this doesn't work out-of-the-box because the 'deviceQuery_vs2017.vcxproj' file is read-only for regular users.

So, there are two possible solutions:

  1. Copy the folder to some place where you have write permission, or
  2. (This is what I used, for convenience) Using Windows Explorer, navigate to the C:\ProgramData\NVIDIA Corporation directory. Right click on the 'CUDA Samples' directory, select 'Properties'. Under the 'Security' tab, click 'Edit' and add your user to it.

This way you can Retarget the solution in place. After that, I could open the solution in MS Visual Studio, Retarget it, build it and test it, and all worked fine.

Hope that helps.

like image 21
Gustavo Seabra Avatar answered Oct 25 '22 16:10

Gustavo Seabra