tensorrtx icon indicating copy to clipboard operation
tensorrtx copied to clipboard

Tensorrt doInference一帧推理时间不稳定

Open zhuimeng2080 opened this issue 3 years ago • 2 comments

请教大佬,如题,是单GPU显卡, doInference一帧推理的时候有时是40ms, 有时候是150ms,有时候是80ms, 一般是什么原因?

zhuimeng2080 avatar May 05 '22 01:05 zhuimeng2080

did you try to test it in loop?

wang-xinyu avatar May 11 '22 02:05 wang-xinyu

did you try to test it in loop? @ 大佬,我也遇到这个问题,循环跑图片推理时间固定10ms左右,但是通过以下语句: cv::imshow("img", img); cv::waitKey(1000); 让测试图片之间停顿1秒,这种情况下时间就不稳定了,基本是>70ms,测试了时间开销在于以下语句: CUDA_CHECK(cudaMemcpyAsync(output, d0_buffers[1], batchSize * OUTPUT_SIZE * sizeof(float), cudaMemcpyDeviceToHost, d0_stream)); cudaStreamSynchronize(d0_stream);

请问这是否与tensorRT框架实现有关?

我现在也是这个问题,这样都不能真的用于生产,,,

hnothing2016 avatar Jun 14 '22 00:06 hnothing2016

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 31 '22 02:08 stale[bot]