spconv icon indicating copy to clipboard operation
spconv copied to clipboard

Please, clarify your tensorrt guide

Open ArseniuML opened this issue 1 year ago • 1 comments

At the end of TENSORRT_INT8_GUDE you write:

write torch.fx based torch->trt conversion After PTQ/QAT model ready, we can use torch.fx.Interpreter to transform traced pytorch model to tensorrt.

see example.

But how do I can use torch.fx.Interpreter to transform traced pytorch model to tensorrt? torch.fx.Interpreter isn't a TensorRT interpreter, and spconv.pytorch.quantization.interpreter.NetworkInterpreter is also is not a TensorRT interpreter... Do I need to use TRTInterpreter from from torch.fx.experimental.fx2trt.fx2trt or something else?

ArseniuML avatar Nov 16 '23 13:11 ArseniuML

At the end of TENSORRT_INT8_GUDE you write:

write torch.fx based torch->trt conversion After PTQ/QAT model ready, we can use torch.fx.Interpreter to transform traced pytorch model to tensorrt. see example.

But how do I can use torch.fx.Interpreter to transform traced pytorch model to tensorrt? torch.fx.Interpreter isn't a TensorRT interpreter, and spconv.pytorch.quantization.interpreter.NetworkInterpreter is also is not a TensorRT interpreter... Do I need to use TRTInterpreter from from torch.fx.experimental.fx2trt.fx2trt or something else?

I think NetworkInterpreter is a tensorrt interpreter, it is used to trace the fx graph and add layers. I built mine using https://github.com/traveller59/spconv/blob/master/example/mnist/custom_fx2trt.py

superpigforever avatar Nov 29 '23 09:11 superpigforever