Function torch_tensorrt::torchscript::convert_method_to_trt_engine¶
Defined in File torch_tensorrt.h
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