Why nvinfer plugin did not check whether the input queue is full?

I noticed that in nvinfer source code, it called g_queue_push_tail function to insert a batch to input queue, but it did not check whether the queue is full. Is there no limit of queue length? In real time monitoring scenarios, if inferenceing of NN model is very time consuming, I think it will cause a big e2e latency, right?

Hi,

Thanks for your report.

I will redirect these questions to our internal team.
Will let you know once we got a feedback.

Thanks.

No reply yet?

Hi,

Sorry for keeping you waiting. Here are some information from our internal team:

There is no limit on the queue size but we are maintaining an internal buffer pool which limits the max number of batches that can be queued.
The internal buffer pool size is controlled using INTERNAL_BUF_POOL_SIZE macro in gstnvinfer.cpp file.

/opt/nvidia/deepstream/deepstream-4.0/sources/gst-plugins/gst-nvinfer/gstnvinfer.cpp

Apart from this, there may be a few miscellaneous events(gstpad add/deletion) added to the queue, which will never reach a high number.

Thanks.