Function torch_tensorrt::torchscript::convert_method_to_trt_engine¶
函數文件¶
-
TORCHTRT_API std::string torch_tensorrt::torchscript::convert_method_to_trt_engine(const torch::jit::Module &module, std::string method_name, CompileSpec info)¶
使用 TensorRT 為 NVIDIA GPU 編譯 TorchScript 方法。
取得現有的 TorchScript 模組和一組設定來配置編譯器,並將選定的方法轉換為序列化的 TensorRT 引擎,該引擎可以使用 TensorRT 執行
- 參數
module – torch::jit::Module - 現有的 TorchScript 模組
method_name – std::string - 要編譯的方法名稱
info – torch_tensorrt::CompileSpec - 編譯設定
- 傳回
: std::string: 相當於方法圖形的序列化 TensorRT 引擎