快捷方式

函式 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 引擎的新模組

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

尋找開發資源並獲得問題解答

檢視資源