Description: I’m encountering a GPU memory transformation error when using the nvds_obj_enc_process
function in my DeepStream application:
Error (batch_jpeg_enc): Transformation of CUDA_DEVICE memory on different gpus is not allowed. Please use either UNIFIED or PINNED memory for the transformation or do the transformation on the same gpus.
Code Context:
I use a buffer probe on the pad of nvosd.
Following along the lines of
\opt\nvidia\deepstream\deepstream\sources\apps\sample_apps\deepstream-image-meta-test\deepstream_image_meta_test.c
NvDsObjEncUsrArgs objData = {0};
objData.saveImg = TRUE;
objData.attachUsrMeta = TRUE;
objData.scaleImg = FALSE;
objData.scaledWidth = 0;
objData.scaledHeight = 0;
objData.objNum = 1;
objData.quality = 80;
objData.calcEncodeTime = TRUE;
nvds_obj_enc_process(ctx, &objData, ip_surf, obj_meta, frame_meta);
Environment:
- Hardware Platform: GPU
- DeepStream Version: 7.1
- JetPack Version: Not applicable (using GPU)
- TensorRT Version: Not specified
- NVIDIA GPU Driver Version: 560.35.03
- CUDA Version: 12.6
Issue Type: Bug
How to Reproduce the Issue:
- Use the
nvds_obj_enc_process
function in a DeepStream application. - Configure the
NvDsObjEncUsrArgs
structure as shown in the code context
Question: How can I configure the nvds_obj_enc_process
function or the NvDsObjEncUsrArgs
structure to use UNIFIED or PINNED memory instead of CUDA_DEVICE memory? Is there a parameter I’m missing, or do I need to modify the input buffer surface memory type before calling the encoding function?
I only use on GPU with gpu_id=0
Any guidance on resolving this GPU memory transformation issue would be greatly appreciated.