How To Install libxir1 on Ubuntu 22.04

In this tutorial we learn how to install libxir1 on Ubuntu 22.04. libxir1 is Xilinx Intermediate Representation (XIR) for deep learning algorithms (runtime)

Introduction

In this tutorial we learn how to install libxir1 on Ubuntu 22.04.

What is libxir1

libxir1 is:

Xilinx Intermediate Representation (XIR) is a graph based intermediate representation of the AI algorithms which is well designed for compilation and efficient deployment of the Domain-specific Processing Unit (DPU) on the FPGA platform. Advanced users can apply Whole Application Acceleration to benefit from the power of FPGA by extending the XIR to support customized IP in Vitis AI flow.

XIR includes Op, Tensor, Graph and Subgraph libraries, which providing a clear and flexible representation for the computational graph. For now, it’s the foundation for the Vitis AI quantizer, compiler, runtime and many other tools. XIR provides in-memory format, and file format for different usage. The in-memory format XIR is a Graph object, and the file format is a xmodel. A Graph object can be serialized to a xmodel while the xmodel can be deserialized to the Graph object.

In the Op library, there’s a well-defined set of operators to cover the wildly used deep learning frameworks, e.g. TensorFlow, Pytorch and Caffe, and all of the built-in operators for DPU. This enhences the expression ability and achieves one of the core goals of eliminating the difference between these frameworks and providing a unified representation for users and developers.

XIR also provides a Python APIs which is named PyXIR. It enables Python users to fully access XIR and benefits in a pure Python environment, e.g. co-develop and integrate users’ Python project with the current XIR based tools without massive dirty work to fix the gap between two languages.

This package provides the runtime environment for XIR.

There are three methods to install libxir1 on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libxir1 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libxir1 using apt-get by running the following command:

sudo apt-get -y install libxir1

Install libxir1 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libxir1 using apt by running the following command:

sudo apt -y install libxir1

Install libxir1 Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libxir1 using aptitude by running the following command:

sudo aptitude -y install libxir1

How To Uninstall libxir1 on Ubuntu 22.04

To uninstall only the libxir1 package we can use the following command:

sudo apt-get remove libxir1

Uninstall libxir1 And Its Dependencies

To uninstall libxir1 and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove libxir1

Remove libxir1 Configurations and Data

To remove libxir1 configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge libxir1

Remove libxir1 configuration, data, and all of its dependencies

We can use the following command to remove libxir1 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libxir1

References

Summary

In this tutorial we learn how to install libxir1 package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.