6.4. PTQ Conversion Samples Guide

Tip

  1. Before using this manual, we recommend you reading Toolchain Overview and PTQ Principle and Steps to get a full understanding of the PTQ model conversion scheme (hereafter referred to as the PTQ scheme).

  2. If you want to know how to use the PTQ floating-point and fixed-point model conversion scheme tool when you perform a custom model conversion, refer to PTQ Tools Guide.

  3. After using this guide to complete the model conversion of the PTQ sample package, please continue to read AI_Benchmark Doc and BPU SDK API Doc for embedded development work and deploy the model on the board.

The PTQ sample package helps developers to quickly get started with the PTQ scheme.

Using the PTQ sample package, developers can not only experience converting a 32-bit floating-point (FLOAT32) precision sample model to an 8-bit fixed-point integer (INT8) precision bin model that can run on the D-Robotics X5 platform, but also learn how to use the tools provided by the PTQ solution to design custom model conversion business logic scripts based on the sample scripts.

This guide is intended to show developers how to use the D-Robotics X5 algorithm toolchain’s PTQ model transformation sample package (hereafter referred to as the PTQ sample package).

You can obtain the PTQ sample package in horizon_x5_open_explorer at samples/ai_toolchain/horizon_model_convert_sample.

The next section will introduce you the contents of the PTQ sample package.