Artificial Intelligence (AI)
Discuss current events in AI and technological innovations with Intel® employees
631 Discussions

Are you ready to harness the power of the Intel® processor’s integrated graphics (iGPU), on your machine?

MaryT_Intel
Employee
0 0 1,809

How often have you wished you had extra processing power to run your inference applications faster on your laptop? Well, you may be surprised you can do it now, without any extra investment! 

If you’ve recently purchased a PC or a laptop with Intel Inside, then you might see this sticker.

So, what is Intel® Iris® Xe brand? Simply put, it’s Intel’s Integrated Graphics Processing Unit (iGPU), included in the same die as your CPU. You can use this added power on your machine to accelerate your AI inferencing workloads. The graphics processing unit comes in two flavors: integrated (built into the CPU) and discrete (stand-alone graphics card), branded as Intel® Iris® Xe MAX.

To unleash the full potential of Intel hardware for AI workloads you can use the OpenVINO™ toolkit, short for Open Visual Inference and Neural Network Optimization toolkit. Available in open source version here: https://github.com/openvinotoolkit/openvino

At Microsoft Build 2021, we displayed how you can access iGPU through Windows Subsystem for Linux (WSL2) and it’s as simple as 1, 2...3.

To start, using iGPU you need four things:

    1.     Windows subsystem for Linux WSL2 installed on your machine

    2.     New iGPU drivers (installed on host machine)

    3.     New OpenCL™ Drivers (installed inside WSL2)

    4.     OpenVINO, which comes in two flavors.

            a.     OpenVINO™ toolkit–which provides native OpenVINO™ APIs– and its runtime for maximum performance, efficiency, tooling customization, and hardware control.

            b.     OpenVINO™ integration with TensorFlow*–for TensorFlow developers who want to accelerate their TensorFlow application using OpenVINO inline optimizations, which requires just two additional lines of code.

Steps to Install WSL2

We tested this setup on following flavors of windows:

  • Windows 10/11 Insider preview
  • Windows Internet of Things Enterprise LTSC 2H21 (Build 19044)

First thing is to get WSL2 installed on your machine, as per windows documentation there are two ways of doing this. We recommend you follow the simplified installation, which uses Windows Insider program. For now, only with the Windows OS builds distributed with Windows Insider program you can run your inference on iGPU.

Windows Insider program:

         o Available only for preview build of Windows 10 with OS build 20262 or higher

         o Detailed steps are mentioned at this link https://insider.windows.com/getting-started

         o To start the WSL2, perform following steps also mentioned here https://docs.microsoft.com/en-us/windows/wsl/install-win10#simplified-installation-for-windows-insiders:

 

  • Open up the command window with administrator privileges
  • wsl --update
  • wsl --shutdown
  • wsl --install --d Ubuntu-20.04 or wsl --install --d Ubuntu-18.04
  • wsl --list --v
  • Check that the output of this command shows version as “2” for the Ubuntu installed

 

Steps to Install iGPU Drivers

Steps to Install OpenCL™ Drivers

Steps to Install Package Manager for Python (pip)

  • sudo apt-get update 
  • sudo apt-get upgrade 
  • sudo apt install python3-pip
  • pip3 install pip --upgrade
  • sudo apt install ocl-icd-opencl-dev

Steps to Install OpenVINO™ Toolkit and Run Sample

1.     pip3 install openvino-dev

2.     cd ~

3.     git clone https://github.com/openvinotoolkit/open_model_zoo.git

4.     cd ~/open_model_zoo/tools/downloader

5.      python3 -mpip install --user -r ./requirements.in

6.     ./downloader.py --name  yolo-v2-ava-0001 --precisions=FP32

7.     cd ~

8.     git clone https://github.com/intel-iot-devkit/sample-videos.git

9.     python3 (instructions to run the demo are also available at https://docs.openvinotoolkit.org/latest/omz_demos_object_detection_demo_python.html)

  • ~/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py -m <path where model downloader downloaded the model>.xml -at yolo -i <location of your video file>/people-detection.mp4 --labels <location of your labelfile>/ coco.names -d GPU -nireq 2 -nthreads 4 --loop

10.    Demo Video

Why You Should Use OpenVINO™ Integration with TensorFlow*

How to Use OpenVINO™ Integration with TensorFlow*

1.     pip3 install -U pip==21.0.1 

2.     pip3 install -U tensorflow==2.5.1

3.     pip3 install openvino-tensorflow

4.     git clone https://github.com/openvinotoolkit/openvino_tensorflow.git

5.     cd ~/openvino_tensorflow

6.     Follow instructions on the link below to run image classification or object detection examples   https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/examples

Conclusion:

We hope that with this blog, we were able to show you just how easy it is to:

1.     Run your applications in Linux VMs using WSL2 on Windows hosts

2.     Tap into the power of iGPU and offload your inferencing workloads to it

3.     Get a significant performance boost by simply using OpenVINO either in native format or through TensorFlow integrations.

Troubleshooting:

  • Windows update removed iGPU drivers.

                o   Windows iGPU drivers are in Beta preview stage at the time of publishing this blog, hence windows system updates might remove them and revert to old drivers. Follow the steps mentioned in “Steps to install iGPU drivers” in the section above.

 

  • Windows iGPU drivers not getting installed.

                o   For some brands of laptops, you must turn off secure boot from BIOS settings and will need windows recovery key from your Microsoft account to start windows again.

                o   Then remove the existing display drivers and restart the machine.

 

  • Might have to do this step twice, as windows might not remove the drivers right away. Once removed, the display will be using default windows display drivers.

 

  • Then install the new iGPU driver. You might have to do this step twice for some machines. 

Notices & Disclaimers

Performance varies by use, configuration, and other factors. Learn more at www.Intel.com/PerformanceIndex 

Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates.  See backup for configuration details.  No product or component can be absolutely secure.

Your costs and results may vary.

Intel technologies may require enabled hardware, software, or service activation.

Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.

© Intel Corporation.  Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries.  Other names and brands may be claimed as the property of others.

About the Author
Mary is the Community Manager for this site. She likes to bike, and do college and career coaching for high school students in her spare time.