In VAI2.0 release, Pytorch model and Tensorflow2 model with custom op are supported. The basic workflow for custom op is shown below.
Figure 1. Custom Op Workflow
The following are the steps in the workflow:
- Define the OP as a custom OP which is unknown to XIR and then quantize the model.
- Compile the quantized model.
- Register and implement the custom OP.
- Deploy the model with graph_runner APIs
We will give examples for the following two models respectively.
- MNIST model based on Tensorflow2
- Pointpillars model based on Pytorch