Open zhangw864680355 opened 1 month ago
To convert a pytorch model to its corresponding bmodel, you need first convert it to onnx/jit model, and then convert the onnx/jit model to a bmodel.
You can refer to the example in XInstructBLIP-TPU (trace_others.py
for pth model -> onnx/jit model
, compile_others.py
for onnx/jit model -> bmodel
) and docs in tpu-mlir quickstart.
How to convert models to bmodel? Can you provide a reference example? Thanks.