torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

How to input TorchScript model file (*.pt) and convert it to Torch MLIR directly (not python)

Open imxxw opened this issue 2 years ago • 3 comments

Hi, friends.

How to input TorchScript model file (*.pt) and convert it to Torch MLIR directly (not python) ?

I have implemented the above feature with python: import .pt file via Python’s torch.jit.load(model) and convert it to torch dialect MLIR via torch_mlir.compile().

Now I want to build a tool (or use torch-mlir-opt tool), how to input TorchScript model file (*.pt) and convert it to Torch MLIR directly?

thanks

imxxw avatar May 08 '23 07:05 imxxw

AFAIK, there currently isn't a way to do this in torch-mlir.

ramiro050 avatar May 08 '23 19:05 ramiro050

AFAIK, there currently isn't a way to do this in torch-mlir.

Thanks

imxxw avatar May 19 '23 01:05 imxxw

@imxxw Excuse me,I notice that you have implemented the above feature(input TorchScript model file (*.pt) and convert it to Torch MLIR directly) with python .Could I get your python script because i need to convert yoloV3.pt to MLIR.

RiRi114 avatar Jul 14 '23 07:07 RiRi114