Function torch_tensorrt::torchscript::compile¶
函式文件¶
-
TORCHTRT_API torch::jit::Module torch_tensorrt::torchscript::compile(const torch::jit::Module &module, CompileSpec info)¶
使用 TensorRT 為 NVIDIA GPU 編譯 TorchScript 模組。
接受現有的 TorchScript 模組和一組設定來配置編譯器,並將方法轉換為呼叫等效 TensorRT 引擎的 JIT 圖形
特別轉換 TorchScript 模組的 forward 方法
- 參數
module – torch::jit::Module - 現有的 TorchScript 模組
info – torch_tensorrt::CompileSpec - 編譯設定
- 傳回
: 一個以 TensorRT 引擎為目標的新模組