MATLAB GPU CODER FOR NVIDIA TEGRA X2

Hello everyone!
I started working with the MATLAB GPU CODER and I have a problem with running a generated project on NVIDIA TEGRA X2.

I haven’t variables:
LD_LIBRARY_PATH - /usr/include/opencv
NVIDIA_CUDNN - /usr/local/cuDNN/lib64/
LINARO_TOOLCHAIN_4_9 or LINARO_TOOLCHAIN_4_8 - /usr/local/gcc-linaro
NVIDIA_CUDA_TX2 - /usr/local/cuda-6.5-armhf/

Matlab error:
Host CUDA Environment : PASSED
Runtime : Passed
cuFFT : Passed
cuSOLVER : Passed
cuBLAS : Passed
Code Generation : PASSED
Compatible GPU : FAILED (No valid GPU devices found on the host system. Generated GPU MEX execution will not be available.)
cuDNN Environment : FAILED (A ‘NVIDIA_CUDNN’ environment variable was not found. Set ‘NVIDIA_CUDNN’ to point to the root directory of a NVIDIA cuDNN installation.)
Jetson TK1 Environment : FAILED (A ‘NVIDIA_CUDA_TK1’ environment variable was not found. This environment variable needs to be set for cross-compilation.)
Jetson TX1 Environment : FAILED (A ‘NVIDIA_CUDA_TX1’ environment variable was not found. This environment variable needs to be set for cross-compilation.)
Jetson TX2 Environment : FAILED (A ‘NVIDIA_CUDA_TX2’ environment variable was not found. This environment variable needs to be set for cross-compilation.)

I installed JetPack 3.0 but I do not have these files, can I have everything installed separately?

I use Ubuntu 16.04.
Running an Embedded Application on the NVIDIA® Jetson TX1 Developer Kit:
https://de.mathworks.com/help/gpucoder/examples/running-an-embedded-application-on-the-nvidia-r-jetson-tx1-developer-kit.html

Thank you!

Is it supported on the TX2? I see nothing that explicitly says the TX2 is supported.

Of course.
But my main problem is that I do not have the necessary variables (in host):
LD_LIBRARY_PATH - /usr/include/opencv
NVIDIA_CUDNN - /usr/local/cuDNN/lib64/
LINARO_TOOLCHAIN_4_9 or LINARO_TOOLCHAIN_4_8 - /usr/local/gcc-linaro
NVIDIA_CUDA_TX2 - /usr/local/cuda-6.5-armhf/
Can I get these directories in host or I do not understand something?

I don’t do much regarding CUDA, etc. But what you’re posting (the missing variables) sounds like you haven’t installed the appropriate toolchains on your Jetson. I’m sure a moderator or someone else could give you a better explanation, but that’s what it looks like to me…

Can you explain your how you installed your Jetson, did you install all the CUDA libraries with Jetpack?

I used this tutorial:
https://www.youtube.com/watch?v=D7lkth34rgM&t=367s

Hi,

Your package path is incorrect:

...
NVIDIA_CUDNN - /usr/local/cuDNN/lib64/
...
NVIDIA_CUDA_TX2 - /usr/local/cuda-6.5-armhf/

For Jetpack3.0:
NVIDIA_CUDNN path should be /usr/lib/aarch64-linux-gnu/
NVIDIA_CUDA_TX2 path should be /usr/local/cuda-8.0/

Additional note: “/usr/local/cuda-6.5-armhf/” is for a TK1 with 32-bit architecture. armhf/ARMv7 is an older CPU, the TX1 and TX2 use aarch64/arm64/ARMv8-a. Any time you see “armhf” be suspicious that it is incorrect for any Jetson other than a TK1.

After creating a fresh install of Ubuntu 16.04 and installing CUDA + cuDNN via the following packages:

cuda-repo-ubuntu1604-9-0-176-local-patch-4_1.0-1_amd64.deb
cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
cuda-repo-ubuntu1604-9-0-local-cublas-performance-update_1.0-1_amd64.deb
cuda-repo-ubuntu1604-9-0-local-cublas-performance-update-2_1.0-1_amd64.deb
cuda-repo-ubuntu1604-9-0-local-cublas-performance-update-3_1.0-1_amd64.deb
libcudnn7_7.2.1.38-1+cuda9.0_amd64.deb
libcudnn7-dev_7.2.1.38-1+cuda9.0_amd64.deb
libcudnn7-doc_7.2.1.38-1+cuda9.0_amd64.deb

I cannot figure out how to set the NVIDIA_CUDNN environmental variable properly. Installing cuDNN with the deb package does not seem to create anything in /usr/local/cuDNN as MATLAB says it should here: https://www.mathworks.com/help/gpucoder/gs/setting-up-the-toolchain.html.

What should I set the NVIDIA_CUDA environmental variable to with this new install procedure?

coder.checkGpuInstall('full')
Host CUDA Environment    : PASSED 
	       Runtime   : PASSED 
	       cuFFT     : PASSED 
	       cuSOLVER  : PASSED 
	       cuBLAS    : PASSED 
Code Generation          : PASSED 
Compatible GPU           : PASSED 
Code Execution           : PASSED 
cuDNN Environment        : FAILED (No cuDNN header could be found in directory :/usr/local/cuDNN. Ensure that the cuDNN headers are installed with the specified cuDNN SDK.)
Jetson TK1 Environment   : FAILED (A 'NVIDIA_CUDA_TK1' environment variable was not found. This environment variable needs to be set for cross-compilation.)
Jetson TX1 Environment   : FAILED (A 'NVIDIA_CUDA_TX1' environment variable was not found. This environment variable needs to be set for cross-compilation.)
Jetson TX2 Environment   : FAILED (A 'NVIDIA_CUDA_TX2' environment variable was not found. This environment variable needs to be set for cross-compilation.)