快速鍵

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 引擎

文件

存取 PyTorch 的完整開發者文件

查看文件

教學

取得初學者和進階開發人員的深入教學

查看教學

資源

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

查看資源