How to install cuda toolkit on the TX2?

Hello,

I want to compile cpu program and gpu program,and I downloaded the toolkit in the nvidia ,Ifound the error that the

.deb is not match the system ,so I want to know how to install nvidia toolkit and Nsight Eclipse Edition on the TX2.

Thank you!

You’ll need to use the version of JetPack which matches the installed L4T version. The most recent is JetPack3.2.1 (which installs L4T R28.2.1). JetPack runs on the host, and although it can flash it is also possible to uncheck flash and just install packages to the Jetson or host. JetPack runs on the host for this purpose, and if flashing, requires the micro-B USB cable…if adding packages, it requires the wired ethernet.

Nsight Eclipse runs only on host PC you can’t install it to the Jetson itself.

CUDA downloaded via JetPack will pick the arm64 version if installing to Jetson, or it picks the amd64 (x86_64) version if going to the host PC. There are places to download CUDA separately for the PC, but JetPack is the only official download method for the version going on the Jetson.

If you have not yet flashed it is recommended. Newer releases are higher quality. See:
https://developer.nvidia.com/embedded/linux-tegra

1 Like

hello,linuxdev

OK ,Thank you very much!

hello,linuxdev

What tools can I use to complie the cuda C++ project on the TX2?

Thanks!

Regardless of whether it is host or Jetson your CUDA install location will have a “bin/” subdirectory. Within that is “nvcc”, and this is the compiler. The trick is that perhaps JetPack set this up as part of your default path, or Nsight has this location already set, but on the Jetson you may manually have to add this to your default search path (or specify the full path).

So for example, if you have CUDA-9.0 installed, then you’ll have:
/usr/local/cuda-9.0/bin/
/usr/local/cuda-9.0/bin/nvcc

…and this will be a symbolic link to cuda-9.0 and be the same files/directories:

/usr/local/cuda/
/usr/local/cuda/bin/
/usr/local/cuda/bin/nvcc

On host or Jetson you can see your user’s search path:

echo $PATH

You could add to your existing path via:

export PATH="$PATH":/usr/local/cuda/bin

(and you might need to add something like this to your “~/.bashrc” if you want to make it permanent)

Hello,linuxdev

Thank you for your patient answers!