-
-
Save thanhtam92/9be5d7b794b991cb35b015fb8f8e8519 to your computer and use it in GitHub Desktop.
CUDA ARM Setup (Ubuntu 14.04)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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