Skip to content

Instantly share code, notes, and snippets.

@steverichey
Created June 15, 2016 16:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steverichey/f1e3d14e326d0a4e5cf25639868936a9 to your computer and use it in GitHub Desktop.
Save steverichey/f1e3d14e326d0a4e5cf25639868936a9 to your computer and use it in GitHub Desktop.
CUDA ARM Setup (Ubuntu 14.04)
# install CUDA
sudo apt-get update
wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb"
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda -y
export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
# install MPI (optional, for some samples)
sudo apt-get install libcr-dev mpich2 mpich2-doc -y
# install OpenGL (optional, for some samples)
sudo apt-get install libglew-dev
# install CUDA for ARM
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install cuda-cross-armhf -y
# install android NDK
wget "http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip"
unzip android-ndk-r11c-linux-x86_64.zip -d ndk-bundle
export PATH=ndk-bundle/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH
# compile samples for ARM
mkdir cuda_arm_samples
cp -R /usr/local/cuda-7.5/samples/* cuda_arm_samples
chmod -R 777 cuda_arm_samples
cd cuda_arm_samples
make clean
make TARGET_ARCH=armv7l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment