Skip to content

mlir2onnx tool optimize (for visualizing *_final.mlir files) #80

@charlesxzb

Description

@charlesxzb

Optimize mlir2onnx.py so that *_final.mlir can be converted to .pb file and visualized in Netron.

The main difference between *.mlir and *_final.mlir is the latter contains information of the subnet and layer group.

Source Code Path:
tpu-mlir/python/tools/mlir2onnx.py

To test:

$ 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

Bonus: 500pt

Metadata

Metadata

Assignees

No one assigned

    Labels

    BonusBonus can be obtained after resolving this issueenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions