Assumptions: You have a working c/c++ environment (compilers and libraries --> XCode)
I was able to install the drivers, toolkit, and SDK on my MBP running OS X 10.6.3. Please refer to the NVIDIA's CUDA website to confirm your video card is CUDA ready or you can check it here --> http://www.nvidia.com/object/cuda_gpus.html
1. Set the following variables in your .bash_profile or .cshrc (I use csh at work, but bash at home
PATH:
/cuda/bin (export PATH=$PATH:/usr/local/cuda/bin) DYLD_LIBRARY_PATH:
/cuda/lib (export DYLD_LIBRARY_PATH=/usr/local/cuda/lib)
2. Download the Development Drivers, Toolkit, and SDK from:
- http://developer.nvidia.com/object/cuda_3_0_downloads.html
3. Install the drivers and verify the installation:
Lagatuz-MacBookPro:cuda marklagatuz$ ls
include lib
Lagatuz-MacBookPro:cuda marklagatuz$ pwd
/usr/local/cuda
4. Install the Toolkit and verify the installation:
Lagatuz-MacBookPro:cuda marklagatuz$ ls
bin cudaprof doc include lib man open64 src
Lagatuz-MacBookPro:cuda marklagatuz$ pwd
/usr/local/cuda
5. Install the SDK and verify the installation:
Lagatuz-MacBookPro:cuda marklagatuz$ cd /Developer/GPU\ Computing/
Lagatuz-MacBookPro:GPU Computing marklagatuz$ ls
C OpenCL bin doc lib shared
Lagatuz-MacBookPro:GPU Computing marklagatuz$ pwd
/Developer/GPU Computing
6. Complete installation of the SDK:
cd into C and run make:
Lagatuz-MacBookPro:GPU Computing marklagatuz$ ls
C OpenCL bin doc lib shared
Lagatuz-MacBookPro:GPU Computing marklagatuz$ cd C
Lagatuz-MacBookPro:C marklagatuz$make
Finished building all
7. At this point after the make you should have a fully functional CUDA environment. To test out your environment:
cd into /Developer/GPU Computing/C/bin/darwin/release
execute the file deviceQuery: ./deviceQuery
The output should give you information on your CUDA Enabled Device!Lagatuz-MacBookPro:C marklagatuz$ ls
Makefile bin doc releaseNotesData tools
Samples.html common lib src
Lagatuz-MacBookPro:C marklagatuz$ cd bin/
Lagatuz-MacBookPro:bin marklagatuz$ ls
darwin
Lagatuz-MacBookPro:bin marklagatuz$ cd darwin/
Lagatuz-MacBookPro:darwin marklagatuz$ ls
release
Lagatuz-MacBookPro:darwin marklagatuz$ cd release/
Lagatuz-MacBookPro:release marklagatuz$ ./deviceQuery
--
Resources
1. NVIDIA CUDA 3.0 Downloads
- http://developer.nvidia.com/object/cuda_3_0_downloads.html
- http://developer.download.nvidia.com/compute/cuda/3_0/docs/GettingStartedMacOS.pdf
No comments:
Post a Comment