Some problems in deepstream_parallel_app

I mean how do you start docker.
If you want to display in docker, you need to follow the following steps

xhost +

docker run --gpus all -it --rm --net=host --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-6.3

In addition, I found that enable-perf-measurement does not work in deepstream_parallel_inference_app, it only takes effect in deepstream-app,

I will look into this issue.

I start docker with command as follows:

docker run -it --gpus all /bin/bash
So, do I need to start it completely according to the command you provided?
And, the fps doesn’t support deepstream_parallel_inference_app?😊😊

Yes, fps currently does not support it.

If it is supported in the future, I will give feedback.

Yes, You can try it first.

Thanks for your reply, I will try it later and look forward to your subsequent feedback if it is supported in the future.

One more question, how do I use Nsight System to profile?
like this? nsys profile --stats=true ./apps/deepstream-parallel-infer/deepstream-parallel-infer -c configs/apps/bodypose_yolo_lpr/source4_1080.p_dec_parallel_infer.yml
I’m trying to get CPU and GPU utilization

Yes, You can get more information from here

Could you give me a detailed command to display the CPU utilization and GPU utilization on the terminal, thanks.

Try the following cli.

nsys profile --stats=true --sample=cpu --trace=cuda,cudnn,cublas,nvtx,osrt,oshmem ./apps/deepstream-parallel-infer/deepstream-parallel-infer -c configs/apps/bodypose_yolo_lpr/source4_1080p_dec_parallel_infer.yml

You will get output such as

Time (%)  Total Time (ns)  Num Calls    Avg (ns)      Med (ns)    Min (ns)   Max (ns)     StdDev (ns)            Name
 --------  ---------------  ---------  ------------  ------------  --------  -----------  -------------  ----------------------
     61.8    6862642163937     273904    25054917.6      393098.5       802  58168989097    880367902.9  pthread_cond_wait
     28.7    3180146886600     241841    13149742.5        6569.0       483  53659046338    429000516.1  futex
      2.6     289327846731      49999     5786672.7      228345.0       826  29823194392    138261878.5  poll
      1.8     205013066942       7400    27704468.5    28453414.5     74197   4378362396    101851026.5  ppoll
      1.6     180016135286        183   983694728.3  1000087951.0     40013  10001261789   1730653101.4  pthread_cond_timedwait
      1.6     176695770522         44  4015812966.4       91113.0        60  59155971605  13635378370.8  sem_timedwait
      0.6      69216509643      13708     5049351.4      585422.0       120  16484066649    141790331.3  sem_wait
      0.5      59342157415        349   170034835.0     1098534.0    156675   1000192787    374939390.6  nanosleep
      0.3      31843013549     126709      251308.2       38076.0        79     86764234       724197.8  pthread_rwlock_wrlock
      0.2      19637564794     109638      179112.8       29251.5       108     85577782       587847.4  pthread_rwlock_rdlock
      0.1      11331747656      76205      148700.8        8848.0        35   2013220601     12638364.1  pthread_mutex_lock

You also export the report1.nsys-rep to gui-tools

Thanks for your reply sincerely, and I had try it, but I got some error:

And when I attempt to download and install Nsight tool in docker with the follow command:

Some error happened when I run the following command on terminal:


Is I can’t do this in docker, if it is, how can I do to profile the code in docker?

Ignore this error. It’s just a character encoding problem for a certain sample.

You can export the .nsys-rep file to host.
It’s not problem about deepstream sdk,you can get support in developer tools forum.

1 Like

Thanks, I will try it later.

I’ sorry to bother you again, but I’m not understand the branch group clearly, could you give me a more detailed explanation about it, thanks.

How to determine the pgie-id and sec-ids? Take the source4_1080.p_dec_parallel_infer.yml for example, I can see three primary-gies(primary-gie0, primary-gie1 and primary-gie2) in the file, but the pgie’id is 2 and 3, what does it mean? And src-ids, it’s defined as selecting sources by sourceid, I’m not really sure what the sourceid is and the numbers of 1; 2; 3<src-ids: 1;2;3>corresponds to which part of the configuration file.

1.gie-unique-id is the identifier of each infer engine and is unique.
and pgie-id in branch[X] group must be same as this value.
Just ensure it is unique, no matter what the value is, it can be 42

2.About src-ids.

The parallel-app has multiple stream inputs.

If you want to send different stream inputs to different inference branches, configure the corresponding stream id.

Such as

0;1;2 --> branch0  
1;2;3 --> branch1 
4;5;6(if you have bigger than 7 inputs stream) --> branch2.

Is the numbers of 0;1;2 in branch0 fixed? Just like:

0;1;2 --> branch0  (branch0  src-id can't be 1;2;3 )
1;2;3 --> branch1 
4;5;6 --> branch2
7;8;9 --> branch3

And I found the source was provided by the csv file in source4_1080.p_dec_parallel_infer.yml

Are the numbers in the src-id related to it, and if so, what is their relationship to each other

No,any valid id can be used

Just related to their order and num-sources

Sorry, please forgive my stupidity, I still not clearly understand it. Taking source4_1080p_dec_parallel_infer.yml as example:

  ## pgie's id
  pgie-id: 1  --> primary-gie0  -->  the model is yolov4
  ## select sources by sourceid
  src-ids: 0;1;2

  ## pgie's id
  pgie-id: 2  --> primary-gie1  -->  the model is bodypose2d
  ## select sources by sourceid
  src-ids: 1;2;3

  ## pgie's id
  pgie-id: 3  --> primary-gie2  -->  the model is trafficcamnet
  ## select sources by sourceid
  src-ids: 1;2;3

And the sources are provided: sources_4_different_source.csv
The csv file provides 2 sources,and each source’s num-sources equal = 2, thus, there are a total of 4 channels of video. I can understand that 0;1 in the src-id is the first source :file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 split into two videos, and 2 is the second source file:///opt/ nvidia/deepstream/deepstream/samples/streams/sample_1080p_h265.mp4 split the two-way video in the first well

Your understanding is completely correct.

you can generate the pipeline graph through GST_DEBUG_DUMP_DOT_DIR.

I get the pipeline.png by using the follow command:

apt-get install graphviz
./apps/deepstream-parallel-infer/deepstream-parallel-infer -c 
 cd   /tmp/
dot -Tpng > pipeline.png

But I’m confused about pipeline.png, why is there only one src in tee?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

The data format processed by nvinfer is called batch.

And nvstreammux organizes video frames into batches. then the batch is forked to every branch through tee

You had better read the documentation about the nstreammux and nvinfer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.