This guide shows you how to install CUDA on the NVIDIA Jetson TX1. Currently, Nvidia’s Jetpack installer does not work properly. This blog post will show a work-around for getting CUDA to work on the TX1.

Download the following files inside a directory first. Here are the two links for the files that you will need to download beforehand:

Updating your apt-get sources

Navigate to the directory where you downloaded the files and type in:

dpkg -i cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb

How to Install CUDA on NVIDIA Jetson TX1

Next, you want to update the sources by typing in:

apt-get update

How to Install CUDA on NVIDIA Jetson TX1

Now, your apt-get repositories will have all of the CUDA libraries and files you may need for any future modifications.

Installing CUDA dependencies

Next, go to the directory where you downloaded the Jetpack installer and make the file executable by typing in:

chmod +x JetPack-L4T-2.0-linux-x64.run

How to Install CUDA on NVIDIA Jetson TX1

Now, run the file:

./JetPack-L4T-2.0-linux-x64.run

How to Install CUDA on NVIDIA Jetson TX1

The .run file should have unpacked its contents into a new directory called “_installer”

Go into the _installer directory and type in:

./cuda-l4t.sh ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb 7.0 7-0

How to Install CUDA on NVIDIA Jetson TX1

**Note that ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb is the location of the .deb file you downloaded earlier.

Now, you have every CUDA dependency installed. However, there are a few more things you have to do.

NVCC as a global call

NVCC is not linked globally (nvcc -V gives an error), and you need to do a few more things to fix this. First, let’s edit the .bashrc file.

vim .bashrc

The screenshot below shots what should be appended to the .bashrc file after the installation. I also put a copy of the exports below.

“:$PATH” should be after “export PATH=/usr/local/cuda-7.0/bin”

1

2

export PATH=/usr/local/cuda-7.0/bin:$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib:

How to Install CUDA on NVIDIA Jetson TX1

Now, execute the .bashrc file.

source .bashrc

How to Install CUDA on NVIDIA Jetson TX1

Now to make sure that everything is working, type in:

nvcc -V

How to Install CUDA on NVIDIA Jetson TX1

Running Some CUDA Samples

Now, let’s run some CUDA samples and scale the GPU to max frequency.

Scaling GPU Frequency

You can find out your GPU rates by typing in:

cat /sys/kernel/debug/clock/gbus/possible_rates

How to Install CUDA on NVIDIA Jetson TX1

Now, let’s set the GPU frequency to its maximum possible rate for some performance purposes.

echo 998400000 > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state
cat /sys/kernel/debug/clock/gbus/rate

How to Install CUDA on NVIDIA Jetson TX1

You can lower the GPU frequency with the same steps above.

Running the nbody simulation and smoke particles

Navigate to the simulations (5_Simulations) directory containing both the nbody simulation and smoke particles samples:

cd /usr/local/cuda-7.0/samples/5_Simulations/

How to Install CUDA on NVIDIA Jetson TX1

Now, navigate to the nbody directory and run make. Then, type in:

./nbody -benchmark -numbodies=65536

How to Install CUDA on NVIDIA Jetson TX1

The results are approximately two times the performance of the previous generation Jetson, the TK1 @ 157 GFLOPS

How to Install CUDA on NVIDIA Jetson TX1

Navigate to the smokeparticles directory and run make. Then type in:

./smokeParticles

How to Install CUDA on NVIDIA Jetson TX1

相关文章: