OpenVINOをTigerLake搭載マシンで使用する

2021年を迎えて、新型GPUのIris Xe Graphicsが搭載されたIntel第11世代CPU TigerLakeを搭載したマシンがそろってきました
供給の問題だと思いますが、前世代のIceLakeは搭載マシンが少なかったのですが、今回のTigerLakeは、大手メーカーはほとんどが採用マシンを発表している様です

と言うわけで、TigerLakeマシンを入手しましたので、OpenVINOツールキットを導入していきましょう

openvino.jpでは、下記の様にリリースごとに環境構築のチェックをしているのですが、常に最新マシンがあるわけではありませんが、なるべく最新機種に近いものでチェックを行っています

今回は上記の記事をみながら進めていきました

今回使用したマシンは、
Dell Inspirion Corei7 1165G7, 16GBマシンです
標準搭載のSSDは512GBでしたが、1TBの物に載せ替えて、Windows10とのデュアルブートにしておきました

一方のOSはWindows10ですが、もう一方のOSはubuntu18ですとマシンが最新すぎて少々厳しそうでしたので、ubuntu20.04LTSを選択しました

第1の問題

通常通り、OpenVINO Toolkit 2021.2をダウンロードし、インストールを行います
ここまでは同じなのですが、demo_security_barrier_camera.shを実行する際に問題がありました
GPUが使用できません…エラーが発生し、1001と言う表示がされます
どうやらGPUドライバが認識できていない様です

さらに調査していくと、下記の様な情報がえられましたhttps://www.intel.co.jp/content/www/jp/ja/support/articles/000057923/software/development-software.html

こちらの記述をみると、カーネルバージョンが5.7以上でないと動作しないとのことです

第2の問題

Ubuntu20.04でインストールされるカーネルは5.4系です
こちらを5.7以上にアップデートする必要があります
sudo apt-cache search linux-image-5.
でカーネルイメージのバージョンを確認したところ、5.8.0-xxが最新になっている様です
こちらのバージョンでインストールしてみます
sudo apt-get install linux-image-5.8.0-34-generic

インストールしてみると、ネットワークが認識されていない様です
このモデルはWiFi6が搭載されているのですが、リリースされている5.8系のバージョンでは認識されない様です
こちらのWiFiドライバはIntelからも最新版が出ていてインストールしましたが、認識されませんでした

カーネルアップデートではなんともならない様なので、WiFi6関連の情報を調べていたところ、linux-generic-hwe-20.04 をインストールすることで、kernel5.8系でWiFiが認識できるカーネルがインストールできることがわかりました

sudo apt-get install linux-generic-hwe-20.04
uname -r
5.8.0-40-generic

と言うことで、5.8系の最新版がインストールできました

次に必要なドライバーをインストールします

 wget https://github.com/intel/compute-runtime/releases/download/20.43.18277/intel-gmmlib_20.3.2_amd64.deb
 wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.5353/intel-igc-core_1.0.5353_amd64.deb
 wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.5353/intel-igc-opencl_1.0.5353_amd64.deb
 wget https://github.com/intel/compute-runtime/releases/download/20.43.18277/intel-opencl_20.43.18277_amd64.deb
 wget https://github.com/intel/compute-runtime/releases/download/20.43.18277/intel-ocloc_20.43.18277_amd64.deb
 wget https://github.com/intel/compute-runtime/releases/download/20.43.18277/intel-level-zero-gpu_1.0.18277_amd64.deb 

 sudo dpkg -i *.deb 

こちらでGPUを使用できる様になります
demo_security_barrier_camera.sh で試したところ下記の様に動作しました

 Run ./security_barrier_camera_demo -d CPU -d_va CPU -d_lpr CPU -i /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp -m /home/klf/openvino_models/ir/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_lpr /home/klf/openvino_models/ir/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -m_va /home/klf/openvino_models/ir/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -d GPU -no_show
 

 [ INFO ] InferenceEngine:  API version ......... 2.1
 Build ........... 2021.2.0-1877-176bdf51370-releases/2021/2
 [ INFO ] Files were added: 1
 [ INFO ]     /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp
 [ INFO ] Loading device CPU
 [ INFO ]  CPU
 MKLDNNPlugin version ......... 2.1
 Build ........... 2021.2.0-1877-176bdf51370-releases/2021/2
 

 [ INFO ] Loading device GPU
 [ INFO ]  GPU
 clDNNPlugin version ......... 2.1
 Build ........... 2021.2.0-1877-176bdf51370-releases/2021/2
 

 [ INFO ] Loading detection model to the GPU plugin
 [ INFO ] Loading Vehicle Attribs model to the CPU plugin
 [ INFO ] Loading Licence Plate Recognition (LPR) model to the CPU plugin
 [ INFO ] Number of InferRequests: 1 (detection), 3 (classification), 3 (recognition)
 [ INFO ] 4 streams for CPU, 2 streams for GPU
 [ INFO ] Display resolution: 1920x1080
 [ INFO ] Number of allocated frames: 3
 [ INFO ] Resizable input with support of ROI crop and auto resize is disabled
 94.4FPS for (1 / 1) frames
 Detection InferRequests usage: 100.0%
 

 [ INFO ] Execution successful
 

 

 ###################################################
 

 Demo completed successfully. 

動作している様です
これで、GPUの動作を確認できます