DeepStream SDK FAQ

36.[DSx_All_App] How to use Nsight System CLI to profile DeepStream App from the command line.

Deepstream Plugins that can be queried using this tool.

Plugins Tags
nvv4l2-decoder Call to NV12_to_NV12_cutex Call to cudaEventCreateWithFlags ……
nvstreammux stream-muxer_acquireBufferFromPool(Batch=0) stream-muxer_collectingBuffers(Batch=0) …
nvinfer buffer_process batch_num=1 ……
nvinferserver buffer_process batch_num=1 …
nvdewarper nvdewarper0_(Frame=1)_Scale ……
nvdsosd nv-onscreendisplay_(Frame=0) …
nvmultistreamtiler tiled_display_tiler_(Frame=0) ……
nvtracker (null)_nvtracker_convert_buffer(Frame=0) ……

How to use the tool(Take the deepstream-test1 as an example.)

  1. Make sure you have the Nsight System installed on your system. You can download and install it from the following page Nsight Systems - Get Started | NVIDIA Developer according to your platform.

  2. Use NVTX to trace any CUDA kernal function wrote by yourself if necessary.

  • Add #include “nvtx3/nvToolsExt.h” in the source code.
  • Add the compiler flag “-ldl” in the Makefile
  • Add calls to the NVTX API functions below.
nvtxRangePush("my_cuda_kernal");
//your code
nvtxRangePop();
  1. Run the command below, it will generate a report file called nsys_report.nsys-rep
$nsys profile -w true -t "cuda,cudnn,osrt,nvtx" -o ./nsys_report --cuda-memory-usage=true ./deepstream-test1-app dstest1_config.yml
  1. Use the Nsight Systems App to read the nsys_report on your Microsoft System. As the image below, just right click the GstNvinfer and choose the “Show in Events View”, the detailed information is displayed at the bottom.