干翻TensorRT系列(一)——了解trt、熟悉trt、成为trt

这是一系列文章

推理库可以依赖tensorrt以及torchscript,编译库可以依赖torch-inductor+triton。

主要的功能

  • 自动生成可以部署的.cpp和.h(通过链接库来进行)
  • 方便benchmark不同后端不同平台的速度以及精度
  • 评测方式可以直接用triton的接口

思想

  • 写视频、写图片可以先存到vector中(会比较占用内存)
  • 读取流和和视频
  • 信号量的使用

Python部分

用户是否需要安装python环境库?

在linux端,如果不安装的话,可以通过curl来请求

  • 前端查看模型效果 streamlit gradio
  • 如果和C++交互,是否需要调整为 http 请求的方式

C++部分

  • 依赖triton从而支持不同的后端,

特性

  • operator fusion, graph rewriting, and memory optimization
  • High-Performance Fusion Operator Library: Implemented a series of high-performance fusion operators based on CUDNN, CUBLAS, CUDA C++, and OpenAI Triton. These operators support both forward and backward propagation, thus can also accelerate training.
  • CUDA Graph Capture, Optimized BeamSearch, Optimized Attention Layer, further enhanced performance when combined with the aforementioned technologies.

参考