cudaインストールメモ

環境
windows7 64bit
vs2008


devdriver_3.2_winvista-win7_64_263.06_general.exe
cudatoolkit_3.2.16_win_64.msi
gpucomputingsdk_3.2.16_win_64.exe
をインストール。
C:\ProgramData
が隠しフォルダになっているので表示させる。
ソースやら何やらはこの中。


環境変数のパスは自動的に入ってる。
vs2008のプラットフォームをwin32からx64に変更する。


Host to Device Bandwidth, 1 Device(s), Paged memory 3521.0
Device to Host Bandwidth, 1 Device(s), Paged memory 3537.0
Device to Device Bandwidth, 1 Device(s)      62818.4
Host to Device Bandwidth, 1 Device(s), Pinned memory 5718.7
Device to Host Bandwidth, 1 Device(s), Pinned memory 6299.1
Device to Device Bandwidth, 1 Device(s)      62778.2

                                                                                    • -

環境
mac book air 1.4GHz
GF320M
osx 10.6.5
xcode インストール済み


devdriver_3.2.17_macos.dmg
cudatoolkit_3.2.17_macos.pkg
gpucomputingsdk_3.2.17_macos.pkg
nvidiaのサイトからインストー
/Developer/GPU Computing/C/
に移動して
make
すると
/Developer/GPU Computing/C/bin/darwin/release/
に実行ファイルがたくさん出力される。
vi ~/.bash_profileに下記内容をコピー。
ターミナルを再起動。
export PATH=/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
export C_INCLUDE_PATH="/Developer/GPU Computing/C/common/inc"
export CPLUS_INCLUDE_PATH="/Developer/GPU Computing/C/common/inc"
export C_INCLUDE_PATH="/Developer/GPU Computing/C/common/inc":/usr/local/cuda/include:$C_INCLUDE_PATH
export LIBRARY_PATH="/Developer/GPU Computing/C/common/lib":"/Developer/GPU Computing/C/lib":/usr/local/lib:$LIBRARY_PATH


コンパイル
nvcc 001.cu -lcutil_i386
./a.out
で実行。


./bandwidthTest
Host to Device Bandwidth, 1 Device(s), Paged memory 1105.7
Device to Host Bandwidth, 1 Device(s), Paged memory 1121.2
Device to Device Bandwidth, 1 Device(s)      9443.4
./bandwidthTest --memory=pinned
Host to Device Bandwidth, 1 Device(s), Pinned memory 1560.4
Device to Host Bandwidth, 1 Device(s), Pinned memory 4555.5
Device to Device Bandwidth, 1 Device(s)      9435.5


参考
http://d.hatena.ne.jp/rabbit2go/20101130/1291117239
http://webcache.googleusercontent.com/search?q=cache:SEaauRNd50UJ:www.geocities.jp/parastyx/CUDA/+mac+cuda&cd=1&hl=ja&ct=clnk&gl=jp&client=safari