When Xilinx launched Kria, they also provided a method for quickly deploying apps. This project tutorial takes a deep dive into how to create a custom Kria app.
On April 20, 2021, Xilinx announced Kria, their newest product portfolio of system on modules (SOMs). These adaptive production ready SOMs, are designed to enable users to accelerate their innovation at the edge.
At that time, I wrote an introductory tutorial:
which covered one of the Kria apps that were available at launch:
Since then, several other Kria apps have been made available for the KV260 Vision AI Starter Kit, from Xilinx and third party providers:
This project will describe how to deploy one of the VVAS (Vitis Video Analytics SDK) examples (smart_model_select) to the KV260 Vision AI Starter Kit, as a Kria app.
Overview of the Vitis framework
Before going further, it is important to understand the various tools and frameworks available from Xilinx.
Vitis is a complete development environment, which allows you to quickly create complex custom applications.
- hardware platforms, which span cloud to edge targets.
- the Core development kit, which includes:
- divers and runtime
- compilers, and debugging tools
- accelerated libraries, covering a range of targeted applications
- as well as support for domain-specific development environments, such as the following frameworks for AI development:
Vitis includes open-source, performance optimized libraries that offer out of box acceleration.
Of the many acceleration libraries, we have “AI”, which makes use of the Deep Learning Processing Unit (or DPU).
Vitis-AI encapsulates this AI portion of the Vitis offering.
Vitis-AI includes the Xilinx Model Zoo, which provides an ever-increasing number of pre-optimized models, directly targetable to the DPU core.
The latest addition to the Vitis framework is the Vitis Video Analytics SDK, or VVAS for short. The latest addition to the Vitis framework is the Vitis Video Analytics SDK, or VVAS for short.
VVAS is the integration of Vitis & Vitis-AI into the GStreamer framework, allowing easier application development. GStreamer is open-source and provides the infrastructure for:
- creation of dynamic real-time media pipelines
- handling of buffer management, including zero-copy, etc...
- definition of an open-source plug-in structure for extending functionality
Getting Started with the Pre-Built SD Image
Before diving into the details of how to build the custom app, let’s first run the final result.
The following pre-built SD card image is provided for this project:
- kv260-vvas-sms-2021-1 :
(2021-12-29 - MD5SUM = 37a58475ce16da9a056cbd359647d453)
The following hackster.io project provides detailed instructions on running the VVAS smart_model_select on the Kria KV260 Vision AI Starter Kit as an app called “kv260-vvas-sms”, which is the end result of this step-by-step tutorial:
The following diagram illustrates the development flow we will use to build this custom Kria app from sources.
Once built, the deployment for our custom Kria app is very short and simple, enhancing the user-experience of our intended audience. Starting from a generic SD image, corresponding to our tool version, all of the rpm packages required for our app can be installed with “dnf”.
Throughout this project tutorial, commands will be specified using one of the three prefixes ($, >, or #), which indicate the following context:
embedded platform (kv260)
The following blogs will cover each of the development steps for this in-depth project tutorial.
Initial Version, ready for publishing
- Introducing Xilinx Kria for Vision AI Applications
- Creating a custom Kria app
Element 14 Blogs:
- Vitis-AI 1.4 Flow for Kria KV260 Vision AI Starter Kit
- KRIA ... reproducing the benchmark results
- XMUTIL ... A new platform and app management utility from Xilinx
- XMUTIL … understanding platformstats
Xilinx on-line resources:
- Kria Product page
- KV260 Getting Started page
- KV260 Apps documentation
- Kria App Store
- Kria KV26 SOM wiki page
- KV260 Starter Kit Vitis Platforms
- Vitis Video Analytics SDK (VVAS) Documentation
- Smart Model Select
- MultiChannel ML