Shortcuts

Function torch_tensorrt::torchscript::convert_method_to_trt_engine

Function Documentation

TORCHTRT_API std::string torch_tensorrt::torchscript::convert_method_to_trt_engine(const torch::jit::Module &module, std::string method_name, CompileSpec info)

Compile a TorchScript method for NVIDIA GPUs using TensorRT.

Takes a existing TorchScript module and a set of settings to configure the compiler and will convert selected method to a serialized TensorRT engine which can be run with TensorRT

Parameters
  • module, : – torch::jit::Module - Existing TorchScript module

  • method_name, : – std::string - Name of method to compile

  • info, : – torch_tensorrt::CompileSpec - Compilation settings

Returns

: std::string: Serialized TensorRT engine equivilant to the method graph

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources