Melody-Zhou / tensorRT_Pro-YOLOv8

This repository is based on shouxieai/tensorRT_Pro, with adjustments to support YOLOv8.
MIT License
240 stars 40 forks source link

onnx->trt 模型转换时,出现显存不够 #27

Open jiaerwang0328 opened 5 months ago

jiaerwang0328 commented 5 months ago

小模型 rtmo-s_8xb32-600e_coco-640x640.onnx 转换时,出现: Tactic Device request: 9000MB Available: 7982MB. Device memory is insufficient to use tactic 为什么需要这么大的显存?

Melody-Zhou commented 5 months ago

小模型 rtmo-s_8xb32-600e_coco-640x640.onnx 转换时,出现: Tactic Device request: 9000MB Available: 7982MB. Device memory is insufficient to use tactic 为什么需要这么大的显存?

maxBatchSize 给小点试试,如下所示:

#! /usr/bin/bash

TRTEXEC=/home/jarvis/lean/TensorRT-8.6.1.6/bin/trtexec

${TRTEXEC} --onnx=rtmo-s_8xb32-600e_coco-640x640.onnx --minShapes=images:1x3x640x640 --optShapes=images:1x3x640x640 --maxShapes=images:4x3x640x640 --saveEngine=rtmo-s_8xb32-600e_coco-640x640.FP32.trtmodel