Install OpenBLAS on Jetson TK1 From Source

Muhammad Yunus
1 min readAug 10, 2021

In Ubuntu 14.04 used by Jetson TK1 doesn’t have libopenblas-dev package on their repository. So, for this purpose, we will try to build & install OpenBLAS from source.

OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS 2 1.13 BSD version. OpenBLAS is used by several software, tool & high level library related to scientific computing, machine learning and image processing, like GNU Octave, OpenCV, etc.

General Information

  • OS : Ubuntu 14.04
  • Architecture : Armv7 (ARM 32bit)

Download, Build & Install OpenBLAS

  • Clone OpenBLAS repositories,
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS/
  • Build OpenBLAS using target CORTEX15 (Jetson TK1 Processor)
make TARGET=CORTEXA15
  • The full target list is in the file TargetList.txt ,
  • If you want to compile this library with OpenMP parallelism, just add flag USE_OPENMP=1, you should set the OMP_NUM_THREADS environment variable;
export OMP_NUM_THREADS=4
make TARGET=CORTEXA15 USE_OPENMP=1
  • Install library to /usr/local ,
sudo make PREFIX=/usr/local install

Test OpenBLAS

  • Test OpenBLAS installation,
grep OPENBLAS_VERSION /usr/local/include/openblas_config.h
  • The output should look like this,
#define OPENBLAS_VERSION " OpenBLAS 0.3.17.dev "
  • Which means we have successfully installed OpenBLAS version 0.3.17.dev
  • After this library successfully installed, we can try to build other library / software that utilizing OpenBLAS on their work.

--

--

Muhammad Yunus

IoT Engineer, Software Developer & Machine Learning Enthusiast