Jun 21, 2009

Make CUDA Works on MacBook Pro

  1. Download and install CUDA toolkit and CUDA SDK.
  2. When installing the CUDA toolkit, click the Customize button on the Installation Type panel of the installer. Then be sure that CUDAKext is selected for installation. If we do not do this, CUDA applications will complain "no CUDA capable device".
  3. After installing add the following to .bash_profile.
    export PATH=/usr/local/cuda/bin:$PATH
    export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
  4. After installing the CUDA SDK,
    cd /Developer/CUDA/lib
    ranlib *.lib
    Otherwise, we will get the following linker error when building CUDA applications:
    ld: in ../../lib/libcutil.a, archive has no table of contents
  5. Build CUDA sample applications:
    cd /Developer/CUDA
    The result application binaries will be installed to /Developer/CUDA/bin/darwin/release.
A useful reference for installation and system requirement is a PDF file named CUDA_Getting_Started_2.2_MacOS.pdf.

No comments: