image loading in TensorRT execute batchsize more than 1

Hello there,
I am trying to run tensorRT execute function for batchsize more than1. In python, it is pretty easy to append image data and pass it to the function. But here in TensorRT cpp api, how to append images before passing to execute function? or assigning to cpu pointer of unified memory as used in jetson-inference? Any sample code available?
Thanks in advance.

Hi,

Just appending the images.

For example,

cudaMallocManaged( &input_data, N*C*H*W*sizeof(float));
  • Put image-1 at input_data[0] - input_data[C*H*W-1]
  • Put image-2 at input_data[C*H*W] - input_data[2*C*H*W-1] ...

Thanks.