Hardware Platform: NVIDIA GeForce RTX 3070
DeepStream Version: 7.0 and 9.0
NVIDIA GPU Driver Version: 580.159.03
Issue Type: Bug / question
Module: nvinferserver / nvdsinferserver
Issue
I found that IOptions attached to a BaseBatchArray is lost after the generic postprocess path.
In my case, I attach custom metadata before the inference callback:
auto options = std::make_shared<BufOptions>();
options->setValue("x-model-id", model_id);
outputsArr->setIOptions(options);
However, later in GstNvInferServerImpl::InferenceDone(), calling:
bufArray->getOptions()
returns nullptr.
Finding
After debugging, I found that genericPostProcess_() creates a new outBuf from inBuf and only copies bufId:
outBuf->setBufId(inBuf->bufId());
It does not propagate IOptions.
Adding the following line fixes the issue for me:
outBuf->setIOptions(inBuf->getSafeOptions());
So the patch is:
outBuf->setBufId(inBuf->bufId());
outBuf->setIOptions(inBuf->getSafeOptions());
Question
Could NVIDIA confirm whether IOptions should be propagated when genericPostProcess_() creates a new output batch array?
From my understanding, since BaseBatchArray already provides getSafeOptions() and setIOptions(), the options should be preserved across postprocess, similar to bufId.
