sophgo / tpu-mlir

Machine learning compiler based on MLIR for Sophgo TPU.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mlir2onnx工具优化,支持final.mlir的可视化(包含subnet和layer group)

baifengbai opened this issue · comments

任务目标:完善mlir2onnx工具,使该工具支持final.mlir转换为onnx文件,该文件可以使用netron打开。
任务代码路径:tpu-mlir/python/tools/mlir2onnx.py
任务测试方法:cd tpu-mlir/regression & ./run_model.sh resnet50_tf & mlir2onnx.py -m regression_out/resnet50_tf_bm1684x/resnet50_tf_bm1684x_int8_asym_final.mlir -o resnet50_tf_final.pb。生成resnet50_tf_final.pb。 可以使用netron打开查看模型。
final.mlir与*.mlir文件的主要区别在final.mlir包含subnet以及layer group信息。