Code Monkey home page Code Monkey logo

linux-vpu-driver's Introduction

Intel(R) Versatile Processing Unit Driver

Introduction

The Intel(R) Versatile Processing Unit (VPU) is an AI inference accelerator integrated with Intel non-server CPUs starting from 14th generation. VPU enables energy efficient execution of Deep Learning applications like object detection, classification etc.

The repository collects components that are required to work with Intel(R) Versatile Processing Unit in Linux systems.

Components

linux-vpu-driver/
| # OpenVINO+VPUX plugin package and Compiler-in-driver build recipes
├─ compiler/
| # Firmware binary and headers
├─ firmware/
| # Linux kernel user space API headers
├─ linux/include/uapi
| # User-mode driver source code
└─ umd/

User-Mode driver (UMD)

UMD allows user to get information about device and push workload to kernel driver. UMD implements Level Zero API Driver that standardize user interface. Driver implements the Graph Extension as part of Level Zero API that allows to compile IR model and run inference in VPU.

Linux User Space API (UAPI)

Linux kernel driver for VPU hardware comes with user space API header. This header allows the user-mode driver to communicate with VPU and submit inference using ioctl function.

Firmware binary and headers

Firmware is required for VPU hardware to manage its internal hardware components. Firmware co-operates with kernel driver to boot up all VPU hardware components and manages the user workload. Binary has to be installed into directory that is accessible by kernel driver

cp firmware/bin/mtl_vpu_v0.0.bin /lib/firmware/intel/vpu/

Compiler-in-Driver

Compiler source code is placed in VPUX plugin repository. The driver library requires compiler to fully enabled Graph extension functionality. Driver links to compiler-in-driver and user can access it through Graph extension. Without the compiler the driver can only push precompiled models.

VPUX plugin

VPUX plugin repository stores the compiler code together with various tools for VPU device. Thanks to VPUX plugin user can access VPU device using OpenVINO API.

Kernel driver - intel_vpu

The kernel driver can be found in the driver/accel/ivpu tree of Linux Kernel repository.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/accel/ivpu

Build standalone driver

Install required dependencies in Ubuntu

sudo apt update
sudo apt install -y build-essential git git-lfs cmake libudev-dev libboost-all-dev

Commands to build driver

cd linux-vpu-driver
cmake -B build -S .
cmake --build build --parallel $(nproc)

The driver can be found in build/lib/libze_intel_vpu.so. The user can link directly to driver or through the Level Zero loader that is built together with driver and can be found in build/lib/libze_loader.so path.

Build driver together with compiler

The driver has a target in umd/cmake/vpux_compiler.cmake to build Compiler-in-Driver component from VPUX plugin repository.

The compiler required to build OpenVINO runtime and is built as OpenVINO plugin. About the dependencies for building OpenVINO, please, check the OpenVINO build document

Note: CMake version 3.22 or higher is required

To build compiler from driver repository the ENABLE_VPUX_COMPILER flag has to be set

cd linux-vpu-driver
cmake -B build -S . -DENABLE_VPUX_COMPILER=ON
cmake --build build --parallel $(nproc)

The compiler binary can be found in build/lib/libVPUXCompilerL0.so

License

The Intel(R) Versatile Processing Unit Driver is distributed under the MIT License.

You may obtain a copy of the License at: https://opensource.org/licenses/MIT

See also

Level Zero specific

linux-vpu-driver's People

Contributors

jpawla avatar jwludzik avatar vicamo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

linux-vpu-driver's Issues

failed to build without `git lfs`

To mention git lfs as a prerequisite to build:

[ 33%] Performing update step for 'vpux_plugin_source'
[ 34%] Performing patch step for 'vpux_plugin_source'
git: 'lfs' is not a git command. See 'git --help'.

The most similar command is
        log
gmake[2]: *** [compiler/CMakeFiles/vpux_plugin_source.dir/build.make:114: third_party/vpux_plugin/src/vpux_plugin_source-stamp/vpux_plugin_source-patch] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:977: compiler/CMakeFiles/vpux_plugin_source.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

License of mtl_vpu_v0.0.bin

There is a LICENSE.md at the top level directory which is an MIT license. Does it cover firmware/mtl_vpu_v0.0.bin as well which is a binary blob?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.