I am trying to deploy YOLOv7 model onto NVIDIA Xavier AGX, and everything works well with batch size 1. I utilize dynamic batch and deploy models on batch>1 images, and the performance is nominal. However, the time it takes to do inference scales with batch size.
Could you recheck the log since the output is not expected.
GPU utilization can be monitored by the GR3D_FREQ score from tegrastats.
In your experiment, only batchsize=8 runs with full GPU resources. Batchsize=1~4 only takes around 1%~4x%.
Please check if you do capture the inference period correctly.
For batching optimization, please find below topic for introduction and guidance:
GR3D_FREQ seems to oscillate a lot, at batch 4, between 4% to 50%. Sometimes, the values spike to 99% but also go all the way down to 0%. When I use jtop, these values seem to be a lot more stable.
What is the best way to record GPU utilization? For reference, I use TensorRT 7.1.3 and enqueueV2() to run inference. My engine is optimized for running batches of 4, with min=1 and max=8.
It sounds like your inference task is more IO tasks rather than computational jobs (GPU idle sometimes).
Could you profile the pipeline with Nsight System and share the result with us?
More, the latest TensorRT for Xavier is 8.5.
It’s recommended to upgrade your device and try it again.
I was unable to get my code working with Nsight System. I profiled it using with nvprof, but I am unable to upload the results. How can i send them to you?