Matlab GPU coder for Jetson TX2

I cannot run the generated project in Matlab on Jetson TX2. Someone worked with GPU coder?

 Accepted Answer

nam dinh
nam dinh on 3 Apr 2018
Hi Vasyl I just install matlab 2018a on ubuntu 16.04 I check my GPU coder and got the result in this photo below, could you share with me about: - what matlab version? - cuda toolkit version?, and Cuda DNN version? - after inter Matlab, Cuda, cudnn...do you need configuration more( please, share with me?) Thank you so much and hope to receive your answer soon!

5 Comments

You need to install Jetpack https://developer.nvidia.com/embedded/jetpack
Then the first task is configuring a toolchain for the hardware target. A cross-compiled toolchain executes on the host system (in this case, 64-bit Linux), but generates binary code for the specified hardware target. For the NVIDIA Jetson TX2 and TX1 boards, use the Linaro 4.9 Linux-to-AARCH64 toolchain. Download the gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu release tarball from here: https://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64-linux-gnu/ Once downloaded, extract the files. The extracted folder contains the subfolders bin, lib, and so on. Set the environment variable LINARO_TOOLCHAIN_4_9 to point to the root folder of the toolchain. The next task is configuring the target-specific CUDA environment for cross-compilation. This environment is the set of include files and libraries provided by Nvidia for the hardware target. Copy these files directly from the target device. For either of the Nvidia Tegra boards, copy all the files (including subfolders) from /usr/local/cuda on the target hardware to a location on your development computer. Be sure not to overwrite any of the CUDA files on the development computer . From a Linux terminal, you can perform the copy operation by using the scp command. $>scp -r ubuntu@tegra-ubuntu:/usr/local/cuda ~/cuda-tegra-arm Then, set the appropriate environment variable to point to the target CUDA implementation. For Nvidia Tegra X2, set NVIDIA_CUDA_TX2. For Nvidia Tegra X1, set NVIDIA_CUDA_TX1 and you need set NVIDIA_CNN.
Hi Vasyl Thank you so much for your respond! Please help me how to solve the problem that could recognize: Cuda environment like my photo when I check with: coder.CheckGpuInstall('full') when you installed you Matlab, for the first time, do you need to configure any more. Please help me, describe your work for install Cuda toolkit, cudnn, and environment! Again, thank you in advance, and hope to hear from you soon.
You need to install Jetpack, then you can use my instructions above setenv('LINARO_TOOLCHAIN_4_9','/home/thm-1/GPU_Coder/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu');
setenv('NVIDIA_CUDA_TX2','/home/thm-1/GPU_Coder/cuda-tegra-arm');
setenv('NVIDIA_CUDA_TX1','/home/thm-1/GPU_Coder/cuda-tegra-arm');
setenv('NVIDIA_CUDNN','/usr/local/cuda-8.0/');
hi Vasyl! could you let me know your matlab version, ubuntu version, jetpack version,...etc. some detail of your host pc? hope to hear from you soon, thank you so much
Hi Nam! Matlab 2017b, Ubuntu 16.04, JetPack 3.1.

Sign in to comment.

More Answers (1)

Hello Vasyl
Could you describe your problem a bit more?
Thanks Girish

4 Comments

I solved this problem. Thank you!
Can you share your experience.
The first task is configuring a toolchain for the hardware target
setenv('LINARO_TOOLCHAIN_4_9','/home/thm-1/GPU_Coder/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu');
setenv('NVIDIA_CUDA_TX2','/home/thm-1/GPU_Coder/cuda-tegra-arm');
setenv('NVIDIA_CUDA_TX1','/home/thm-1/GPU_Coder/cuda-tegra-arm');
setenv('NVIDIA_CUDNN','/usr/local/cuda-8.0/');
Hi Vasyl, Thank you.

Sign in to comment.

Categories

Find more on Get Started with GPU Coder in Help Center and File Exchange

Products

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!