WeGO-TensorFlow1.x is a sub-project of WeGO, which is designed to improveVitis AI EoU by integrating the Vitis AI toolchain into TensorFlow 1.x framework. Vitis AI 2.5 supports TensorFlow v1.15. The input for WeGO-TensorFlow1.x is the quantized model usually named as quantize_eval_model.pb, which is generated by vai_q_tensorflow. The core WeGO API create_wego_graph() automatically converts the quantized graph into a new TensorFlow graph called as WeGO graph, where the cloud DPU compatible subgraphs are transformed into TensorFlow operator with the kind of VaiWeGOOp.
The whole WeGO-TensorFlow1.x inference can be abstracted into the following for steps
- Execute some graph-level optimizations on the original graph to meet DPU-specific requirements.
- Traverse the whole graph of the input quantized model and detect nodes which are supported by cloud DPU.
- Perform graph auto-partitioning over the quantized graph over the node list detected in step 2.
- Transform all cloud DPU compatible subgraphs into new TensorFlow nodes with kind of VaiWeGOOp within the input quantized model.
- Return the optimized new WeGO graph and then invoke TensorFlow sess.run() to execute the whole graph.