Erwan Gallen
Erwan Gallen

Jan 8, 2020 22 min read

OPAE with Intel FPGA PAC with Arria 10 GX

thumbnail for this post

OPAE is the Open Programmable Acceleration Engine, a software framework for managing and accessing programmable accelerators (FPGAs): https://01.org/opae

The OPAE SDK is open source and available in this git: https://github.com/OPAE/opae-sdk

OPAE can be used to manage Intel’s FPGA like the Intel Programmable Acceleration Card with Intel Arria 10 GX FPGA or the Intel FPGA Programmable Acceleration Card N3000.

We will install Intel drivers and use OPAE to program a bitstream on an Intel FPGA PAC with Arria 10 GX: Intel FPGA PAC with Arria 10 GX design

Summary:

FPGA Hardware specifications

Hardware documentation of the Intel Programmable Acceleration Card (PAC) with Intel Arria 10 GX FPGA:
https://www.intel.com/content/www/us/en/programmable/documentation/hhf1507759304946.html

Open Programmable Acceleration Engine (OPAE) is a set of drivers and user-space libraries to program Intel FPGAs:
https://01.org/opae

OPAE is currently not in RHEL kernel, we will use Intel FPGA modules with DKMS.

Preparing RHEL

Take a RHEL 7.7 system:

[egallen@k1 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.7 (Maipo)

Create your user:

[root@k1 ~]# useradd egallen
[root@k1 ~]# echo "egallen ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/egallen

Register and upgrade:

[egallen@k1 ~]$ sudo subscription-manager register --username rhnuser
[egallen@k1 ~]$ sudo subscription-manager attach --pool=XXXXXXXXXXXXXXXXXX
[egallen@k1 ~]$ sudo yum upgrade -y
[egallen@k1 ~]$ sudo subscription-manager repos --disable=*
[egallen@k1 ~]$ sudo subscription-manager repos --enable=rhel-7-server-rpms

Install the tooling:

[egallen@k1 ~]$ sudo yum install pciutils lshw usbutils -y

Check hardware status

Check the PCI bus to find the PAC:

[egallen@k1 ~]$ lspci -nn |grep accelerators
02:00.0 Processing accelerators [1200]: Intel Corporation Device [8086:09c4]

Find the PCI address:

[egallen@k1 ~]$ sudo lshw  -businfo | grep -i intel | grep -vi ethernet | grep -vi network | grep -vi processor
pci@0000:02:00.0              generic        Intel Corporation

Check the USB management port:

[egallen@k1 ~]$ lsusb | grep -i altera
Bus 001 Device 004: ID 09fb:6810 Altera 

Install Acceleration Stack for Runtime

Download the Acceleration Stack for Runtime from the Intel FPGA Acceleration Hub version 1.2 of The file a10_gx_pac_ias_1_2_pv_rte_installer.tar.gz can be downloaded by clicking on “Acceleration Stack for Runtime”. https://www.intel.com/content/www/us/en/programmable/products/boards_and_kits/dev-kits/altera/acceleration-card-arria-10-gx/getting-started.html

We will follow this documentation: https://docs.openvinotoolkit.org/latest/_docs_install_guides_PAC_Configure_2019RX.html

Install EPEL:

[egallen@k1 ~]$ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[egallen@k1 ~]$ sudo yum upgrade -y

Extract the archive:

[egallen@k1 fpga]$ tar xvzf a10_gx_pac_ias_1_2_pv_rte_installer.tar.gz 
[egallen@k1 fpga]$ cd a10_gx_pac_ias_1_2_pv_rte_installer

We are running RHEL 7.7 with kernel 3.10.0-1062.9.1.el7:

[egallen@k1 a10_gx_pac_ias_1_2_pv_rte_installer]$ uname -a
Linux k1.lan.redhat.com 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64 x86_64 x86_64 GNU/Linux

The public git repository of OPAE is here: https://github.com/OPAE/opae-sdk/

The current version is Intel Acceleration Stack Runtime 1.2 is using OPAE 1.1.2.

Install Intel Acceleration Stack Runtime:

[egallen@k1 a10_gx_pac_ias_1_2_pv_rte_installer]$ sudo ./setup.sh

-------------------------------------------------------------------------------
- Beginning installing Intel Acceleration Stack Runtime Package
-------------------------------------------------------------------------------

Intel Acceleration Stack Runtime Package is only supported on RedHat or CentOS 7.4.* kernel 3.10.* or Ubuntu ,
you're currently on \S using kernel 3.10.0-1062.9.1.el7.x86_64.
Refer to the Intel Acceleration Stack Runtime Package Quick Start Guide,
    https://www.altera.com/documentation/dnv1485190478614.html,
for complete operating system support information.

Do you want to continue to install the software? (Y/n): Y
Do you wish to install OPAE? Note: Installing will require administrative access (sudo) and network access. (Y/n): Y
Enter the path you want to extract the Intel PAC with Intel Arria10 GX FPGA release package [default: /home/egallen/intelrtestack]: /usr/local/intelrtestack

...
-------------------------------------------------------------------------------
- Install Pre-requisite packages
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install gcc gcc-c++ cmake make autoconf automake libxml2 libxml2-devel json-c-devel boost ncurses ncurses-devel ncurses-libs boost-devel libuuid libuuid-devel python2-jsonschema doxygen rsync hwloc-devel libpng12 python2-pip
...
-------------------------------------------------------------------------------
- Copying a10_gx_pac_ias_1_2_pv.tar.gz to /usr/local/intelrtestack
-------------------------------------------------------------------------------
>>> Running cmd:
      cp -pf /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/a10_gx_pac_ias_1_2_pv.tar.gz /usr/local/intelrtestack


-------------------------------------------------------------------------------
- Untar a10_gx_pac_ias_1_2_pv.tar.gz
-------------------------------------------------------------------------------
DCP_LOC=/usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv
>>> Running cmd:
      tar -xzf /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/a10_gx_pac_ias_1_2_pv.tar.gz

>>> Running cmd:
      tar xf /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp*.tar.gz -C /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/


-------------------------------------------------------------------------------
- Copying /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/setup_fim_and_bmc.sh to /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv
-------------------------------------------------------------------------------
>>> Running cmd:
      cp -pf /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/setup_fim_and_bmc.sh /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv


-------------------------------------------------------------------------------
- Copying fpgaflash tool to /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw
-------------------------------------------------------------------------------
>>> Running cmd:
      cp -pf /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/fpgaflash /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw


-------------------------------------------------------------------------------
- Copying afu_platform_info tool to /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw
-------------------------------------------------------------------------------
>>> Running cmd:
      cp -pf /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/afu_platform_info /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw

-------------------------------------------------------------------------------
- Installing OPAE rpm packages for RedHat/CentOS ...
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
- Remove any previous version of the OPAE FPGA libraries
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
- Update kernel source
-------------------------------------------------------------------------------
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:3.10.0-1062.9.1.el7 will be installed

...

-------------------------------------------------------------------------------
- Update kernel headers
-------------------------------------------------------------------------------
Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package kernel-headers-3.10.0-1062.9.1.el7.x86_64 already installed and latest version
Nothing to do

-------------------------------------------------------------------------------
- Install the Altera® FPGA kernel drivers
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install opae-intel-fpga-driver-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-intel-fpga-driver-1.1.2-1.x86_64.rpm: opae-intel-fpga-driver-1.1.2-1.x86_64
Marking opae-intel-fpga-driver-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-intel-fpga-driver.x86_64 0:1.1.2-1 will be installed
--> Processing Dependency: dkms >= 2.2.0.2 for package: opae-intel-fpga-driver-1.1.2-1.x86_64
--> Running transaction check
---> Package dkms.noarch 0:2.7.1-1.el7 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.7.1-1.el7.noarch
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.176-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                                   Arch                      Version                           Repository                                                 Size
=======================================================================================================================================================================
Installing:
 opae-intel-fpga-driver                    x86_64                    1.1.2-1                           /opae-intel-fpga-driver-1.1.2-1.x86_64                    435 k
Installing for dependencies:
 dkms                                      noarch                    2.7.1-1.el7                       epel                                                       75 k
 elfutils-libelf-devel                     x86_64                    0.176-2.el7                       rhel-7-server-rpms                                         39 k

Transaction Summary
=======================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total size: 549 k
Total download size: 115 k
Installed size: 685 k
Downloading packages:
(1/2): elfutils-libelf-devel-0.176-2.el7.x86_64.rpm                                                                                             |  39 kB  00:00:00     
(2/2): dkms-2.7.1-1.el7.noarch.rpm                                                                                                              |  75 kB  00:00:00     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                  116 kB/s | 115 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                                                            1/3 
  Installing : dkms-2.7.1-1.el7.noarch                                                                                                                             2/3 
  Installing : opae-intel-fpga-driver-1.1.2-1.x86_64                                                                                                               3/3 
  Add module source to dkms

Creating symlink /var/lib/dkms/intel-fpga/1.1.2-1/source ->
                 /usr/src/intel-fpga-1.1.2-1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j24 KERNELRELEASE=3.10.0-1062.9.1.el7.x86_64 KERNELDIR=/lib/modules/3.10.0-1062.9.1.el7.x86_64/build...
cleaning build area...
DKMS: build completed.                                                                                                                                                                                                                                                                 [134/1820]

spi-nor-mod.ko.xz:
Running module version sanity check.

Running the pre_install script:
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

altera-asmip2.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

avmmi-bmc.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

fpga-mgr-mod.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

intel-fpga-pci.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

intel-fpga-fme.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

intel-fpga-afu.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

intel-fpga-pac-hssi.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/

intel-fpga-pac-iopll.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.10.0-1062.9.1.el7.x86_64/extra/
Adding any weak-modules
/sbin/dracut: line 682: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory
/sbin/dracut: line 682: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory
/sbin/dracut: line 682: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory
/sbin/dracut: line 682: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory

Running the post_install script:

depmod....

DKMS: install completed.
  Verifying  : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                                                            1/3 
  Verifying  : dkms-2.7.1-1.el7.noarch                                                                                                                             2/3 
  Verifying  : opae-intel-fpga-driver-1.1.2-1.x86_64                                                                                                               3/3 

Installed:
  opae-intel-fpga-driver.x86_64 0:1.1.2-1                                                                                                                              

Dependency Installed:
  dkms.noarch 0:2.7.1-1.el7                                                 elfutils-libelf-devel.x86_64 0:0.176-2.el7                                                

Complete!
DKMS: build completed.

-------------------------------------------------------------------------------
- Check the Linux kernel installation
-------------------------------------------------------------------------------
>>> Running cmd:
      lsmod | grep fpga

intel_fpga_pac_iopll    13392  0 
intel_fpga_pac_hssi    18347  0 
intel_fpga_fme         54120  0 
intel_fpga_afu         32069  0 
intel_fpga_pci         26684  2 intel_fpga_afu,intel_fpga_fme
fpga_mgr_mod           14693  1 intel_fpga_fme


-------------------------------------------------------------------------------
- installing OPAE software ...
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
- 1. Install shared libraries at location /usr/lib, required for user applications to link against
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install opae-libs-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-libs-1.1.2-1.x86_64.rpm: opae-libs-1.1.2-1.x86_64
Marking opae-libs-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-libs.x86_64 0:1.1.2-1 will be installed
--> Processing Dependency: uuid for package: opae-libs-1.1.2-1.x86_64
--> Running transaction check
---> Package uuid.x86_64 0:1.6.2-26.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                             Arch                             Version                                Repository                                           Size
=======================================================================================================================================================================
Installing:
 opae-libs                           x86_64                           1.1.2-1                                /opae-libs-1.1.2-1.x86_64                           579 k
Installing for dependencies:
 uuid                                x86_64                           1.6.2-26.el7                           rhel-7-server-rpms                                   55 k

Transaction Summary
=======================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total size: 634 k
Total download size: 55 k
Installed size: 695 k
Downloading packages:
uuid-1.6.2-26.el7.x86_64.rpm                                                                                                                    |  55 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : uuid-1.6.2-26.el7.x86_64                                                                                                                            1/2 
  Installing : opae-libs-1.1.2-1.x86_64                                                                                                                            2/2 
  Verifying  : opae-libs-1.1.2-1.x86_64                                                                                                                            1/2 
  Verifying  : uuid-1.6.2-26.el7.x86_64                                                                                                                            2/2 
^[
Installed:
  opae-libs.x86_64 0:1.1.2-1                                                                                                                                           

Dependency Installed:
  uuid.x86_64 0:1.6.2-26.el7                                                                                                                                           

Complete!

-------------------------------------------------------------------------------
- 2. Install the OPAE header at location /usr/include
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install opae-devel-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-devel-1.1.2-1.x86_64.rpm: opae-devel-1.1.2-1.x86_64
Marking opae-devel-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-devel.x86_64 0:1.1.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                              Arch                             Version                              Repository                                            Size
=======================================================================================================================================================================
Installing:
 opae-devel                           x86_64                           1.1.2-1                              /opae-devel-1.1.2-1.x86_64                            20 M

Transaction Summary
=======================================================================================================================================================================
Install  1 Package

Total size: 20 M
Installed size: 20 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : opae-devel-1.1.2-1.x86_64                                                                                                                                                                                                                                                     1/1 
  Verifying  : opae-devel-1.1.2-1.x86_64                                                                                                                                                                                                                                                     1/1 

Installed:
  opae-devel.x86_64 0:1.1.2-1                                                                                                                                                                                                                                                                    

Complete!

-------------------------------------------------------------------------------
- 3. Install the OPAE provided tools at location /usr/bin (For example: fpgaconf and fpgainfo)
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install opae-tools-extra-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-tools-extra-1.1.2-1.x86_64.rpm: opae-tools-extra-1.1.2-1.x86_64
Marking opae-tools-extra-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-tools-extra.x86_64 0:1.1.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================================================================================================================
 Package                                                                Arch                                                         Version                                                        Repository                                                                              Size
=================================================================================================================================================================================================================================================================================================
Installing:
 opae-tools-extra                                                       x86_64                                                       1.1.2-1                                                        /opae-tools-extra-1.1.2-1.x86_64                                                       3.0 M

Transaction Summary
=================================================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 3.0 M
Installed size: 3.0 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : opae-tools-extra-1.1.2-1.x86_64                                                                                                                                                                                                                                               1/1 
  Verifying  : opae-tools-extra-1.1.2-1.x86_64                                                                                                                                                                                                                                               1/1 
Installed:
  opae-tools-extra.x86_64 0:1.1.2-1                                                                                                                                                                                                                                                              

Complete!

>>> Running cmd:
      sudo yum -y install opae-tools-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-tools-1.1.2-1.x86_64.rpm: opae-tools-1.1.2-1.x86_64
Marking opae-tools-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-tools.x86_64 0:1.1.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================================================================================================================
 Package                                                             Arch                                                            Version                                                           Repository                                                                           Size
=================================================================================================================================================================================================================================================================================================
Installing:
 opae-tools                                                          x86_64                                                          1.1.2-1                                                           /opae-tools-1.1.2-1.x86_64                                                          199 k

Transaction Summary
=================================================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 199 k
Installed size: 199 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : opae-tools-1.1.2-1.x86_64                                                                                                                                                                                                                                                     1/1 
  Verifying  : opae-tools-1.1.2-1.x86_64                                                                                                                                                                                                                                                     1/1 

Installed:
  opae-tools.x86_64 0:1.1.2-1                                                                                                                                                                                                                                                                    

Complete!

-------------------------------------------------------------------------------
- 4. Install the ASE related shared libraries at location /usr/lib
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo yum -y install opae-ase-1.1.2-1.x86_64.rpm

Failed to set locale, defaulting to C
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining opae-ase-1.1.2-1.x86_64.rpm: opae-ase-1.1.2-1.x86_64
Marking opae-ase-1.1.2-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package opae-ase.x86_64 0:1.1.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================================================================================================================
 Package                                                            Arch                                                             Version                                                            Repository                                                                          Size
=================================================================================================================================================================================================================================================================================================
Installing:
 opae-ase                                                           x86_64                                                           1.1.2-1                                                            /opae-ase-1.1.2-1.x86_64                                                            19 M

Transaction Summary
=================================================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 19 M
Installed size: 19 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : opae-ase-1.1.2-1.x86_64                                                                                                                                                                                                                                                       1/1 
  Verifying  : opae-ase-1.1.2-1.x86_64                                                                                                                                                                                                                                                       1/1 

Installed:
  opae-ase.x86_64 0:1.1.2-1                                                                                                                                                                                                                                                                      

Complete!

-------------------------------------------------------------------------------
- 5. sudo ldconfig
-------------------------------------------------------------------------------
>>> Running cmd:
      sudo ldconfig


-------------------------------------------------------------------------------
- Installing the Intel FPGA RTE for OpenCL
-------------------------------------------------------------------------------
>>> Running cmd:
      /data/inetsoft/fpga/a10_gx_pac_ias_1_2_pv_rte_installer/components/aocl-pro-rte-17.1.1.273-linux.run --mode unattended --installdir "/usr/local/intelrtestack/opencl_rte" --accept_eula 1 --skip_registration 1


-------------------------------------------------------------------------------
- Creating /usr/local/intelrtestack/init_env.sh
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
- Finished installing Intel Acceleration Stack Runtime Package
-------------------------------------------------------------------------------

*** Note: You need to source /usr/local/intelrtestack/init_env.sh to set up your environment. ***

Test fpgainfo

Setup locale:

[egallen@k1 ~]$ sudo tee /etc/environment  << EOF 
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
EOF

Check FPGA modules installed:

[egallen@k1 ~]$ sudo lsmod  | grep fpga
intel_fpga_pac_iopll    13392  0 
intel_fpga_pac_hssi    18347  0 
intel_fpga_fme         54120  0 
intel_fpga_afu         32069  0 
intel_fpga_pci         26684  2 intel_fpga_afu,intel_fpga_fme
fpga_mgr_mod           14693  1 intel_fpga_fme

Check the version of the FPGA Interface Manager firmware on the board:

[egallen@k1 ~]$ sudo fpgainfo fme
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ******//
Object Id                     : 0xF000000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6

We have the good “Pr Interface Id” 69528db6-eb31-577a-8c36-68f9faa081f6 expected for Intel FPGA Acceleration Hub version 1.2.

Run self-test

Run the built in self-test to verify operation of the Acceleration Stack and Intel PAC in a non-virtualized environment.

We have already the good hugepages setup:

[egallen@k1 ~]$ cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
20

Switch to root account and source environment file:

[egallen@k1 ~]$ source /usr/local/intelrtestack/init_env.sh 
export INTELFPGAOCLSDKROOT=/usr/local/intelrtestack/opencl_rte/aclrte-linux64
export OPAE_PLATFORM_ROOT=/usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv
export AOCL_BOARD_PACKAGE_ROOT=/usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp
source /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/libexec/setup_permissions.sh
Adding $OPAE_PLATFORM_ROOT/bin to PATH
sudo cp /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw/fpgaflash /usr/bin/
sudo cp /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/sw/afu_platform_info /usr/bin/
find /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/hw/samples/ -type d -name *S10* -exec rm -r {} +
source /usr/local/intelrtestack/opencl_rte/aclrte-linux64/init_opencl.sh

Run the built in self-test to verify operation of the Acceleration Stack (non-virtualized environment):

[egallen@k1 ~]$ sudo fpgabist $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_3/bin/nlb_mode_3.gbs
==========================================================

Beginning FPGA Built-In Self-Test

==========================================================
Device: bus = 2, device = , func = 
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ******//
Object Id                     : 0xF000000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** PORT ******//
Object Id                     : 0xEF00000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
Accelerator Id                : f7df405c-bd7a-cf72-22f1-44b0b93acd18
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** TEMP ******//
Object Id                     : 0xF000000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
(11) FPGA Core TEMP           : 52.00 °C
(12) Board TEMP               : 37.00 °C
(14) QSFP TEMP                : No reading (reading state unavailable)
(15) Core Supply Temp         : 63.50 °C
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** POWER ******//
Object Id                     : 0xF000000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
( 0) Total Input Power        : 19.50 Watts
( 1) PCIe 12V Current         : 1.67 Amps
( 2) PCIe 12V Voltage         : 11.60 Volts
( 3) 1.2V Voltage             : 1.22 Volts
( 4) 1.2V Current             : 2.66 Amps
( 5) 1.8V Voltage             : 1.83 Volts
( 6) 1.8V Current             : 2.73 Amps
( 7) 3.3V Mgmt Voltage        : 3.33 Volts
( 8) 3.3V Current             : 0.54 Amps
( 9) FPGA Core Voltage        : 0.90 Volts
(10) FPGA Core Current        : 5.47 Amps
(13) QSFP P3V3                : No reading (reading state unavailable)
(16) Core Supply Temp Input   : 0.51 Volts
(17) VCCR Voltage             : 1.04 Volts
(18) VCCT Voltage             : 1.04 Volts
(19) VCCR Current             : 1.08 Amps
(20) VCCT Current             : 0.33 Amps
(21) VPP Voltage              : 2.54 Volts
(22) VTT Voltage              : 0.59 Volts
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** PORT ERRORS ******//
Object Id                     : 0xEF00000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x30201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
Accelerator Id                : f7df405c-bd7a-cf72-22f1-44b0b93acd18
First Error                   : 0x0
First Malformed Req           : 0x0
Errors                        : 0x0
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ERRORS ******//
Object Id                     : 0xF000000
PCIe s:b:d:f                  : 0000:02:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x123000200000185
Bitstream Version             : 0x7FFE00030201
Pr Interface Id               : 69528db6-eb31-577a-8c36-68f9faa081f6
First Error                   : 0x0
Next Error                    : 0x0
Errors                        : 0x0
PCIe1 Errors                  : 0x0
Nonfatal Errors               : 0x0
Inject Error                  : 0x0
Catfatal Errors               : 0x0
PCIe0 Errors                  : 0x0
Running mode: nlb_3
Attempting Partial Reconfiguration:
Reading bitstream
Looking for slot
Found slot
Programming bitstream
Writing bitstream
Done
Running fpgadiag read test...


Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss   Eviction 'Clocks(@200 MHz)'   Rd_Bandwidth   Wr_Bandwidth
      1024  534531676           0            0            0             0             0          0       1000015090     6.842 GB/s     0.000 GB/s

VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count 
           0            0            0            0            0            0 

Running fpgadiag write test...


Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss   Eviction 'Clocks(@200 MHz)'   Rd_Bandwidth   Wr_Bandwidth
      1024          0   544061740            0            0             0             0          0       1000014940     0.000 GB/s     6.964 GB/s

VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count 
           0            0            0            0            0            0 

Running fpgadiag trput test...


Cachelines Read_Count Write_Count Cache_Rd_Hit Cache_Wr_Hit Cache_Rd_Miss Cache_Wr_Miss   Eviction 'Clocks(@200 MHz)'   Rd_Bandwidth   Wr_Bandwidth
      1024  488027324   489614264            0            0             0             0          0       1000011703     6.247 GB/s     6.267 GB/s

VH0_Rd_Count VH0_Wr_Count VH1_Rd_Count VH1_Wr_Count VL0_Rd_Count VL0_Wr_Count 
           0            0            0            0            0            0 

Finished Executing NLB (FPGA DIAG)Tests


Built-in Self-Test Completed.

Test OpenCL

Install lsb-core:

[egallen@k1 ~]$ sudo yum install redhat-lsb-core -y

Prepare init OpenVino script:

[egallen@k1 ~]$ cat << EOF > ~/init_openvino.sh 
source /usr/local/intelrtestack/init_env.sh
export CL_CONTEXT_COMPILER_MODE_ALTERA=3
export CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
export INTELFPGAOCLSDKROOT="/usr/local/intelrtestack/opencl_rte/aclrte-linux64"
export ALTERAOCLSDKROOT="$INTELFPGAOCLSDKROOT"
export AOCL_BOARD_PACKAGE_ROOT="$OPAE_PLATFORM_ROOT/opencl/opencl_bsp"
$AOCL_BOARD_PACKAGE_ROOT/linux64/libexec/setup_permissions.sh
source $INTELFPGAOCLSDKROOT/init_opencl.sh
EOF

Source OpenVino script:

[egallen@k1 ~]$ source ~/init_openvino.sh

Some of the settings need a reboot to take effect. Reboot the machine and source the OpenVino script again:

[egallen@k1 ~]$ sudo init 6
[egallen@laptop ~]$ ssh k1
[egallen@k1 ~]$ source ~/init_openvino.sh

Install the OpenCL driver:

[egallen@k1 ~]$ sudo -E /usr/local/intelrtestack/opencl_rte/aclrte-linux64/bin/aocl install
Do you want to install /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp? [y/n] y
aocl install: Running install from /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/libexec

Program the Intel PAC board with a pre-compiled .aocx file (OpenCL based FPGA bitstream):

[egallen@k1 ~]$ cd $OPAE_PLATFORM_ROOT/opencl

[egallen@k1 opencl]$ pwd
/usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl

[egallen@k1 opencl]$ ls
exm_opencl_hello_world_x64_linux.tgz  exm_opencl_vector_add_x64_linux.tgz  hello_world.aocx  opencl_bsp  opencl_bsp.tar.gz  vector_add.aocx

[egallen@k1 opencl]$ aocl program acl0 hello_world.aocx
aocl program: Running program from /usr/local/intelrtestack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/libexec
Program succeed.

Build the Hello World application:

[egallen@k1 opencl]$ sudo tar xf exm_opencl_hello_world_x64_linux.tgz
[egallen@k1 opencl]$ sudo chmod -R a+w hello_world
[egallen@k1 opencl]$ cd hello_world
[egallen@k1 hello_world]$ make
[egallen@k1 hello_world]$ cp ../hello_world.aocx ./bin

Run the Hello World application:

[egallen@k1 hello_world]$ ./bin/host
Querying platform for info:
==========================
CL_PLATFORM_NAME                         = Intel(R) FPGA SDK for OpenCL(TM)
CL_PLATFORM_VENDOR                       = Intel(R) Corporation
CL_PLATFORM_VERSION                      = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 17.1.1

Querying device for info:
========================
CL_DEVICE_NAME                           = pac_a10 : PAC Arria 10 Platform (pac_a10_ef00000)
CL_DEVICE_VENDOR                         = Intel Corp
CL_DEVICE_VENDOR_ID                      = 4466
CL_DEVICE_VERSION                        = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 17.1.1
CL_DRIVER_VERSION                        = 17.1
CL_DEVICE_ADDRESS_BITS                   = 64
CL_DEVICE_AVAILABLE                      = true
CL_DEVICE_ENDIAN_LITTLE                  = true
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE          = 32768
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE      = 0
CL_DEVICE_GLOBAL_MEM_SIZE                = 8589934592
CL_DEVICE_IMAGE_SUPPORT                  = true
CL_DEVICE_LOCAL_MEM_SIZE                 = 16384
CL_DEVICE_MAX_CLOCK_FREQUENCY            = 1000
CL_DEVICE_MAX_COMPUTE_UNITS              = 1
CL_DEVICE_MAX_CONSTANT_ARGS              = 8
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE       = 2147483648
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS       = 3
CL_DEVICE_MEM_BASE_ADDR_ALIGN            = 8192
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE       = 1024
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR    = 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT   = 2
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT     = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG    = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT   = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE  = 0
Command queue out of order?              = false
Command queue profiling enabled?         = true
Using AOCX: hello_world.aocx

Kernel initialization is complete.
Launching the kernel...

Thread #2: Hello from Altera's OpenCL Compiler!

Kernel execution is complete.

Install OpenVino

We will follow this documentation: https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux_fpga.html

Download l_openvino_toolkit_fpga_p_2019.3.376.tgz

Install OpenVino dependencies:

[egallen@k1 fpga]$ tar xvzf l_openvino_toolkit_fpga_p_2019.3.376.tgz

[egallen@k1 fpga]$ cd l_openvino_toolkit_fpga_p_2019.3.376

[egallen@k1 l_openvino_toolkit_fpga_p_2019.3.376]$ sudo -E ./install_openvino_dependencies.sh

This script installs the following OpenVINO 3rd-party dependencies:
  1. GTK+ and GStreamer libraries used by OpenCV
  2. libusb library required for Myriad plugin for Inference Engine
  3. Python 3.6 for Model Optimizer
  4. gcc 4.8.5 and other build dependencies for OpenVINO samples
...

Install OpenVino toolkit:

[egallen@k1 l_openvino_toolkit_fpga_p_2019.3.376]$ sudo ./install.sh
Welcome
--------------------------------------------------------------------------------
Welcome to the Intel® Distribution of OpenVINO™ toolkit 2019 R3.1 for Linux* with FPGA Support
--------------------------------------------------------------------------------
The Intel installation wizard will install the Intel® Distribution of OpenVINO™
toolkit 2019 R3.1 for Linux* with FPGA Support to your system.

The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and
solutions that emulate human vision. Based on Convolutional Neural Networks
(CNN), the toolkit extends computer vision (CV) workloads across Intel®
hardware, maximizing performance. The Intel Distribution of OpenVINO toolkit
includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).

Before installation please check system requirements:
https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_installing_openv
ino_linux.html#system_requirements
and run following script to install external software dependencies:

sudo -E ./install_openvino_dependencies.sh

Please note that after the installation is complete, additional configuration
steps are still required.

For the complete installation procedure, refer to the Installation guide:
https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_installing_openv
ino_linux.html.

You will complete the following steps:
   1.  Welcome
   2.  End User License Agreement
   3.  Prerequisites
   4.  Configuration
   5.  Installation
   6.  First Part of Installation is Complete

--------------------------------------------------------------------------------
Press "Enter" key to continue or "q" to quit: 

...

Prerequisites > Missing Prerequisite(s)
--------------------------------------------------------------------------------
There are one or more unresolved issues based on your system configuration and
component selection.

You can resolve all the issues without exiting the installer and re-check, or
you can exit, resolve the issues, and then run the installation again.

--------------------------------------------------------------------------------
Missing optional prerequisites
-- Unsupported OS
-- Intel® GPU is not detected on this machine
-- Intel® Graphics Compute Runtime for OpenCL™ Driver is missing but you will
be prompted to install later
--------------------------------------------------------------------------------
   1. Skip prerequisites [ default ]
   2. Show the detailed info about issue(s)
   3. Re-check the prerequisites

   h. Help
   b. Back
   q. Quit installation

--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [ 1 ]: 1

Configuration > Pre-install Summary
--------------------------------------------------------------------------------
Install location:
    /opt/intel

Component(s) selected:
    Inference Engine                                                       222MB
        Inference Engine Development Kit                                        
        Inference Engine Runtime for Intel® CPU                                 
        Inference Engine Runtime for Intel® Processor Graphics                  
        Inference Engine Runtime for Intel® Movidius™ VPU                      
        Inference Engine Runtime for Intel® Gaussian Neural Accelerator         
        Inference Engine Runtime for Intel® FPGA                                
        Inference Engine Runtime for Intel® Vision Accelerator Design with      
Intel® Movidius™ VPUs

    Model Optimizer                                                          4MB
        Model Optimizer Tool                                                    

    Deep Learning Workbench                                                133MB
        Deep Learning Workbench                                                 

    OpenCV*                                                                118MB
        OpenCV* Libraries                                                       

    OpenVX*                                                                222MB
        OpenVX* Runtime                                                         

    Open Model Zoo                                                          64MB
        Open Model Zoo                                                          

    Intel(R) Media SDK                                                     133MB
        Intel(R) Media SDK                                                      

    Intel(R) FPGA for OpenCL(TM) software technology                        11MB
        Intel(R) FPGA for OpenCL(TM) software technology                        

    Pre-compiled FPGA bitstream samples                                    5.6GB
        Intel(R) Programmable Acceleration Card with Intel(R) Arria(R) 10 GX    
FPGA
        Intel(R) Vision Accelerator Design with Intel(R) FPGA SG1               
        Intel(R) Vision Accelerator Design with Intel(R) FPGA SG2               

   Install space required:  6.5GB

--------------------------------------------------------------------------------

   1. Accept configuration and begin installation [ default ]
   2. Customize installation

   h. Help
   b. Back
   q. Quit installation

--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [ 1 ]: 1

Installation
--------------------------------------------------------------------------------
Each component will be installed individually. If you cancel the installation,
some components might remain on your system. This installation may take several 
minutes, depending on your system and the options you selected.
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® Vision Accelerator Design with
Intel® Movidius™ VPUs component... done
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® FPGA component... done
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® Gaussian Neural Accelerator
component... done
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® Movidius™ VPU component... done
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® Processor Graphics component... done
--------------------------------------------------------------------------------
Installing Inference Engine Runtime for Intel® CPU component... done
--------------------------------------------------------------------------------
Installing Inference Engine Development Kit component... done
--------------------------------------------------------------------------------
Installing Model Optimizer Tool component... done
--------------------------------------------------------------------------------
Installing OpenCV* Libraries component... done
--------------------------------------------------------------------------------
Installing Deep Learning Workbench component... done
--------------------------------------------------------------------------------
Installing OpenVX* Runtime component... done
--------------------------------------------------------------------------------
Installing Open Model Zoo component... done
--------------------------------------------------------------------------------
Installing Intel(R) Media SDK component...
--------------------------------------------------------------------------------
Installing Intel(R) FPGA for OpenCL(TM) software technology component... done
--------------------------------------------------------------------------------
Installing Intel(R) Vision Accelerator Design with Intel(R) FPGA SG2
component... done
--------------------------------------------------------------------------------
Installing Intel(R) Vision Accelerator Design with Intel(R) FPGA SG1
component... done
--------------------------------------------------------------------------------
Installing Intel(R) Programmable Acceleration Card with Intel(R) Arria(R) 10 GX 
FPGA component... done
--------------------------------------------------------------------------------
Finalizing product configuration...
--------------------------------------------------------------------------------
First Part of Installation is Complete
--------------------------------------------------------------------------------


First Part of Installation is Complete
--------------------------------------------------------------------------------
The first part of Intel® Distribution of OpenVINO™ toolkit 2019 R3.1 for Linux*
with FPGA Support has been successfully installed in 
/opt/intel/openvino_2019.3.376.

ADDITIONAL STEPS STILL REQUIRED: 

Open the Installation guide at:
 
https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_installing_openv
ino_linux.html 
and follow the guide instructions to complete the remaining tasks listed below:

 • Install software dependencies 
 • Configure Model Optimizer 
 • Run support files scripts 
 • Run validation scripts 
 • Install external accelerator hardware 
 • Run the Verification Scripts to Verify Installation and Compile Samples

--------------------------------------------------------------------------------
Press "Enter" key to quit:   

Model Optimizer configuration, enable the code for RHEL:

[egallen@k1 l_openvino_toolkit_fpga_p_2019.3.376]$ cd /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites
[egallen@k1 install_prerequisites]$ sudo sed -i 's/\/etc\/centos-release/\/etc\/redhat-release/g' /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites.sh

Install prerequisites:

[egallen@k1 install_prerequisites]$ sudo ./install_prerequisites.sh
Collecting tensorflow<2.0.0,>=1.2.0 (from -r /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/de/f0/96fb2e0412ae9692dbf400e5b04432885f677ad6241c088ccc5fe7724d69/tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (109.2MB)
    100% |████████████████████████████████| 109.2MB 10kB/s 
Collecting mxnet<=1.3.1,>=1.0.0 (from -r /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/f0/2e/b26eb7273aed1945f59993b3b306442eb41684f931b5380821c39cf50a31/mxnet-1.3.1-py2.py3-none-manylinux1_x86_64.whl (27.1MB)
    100% |████████████████████████████████| 27.1MB 40kB/s 
Collecting networkx<2.4,>=1.11 (from -r /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/85/08/f20aef11d4c343b557e5de6b9548761811eb16e438cee3d32b1c66c8566b/networkx-2.3.zip (1.7MB)
    100% |████████████████████████████████| 1.8MB 672kB/s 
Collecting numpy>=1.12.0 (from -r /opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl (20.1MB)
...

Run the squeezenet verification scripts

The Squeeznet script will run by default on this car picture: Intel car default picture

FPGA car classification

Prepare the script to run on RHEL:

[egallen@k1 install_prerequisites]$ cd /opt/intel/openvino/deployment_tools/demo
[egallen@k1 install_prerequisites]$ sudo sed -i 's/\/etc\/centos-release/\/etc\/redhat-release/g' /opt/intel/openvino/deployment_tools/demo/demo_squeezenet_download_convert_run.sh

Find the type of car with the CPU:

[egallen@k1 demo]$ ./demo_squeezenet_download_convert_run.sh
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized
...
Run the Image Classification verification script:
...
###################################################

Run Inference Engine classification sample

Run ./classification_sample_async -d CPU -i /opt/intel/openvino/deployment_tools/demo/car.png -m /home/egallen/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml

[ INFO ] InferenceEngine: 
        API version ............ 2.1
        Build .................. custom_releases/2019/R3_ac8584cb714a697a12f1f30b7a3b78a5b9ac5e05
        Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/openvino/deployment_tools/demo/car.png
[ INFO ] Creating Inference Engine
        CPU
        MKLDNNPlugin version ......... 2.1
        Build ........... 32974

[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Loading model to the device
[ INFO ] Create infer request

[ INFO ] Start inference (10 asynchronous executions)
[ INFO ] Completed 1 async request execution
[ INFO ] Completed 2 async request execution
[ INFO ] Completed 3 async request execution
[ INFO ] Completed 4 async request execution
[ INFO ] Completed 5 async request execution
[ INFO ] Completed 6 async request execution
[ INFO ] Completed 7 async request execution
[ INFO ] Completed 8 async request execution
[ INFO ] Completed 9 async request execution
[ INFO ] Completed 10 async request execution
[ INFO ] Processing output blobs

Top 10 results:

Image /opt/intel/openvino/deployment_tools/demo/car.png

classid probability label
------- ----------- -----
817     0.6853041   sports car, sport car
479     0.1835186   car wheel
511     0.0917199   convertible
436     0.0200693   beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
751     0.0069604   racer, race car, racing car
656     0.0044177   minivan
717     0.0024739   pickup, pickup truck
581     0.0017788   grille, radiator grille
468     0.0013083   cab, hack, taxi, taxicab
661     0.0007443   Model T

[ INFO ] Execution successful

[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool


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

Demo completed successfully.

Success we can identify a sports car in this picture.