In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install CUDA7.0 in win7+VS2010. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Win7+ VS2010 installation CUDA7.0 graphic and text instructions
1. Check the local configuration to see if the video card type supports NVIDIA GPU. Select computer-> right-click Properties-- > device Manager-- > display Adapter: NVIDIA GeForce GT 610,The compute capability of the corresponding video card can be found from https://developer.nvidia.com/cuda-gpus.
two。 Download the appropriate driver 347.88-desktop-win8-win7-winvista-64bit-international-whql.exe from http://www.nvidia.cn/Download/index.aspx?lang=cn and install it
3. Download the latest version of CUDA7.0 installation according to the native type from https://developer.nvidia.com/cuda-toolkit
4. Follow the http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-microsoft-windows/index.html#axzz3W8BU10Ol steps to verify that the installation is correct:
(1) Open the Samples_vs2010.sln project in C:\ ProgramData\ NVIDIACorporation\ CUDA Samples\ V7.0 directory, and compile the whole project under Debug and Release x64, respectively.
(2) during compilation, you will be prompted that the header files of "d3dx9.h", "d3dx10.h" and "d3dx11.h" can not be found. You can download DXSDK_Jun10.exe from http://www.microsoft.com/en-us/download/details.aspx?id=6812 and install it in the default directory. Then compile the project.
If there is an error installing DXSDK_Jun10.exe, as shown in the following figure
Solution:
Open the "Control Panel" of the "programs and Features", sure enough, the computer installed "Microsoft Visual C++ 2010 x86 Redistributable-1010.0.40219", and DXSDK_Jun installed is "Microsoft Visual C++ 2010 x86 Redistributable-1010.0.30319", the version is lower than the installed version of this machine, so the installation occurred s1023 error.
Uninstall and reinstall the later versions of "Microsoft Visual C++ 2010 x86 Redistributable-1010.0.40219" and "Microsoft Visual C++ 2010 x64 Redistributable-1010.0.40219".
Restart vs2010 to compile and pass.
(3) Open C:\ Program Files\ NVIDIA Corporation\ Installer2\ CUDASamples_7.0. {658B19AF-1B62-4FD6-A2B7-9E653E4F2B7A}\ bin\ win64\ Release directory, open the cmd command line, drag deviceQuery.exe directly into cmd, enter, you will display GPU graphics card, CUDA version and other related information. The last line shows: Result = PASS
(4) drag bandwidthTest.exe to cmd, enter, and relevant information such as Device0: GeForce GT 610 will be displayed, followed by a line: Result = PASS
5. Configure VS2010
(1) Open VS2010, create a new project, select win32, and remember to check "empty project".
(2), right-click source file-> add new item-> Select CUDA C/C++File, the name is arbitrary.
(3) right-click Project-> generate Custom-> check CUDA 5.5
(4) right-click main.cu- > attribute-> item type select "CUDA Cpico +"
(5) right-click Project-> Properties-> Linker-> General-> additional Library Directory-> add directory $(CUDA_PATH_V7_0)\ lib\ $(Platform)
(6), linker-> input-> add cudart.lib for additional dependencies
(7) add code to main.cu. The sample code is as follows:
# include
< stdio.h># include "cuda_runtime.h"
# include "device_launch_parameters.h"
Bool InitCUDA ()
{
Int count
CudaGetDeviceCount & count)
If (count = = 0)
{
Fprintf (stderr, "There is no device.\ n")
Return false
}
Int i
For (I = 0; I)
< count; i++) { cudaDeviceProp prop; if(cudaGetDeviceProperties(&prop, i) == cudaSuccess) { if(prop.major >= 1)
{
Break
}
}
}
If (I = = count)
{
Fprintf (stderr, "There is no device supporting CUDA 1.x.\ n")
Return false
}
CudaSetDevice (I)
Return true
}
Int main ()
{
If (! InitCUDA ()
{
Return 0
}
Printf ("HelloWorld, CUDA has been initialized.\ n")
Return 0
}
Windows7 64-bit graphics card GT640M cuda7.5
Downloaded the latest version of cuda
Http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_windows.exe
Install python2.7.11 64bit
Https://www.python.org/downloads/windows/
First test whether CUDA7.5 is supported.
Http://blog.sina.com.cn/s/blog_534497fd0102vbu3.html
Open the .sln file in C:\ ProgramData\ NVIDIA Corporation\ CUDA Samples\ v7.5mu, open it in vs2012, and debug.
Set up the win32 empty project, add the link attachment library directory $(CUDA_PATH_V7_5)\ lib\ $(Platform), and add the link input additional dependency cudart.lib
Add the cuda code and set the item type CUDA Candlespace + in the code properties
Run the code
# include # include "cuda_runtime.h" # include "device_launch_parameters.h" bool InitCUDA () {int count; cudaGetDeviceCount (& count); if (count = = 0) {fprintf (stderr, "There is no device.\ n"); return false;} int i; for (I = 0; I
< count; i++) { cudaDeviceProp prop; if(cudaGetDeviceProperties(&prop, i) == cudaSuccess) { if(prop.major >= 1) {break;}} if (I = = count) {fprintf (stderr, "There is no device supporting CUDA 1.x.\ n"); return false;} cudaSetDevice (I); return true;} int main () {if (! InitCUDA ()) {return 0 } printf ("HelloWorld, CUDA has been initialized.\ n"); return 0;} this is the end of the article on "how to install CUDA7.0 in win7+VS2010". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.