Skip to content

❓ [Question] How to convert Torch-TensorRT module to TRT engine? #1070

@lingffff

Description

@lingffff

❓ Question

How to convert Torch-TensorRT module (*.ts) to TRT engine? Is there any Python API to do that?

What you have already tried

In examples, I found

auto engine = torch_tensorrt::ts::convert_method_to_trt_engine(mod, "forward", compile_spec);

in https://github.com/pytorch/TensorRT/blob/master/examples/int8/qat/main.cpp

If this is the correct way to do converting? If yes, is there any Python API?

Environment

amd64 + Linux
all software is newest version

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions