Re: [問題] GPU CUDA 新手學習一問
我也是最近剛開始接觸 CUDA 的新手, 底下是我自己紀錄下來的安裝過程, 試過兩次都
沒問題, 給你當作參考, 不過因為要練習用英文紀錄, 所以有些文法或拼字不對請見諒
有什麼問題歡迎大家一起討論
Platform:
Windows XP Pro
nVidia Geforce 9800GT
Software and driver:
Microsoft Visual C++ 2005 Express
cudadriver_2.3_winxp_32_190.38_general
cudasdk_2.3_win_32
cudatoolkit_2.3_win_32
Install the software and driver
1) Install the CUDA Driver, e.g. cudadriver_2.3_winxp_32_190.38_general,
and then reboot the computer.
2) Install the CUDA Toolkit, e.g. cudatoolkit_2.3_win_32.
3) Install the CUDA SDK in C:\NVIDIA GPU Computing SDK
(it's just for convenient.), e.g. cudasdk_2.3_win_32.
4) Run the bandwidthTest program located in
C:\NVIDIA GPU Computing SDK\C\bin\win32\Release
It's just a test for the running of CUDA on GPU.
5) Install the Visual C++ 2005 Express or Visual Studio.
Setup the CUDA with Visual C++
1) Tools > Options > Projects and Solutions > VC++ Project Settings >
Rule File Search Paths >
C:\NVIDIA GPU Computing SDK\C\common
2) Tools > Options > Projects and Solutions > VC++ Directories >
Library files >
$(CUDA_LIB_PATH) $(NVSDKCUDA_ROOT)\common\lib
3) Tools > Options > Projects and Solutions > VC++ Directories > Include
files >
$(CUDA_INC_PATH) $(NVSDKCUDA_ROOT)\common\inc
CUDA code syntax highlighting
1) Copy C:\NVIDIA GPU Computing SDK\C\doc\syntax_highlighting\visual_studio_8
\usertype.dat to
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
2) Visual Studio 2005 > Tools > Options > Text Editor > File Extension >
Extension > cu > Add > ok
Build a project
1) File > New > Project > Win32 > Console Application > name (Without .cu) >
Empty Project
2) Click Right key on Project > Build Rule Files > CUDA Build Rule v2.3.0
3) Add New Item > Code > C++ File > filename.cu
4) Click Right key on Project > Properties > Linker > Input >
Additional Dependencies > cudart.lib
Compile: Ctrl + F7
Run without debug: Ctrl + F5
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.123.72.3
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):
8
23
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章