4.1.1. PTQ Principle and Steps

../../../../_images/workflow.png

Environment Deployment: It is used to build the dependency environment for model transformation and application development. This operation only needs to be done once for the first usage of toolchain. For the detailed deployment method, please refer to Environment Deployment section.

Model Training: It is the process of getting a usable model by using public deep learning frameworks such as TensorFlow, PyTorch, Caffe, etc. The trained model will serve as the input for the model conversion stage. The toolchain does not provide training-related libraries or tools. For the detailed supported public learning frameworks, please refer to the instructions in the Floating-point Model Preparation .

Model Conversion: Taking the floating-point model obtained from model training as input, this stage transforms floating-point models into hybrid heterogeneous models that can run efficiently on the D-Robotics computing platform through important steps such as model structure optimization and model calibration quantification. To verify the usability of the heterogeneous model, the toolchain also provides you with performance analysis, accuracy analysis, and a rich set of exception debugging tools and recommendations. For more information, please refer to Model Quantization and Compilation , Model Performance Analysis and Optimization and Model Accuracy Analysis and Optimization sections.

Operator development: This stage is optional and it mainly solves the situation when the model has toolchain that does not support the operator. If you do not encounter such a situation, you can simply ignore this section. For more information, please refer to Custom OP Development section.

Embedded Application development: The toolchain supports application development in both X86 emulation environment and real embedded environment. In case you are not convenient to use the development board, you can debug the program and verify the calculation results in the emulation environment. In order to reduce the cost of simulation verification, the toolchain provides the exact same simulation library interface as the embedded interface, only with different compilation configurations. For more information, please refer to Embedded Application Development section.

The following is a detailed description of the process and steps related to PTQ conversion.