TensorRT – 计算模型推理时间
1 TensorRT的性能衡量标准 使用 TensorRT 进行模型优化工作之前,必须确定应该测量什么。没有衡量标准,就不可能取得可靠的进展或衡量是否取得了成功 Latency 第一个衡量标准是从输入数据经过网络然后输出的时间,这个时间称为延迟(Latency)。在一些项目中,较低的模型推理延迟是非…
- TensorRT
- 2023-03-06
TensorRT – Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors
1 TensorRT加载模型出现警告Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause er…
- TensorRT
- 2023-03-03
TensorRT – TensorRT was linked against cuBLAS/cuBLAS LT 11.6.1 but loaded cuBLAS/cuBLAS LT 11.5.4错误提示
1 TensorRT was linked against cuBLAS/cuBLAS LT 11.6.1 but loaded cuBLAS/cuBLAS LT 11.5.4 使用TensorRT推理模型时,有时候会看到以下TensorRT自己打出的日志 TensorRT was linked a…
- TensorRT
- 2023-03-02
TensorRT – workspace的作用
1 TensorRT中workspace的作用 TensorRT提供了workspace作为每层网络执行时的临时存储空间,该空间时共享的,目的是为了减少显存占用。 在使用TensorRT SDK时,在构建Builder时通过调用getWorkspaceSize()来确定workspace的需求,如果…
- TensorRT
- 2022-12-21
TensorRT – Using PreviewFeaturekFASTER_DYNAMIC_SHAPES_0805 can help improve performance and resolve potential functional issues
1 问题 今天使用TensorRT 8.5的trtexec工具转换具有动态维度输入的onnx模型时出现了以下的提示信息 Using PreviewFeaturekFASTER_DYNAMIC_SHAPES_0805 can help improve performance and resolve p…
- TensorRT
- 2022-12-15
TensorRT – 使用C++ SDK出现无法解析的外部符号 “class sample::Logger sample::gLogger”错误
1 使用TensorRT C++ SDK编译出现无法解析的外部符号 "class sample::Logger sample::gLogger" 错误 今天在使用TensorRT C++ SDK写模型部署代码的时候, 在代码中有这样一行代码 initLibNvInferPlugins(&sa…
- TensorRT
- 2022-12-12
TensorRT – 使用Polygraphy工具比较onnx模型和TensorRT模型的推理结果是否一致
1 比较onnx模型和TensorRT模型推理结果的必要性 在进行模型部署的时候,如果我们使用TensorRT对模型加速,那么一般都会采用深度学习框架>onnx模型>TensorRT模型的技术路线,在onnx模型转换到TensorRT模型的过程中有可能某些算子会丢失精度,从而影响后续的模型推理结果,…
- TensorRT
- 2022-12-12
TensorRT – onnx_graphsurgeon工具库的安装与API简介
1 onnx_grapgsurgeon 1.1 onnx_grapgsurgeon简介 onnx_grapgsurgeon是NVIDIA提供的创建和修改onnx模型的便捷易用工具库。 Github:https://github.com/NVIDIA/TensorRT/tree/master/tool…
- TensorRT
- 2022-12-05
TensorRT – 转换onnx模型出现Slice_74 requires bool or uint8 I/O but node can not be handled by Myelin错误
1 Error Code 2: Internal Error (Slice_74 requires bool or uint8 I/O but node can not be handled by Myelin错误 1.1 问题 今天在用TensorRT转化onnx模型出现了以下错误 转换onnx模…
- TensorRT
- 2022-12-02
Python – onnx导出模型出现RuntimeError: Exporting the operator pad_sequence to ONNX opset version 13 is not supported错误
1 onnx导出模型出现RuntimeError: Exporting the operator pad_sequence to ONNX opset version 13 is not supported错误 今天在pytorch中导出模型为onnx时,由于使用了from torch.nn.uti…
- 模型部署
- 2022-12-01
TensortRT – 转换模型出现Could not locate zlibwapi.dll. Please make sure it is in your library path!错误
1 TensortRT转换模型出现Could not locate zlibwapi.dll. Please make sure it is in your library path!错误 1.1 问题 今天在使用TensorRT转换onnx模型时出现了以下错误 [12/01/2022-09:03:…
- TensorRT
- 2022-12-01
Python – 使用onnxruntime加载和推理onnx模型
1 onnxruntime Onnx runtime是一个跨平台的机器学习模型加速器,可以在不同的硬件和操作系统上运行,可以加载和推理任意机器学习框架导出的onnx模型并进行加速。 如要使用onnxruntime,一般通过以下步骤: 从机器学习框架中将模型导出为onnx 使用onnxruntime加…
- 模型部署
- 2022-11-30