---
# System prepended metadata

title: Note of testing OpenVINO Tensorflow Integration

---

# Note of testing OpenVINO Tensorflow Integration

### Use ubuntu:18.04 docker to test
docker run -it -v ~/Downloads:/mnt --rm ubuntu:18.04

### in ubuntu 18.04 docker 
cd
apt update
apt-get install -y locales && rm -rf /var/lib/apt/lists/*     && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
export LANG=en_US.utf8
apt update
apt install python3-pip
pip3 install -U pip==21.0.1
pip3 install -U tensorflow==2.4.1
pip3 install openvino-tensorflow
python3 -c "import tensorflow as tf; print('TensorFlow version: ',tf.__version__);\
      import openvino_tensorflow; print(openvino_tensorflow.__version__)"

### [output]
2021-05-06 01:44:33.518291: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-05-06 01:44:33.518308: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
TensorFlow version:  2.4.1
OpenVINO integration with TensorFlow version: b'0.5.0'
nGraph version used for this build: b'0.0.0+b33800a'
TensorFlow version used for this build: v2.4.0-49-g85c8b2a817f
CXX11_ABI flag used for this build: 0
OpenVINO integration with TensorFlow built with Grappler: False

apt install git
git clone https://github.com/openvinotoolkit/openvino_tensorflow.git
cd /root/openvino_tensorflow/
git submodule init
git submodule update --recursive

apt install curl

curl -L "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz" | tar -C /root/openvino_tensorflow/examples/data -xz

python3 examples/classification_sample.py

### [output]
2021-05-06 01:48:49.807293: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-05-06 01:48:49.807311: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Available Backends:
CPU
2021-05-06 01:48:51.051640: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-05-06 01:48:51.052215: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-05-06 01:48:51.052393: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2021-05-06 01:48:51.052418: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-05-06 01:48:51.052452: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] no NVIDIA GPU device is present: /dev/nvidia0 does not exist
2021-05-06 01:48:51.057803: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-05-06 01:48:51.057965: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-05-06 01:48:51.065248: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes)
2021-05-06 01:48:51.072154: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 3699850000 Hz
Inference time in ms: 20.346403
military uniform 0.8343049
mortarboard 0.021869816
academic gown 0.010358169
pickelhaube 0.008008191
bulletproof vest 0.0053508924


