-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall_CUDA
More file actions
25 lines (23 loc) · 1.47 KB
/
Install_CUDA
File metadata and controls
25 lines (23 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Install CUDA
-------------------------------------------------------------------
Write time 2018-10-05
Environment: Win10 family
GUP: NVIDIA GTX 960M
Step1: Download and Install Visual Studio 2015 (link http://blog.postcha.com/read/66), do not install latest VS2017 which can not degrade into VS2015 (details https://devtalk.nvidia.com/default/topic/1027299/cuda-setup-and-installation/cuda-9-failed-to-support-the-latest-visual-studio-2017-version-15-5/).
Step2: Download and Install CUDA9 (link to download CUDA https://developer.nvidia.com/), Some details for install CUDA (see https://blog.csdn.net/u013165921/article/details/77891913)
Step3: Test. Open VS2015 and Create CUDA project (NVIDIA->CUDA 9.0->CUDA 9.0 runtime). Then try to run with debug, if it gives some "无法查找或打开 PDB 文件", then see (https://www.cnblogs.com/wxl845235800/p/7206767.html). After that CUDA should works.
Test in cmd.exe:
1,Add the path which contains c1.exe to system environment path (e.g. "E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin")
2,Create a simple cuda sample and name it hello.cd, for example it looks like:
#include <stdio.h>
#include <iostream>
__global__ void mykernel(void){}
int main(void){
mykernel<<<1,1>>>();
printf("hello world\n");
std::cin.get();
return 0;
}
3,Open cmd.exe and cd into the path which contains the sample and type "nvcc -o hello.exe -arch=sm_50 hello.cu" .
4,Run the hello.exe and done.
-------------------------------------------------------------------