简体   繁体   中英

Running CUDA programs on non CUDA machines

I am trying to run CUDA codes on my computer. I dont have a Nvidia graphics card. I just want to try to emulate it to check if my code is correct and then later check the parallelization results.

I installed the CUDA toolkit and the CUDA SDK on my computer. I am trying to set it up with Visual studio 2010. But when I run the sample programs in the SDK the following error comes:

C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 4.0\\C\\src\\eigenvalues\\eigenvalues_vs2010.vcxproj : error : The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\BuildCustomizations\\CUDA 4.0.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 4.0\\C\\src\\eigenvalues\\eigenvalues_vs2010.vcxproj

C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 4.0\\C\\common\\cutil_vs2010.vcxproj : error : The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\BuildCustomizations\\CUDA 4.0.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 4.0\\C\\common\\cutil_vs2010.vcxproj

Unable to start program C:\\ProgramData\\NVIDIA Corporation\\NVIDIA GPU Computing SDK 4.0\\shared\\lib\\Win32\\shrUtils32D.lib The specified file is an unrecognized or unsupported binary format.

Can some one please help me out with this error.

There are two problems here.

The first two errors that you see are actually the result of Visual Studio not finding the build customization files that your project uses. These build customizations are handy additions to Visual Studio which allow you to easily add CUDA sources to your projects without having to manually set up build rules to call NVCC.

I don't remember if it was the case for CUDA 4.0, but with 4.1 these were automatically installed with the CUDA Toolkit. (I remember in some earlier version I set this up manually, so check your documentation to see if that's necessary) Are you sure you installed this toolkit? (For CUDA 4.0 in your case)

The last error is actually the result of you not trying to run an executable from within Visual Studio, but a static library. Of course this doesn't work, so it will complain about an unrecognized binary format. If you want to run a particular executable from within Visual Studio, make sure its project is set as the startup project. You can do so by right-clicking on the particular project and selecting "Set as startup project".

However, even if you solve these errors, you still won't be able to run these CUDA examples without a Nvidia graphics card. The emulator which was part of pre 3.x CUDA releases is no longer a part of CUDA. A possible solution would be to use Ocelot , but if you're simply starting out, that might be a bit much.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM