MATLAB: MATLAB Coder: How to setup the environment variables on ARM targets to point to the ARM Compute Library

armarm compute libraryarm cortex-acode generationcoder-tipsdeep learningGPU Codermatlab coderneural network

I see a few deep learning networks supported for code generation using MATLAB Coder:
And I've seen the question here about building the ARM Compute Library:
The next question I have is, how do I set the environment variables on ARM targets to point to the ARM Compute Library?

Best Answer

To avoid build failures on ARM hardware targets, such as the Raspberry Pi and Hikey960, you must set the necessary environment variables non-interactively.
For example, with the ComputeLibrary folder installed under ~, the user home directory, and the ARM Compute libraries stored at ~/ComputeLibrary/lib, you can add this code block to the file ~/.bashrc:
#Set below block, if you use your hardware non-interactively (through ssh from remote host or tty/new terminal onto local machine)
case $- in
*i*) ;;
*)
export ARM_COMPUTELIB=~/ComputeLibrary
export PATH=${PATH}:~/ComputeLibrary
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/ComputeLibrary/lib
return;;
esac
Related Question