快捷方式

函数 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 开发者文档

查看文档

教程

为初学者和高级开发者提供深入的教程

查看教程

资源

查找开发资源并让您的问题得到解答

查看资源