close

https://developer.nvidia.com/cuda-downloads

 

1. Download and install 

  cuda-mac-5.5.28_10.9_64.pkg

 

2. set environment :  ~/.bash_profile

====

export PATH=/Developer/NVIDIA/CUDA-5.5/bin:/usr/local/bin:$PATH

export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.5/lib:$DYLD_LIBRARY_PATH

 

3. edit ./configure.sh

加入 curl 設定

./configure "CFLAGS=-O3" "CXXFLAGS=-O3" --with-cuda=/usr/local/cuda --with-libcurl=/usr/local/opt/curl

 

4. edit Makefile

改為 -arch=compute_35 

/usr/local/cuda/bin/nvcc -O3 -arch=compute_35 --maxrregcount=64 --ptxas-options=-v  -o test_kernel.o -c test_kernel.cu

 

 3. Compile

> ./configure.sh

> make

 

arrow
arrow
    文章標籤
    Mac Programming Cuda
    全站熱搜
    創作者介紹
    創作者 neojou 的頭像
    neojou

    Odyssey

    neojou 發表在 痞客邦 留言(1) 人氣()