函式 torch_tensorrt::torchscript::convert_method_to_trt_engine¶
定義在 檔案 torch_tensorrt.h 中
函式文件¶
-
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 引擎