Force rendering on CPU on Jetson Xavier

Hi,

thanks for Jetson Xavier it’s a really great device.

I’m currently building an application that basically capture a video stream (using opencv2 from /dev/video0), detect objects using a custom model with Tensorflow and render the captured image in fullscreen with the bounding boxes everything at 30 FPS (using opencv2).

In order to satisfy the real-time requirements, my application has multiple threads: I’m predicting and rendering at the same time.

However, it looks like rendering and predicting at the same time create contention on the GPU and it slows down the both of them.

Questions:

  • Is it possible to force rendering on CPU to use the GPU for only predicting?
  • Why is there contention when rendering and predicting? Rendering alone takes up to 20% of the GPU, model takes up to 60% of GPU (measured using jtop) so both combined, I’m not using even 100%. If you can provide me with technical details on why it happens, it would be greatly appreciated.

Thanks in advance,