Function trtorch::EmbedEngineInNewModule

Function Documentation

TRTORCH_API torch::jit::Module trtorch :: EmbedEngineInNewModule ( const std::string & engine )

Take a previously created TensorRT engine and embed it in in a TorchScript module.

Takes a pre-built serialized TensorRT engine and embeds it in a TorchScript module. Registers execution of the engine as the forward method of the module Forward is defined as: forward(Tensor[]) -> Tensor[]

Parameters
  • engine : std::string - Pre-built serialized TensorRT engine

Return

: A new module trageting a TensorRT engine