Skip to content

Minimal install of OpenVINO 2020.4 in Kubuntu 20.04 LTS for C++ inference on CPU

The official installer of OpenVINO 2020.4 requires Ubuntu 18.04 LTS, but since Kubuntu 20.04 LTS is already out I wanted to use that instead. Here’s what you need to do to get a minimal install for C++ inference on the CPU.

First make sure you have everything up to date:

sudo apt-get update
sudo apt-get upgrade

You’ll need git installed to get the source code. Also, python3 comes already pre-installed with 20.04 but not python, so we’re going to assign any python calls to python3.

sudo apt-get install git python-is-python3

Now get the OpenVINO source code into your home directory (or wherever you prefer). Don’t download the zip file directly from github as there are some 3rd party dependencies that need to get downloaded as well. That’s the –recursive part of the following command. The specific –branch we’re using is the same as the official installer uses, releases/2020/4.

cd ~
git clone --recursive --branch releases/2020/4

Install the dependencies by running the included script:


Before continuing you need to change some of the files you just downloaded. I’m using xdg-open which will invoke your preferred application but you can use whatever you prefer instead like vi, nano, etc.

First open up the gna_helper.cpp file.

xdg-open ~/openvino/inference-engine/src/gna_plugin/gna_helper.cpp

Update the code for these functions as follows:

void profilerRtcStart(intel_gna_profiler_rtc *p) {
    if (nullptr == p) return;
    timespec start;
    clock_gettime(CLOCK_REALTIME, &start);
    p->start.time = start.tv_sec;
    p->start.millitm = start.tv_nsec/1000000;

void profilerRtcStop(intel_gna_profiler_rtc *p) {
    if (nullptr == p) return;
    timespec stop;
    clock_gettime(CLOCK_REALTIME, &stop);
    p->stop.time = stop.tv_sec;
    p->stop.millitm = stop.tv_nsec/1000000;

Now open the execution_engine.cpp file:

xdg-open ~/openvino/inference-engine/thirdparty/ade/sources/ade/source/execution_engine.cpp

In line 141, simply update this:

//return std::move(ret);
return ret;

Now you’re ready to build it. And this will take a long time.

  • ENABLE_MKL_DNN=ON means we want the CPU plugin
  • ENABLE_CLDNN=OFF means we don’t want the GPU plugin
cd ~/openvino
mkdir build
cd build
make -j4

You should now be able to run the compiled applications, for example to get information about your device you can run the following:


It should output detailed information about your device. Check out the Intel Model Zoo for models and samples that you can use.

Posted in Image Processing, Open Source, openvino, Programming.

Tagged with , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.