Skip to content

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

Closed

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

Activity

  1. added
    question
    on May 17, 2022
  2. narendasan commented on May 18, 2022

    @narendasan
    Collaborator

    Yes this is the way, there is a python api by the same name in torch_tensorrt.ts

  3. locked and limited conversation to collaborators on May 23, 2022
  4. converted this issue into a discussion #1082 on May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions