Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other
Target Operating System
Linux
QNX
other
Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other
SDK Manager Version
1.5.0.7774
other
Host Machine Version
native Ubuntu 18.04
other
When the SIPL processing is real-time (30 FPS), the buffers I get from the SIPL are chopped-off horizontally when I access them from CUDA. It doesn’t occur if the processing is non-real-time (i.e. when buffers are being dropped). I get the buffers from the SIPL completion queues using these calls
INvSIPLClient::INvSIPLBuffer* siplBuf = nullptr;
pipeQueues.captureCompletionQueue->Get(siplBuf, siplQueueTimeout);
NvMediaImage* img = siplMBuf->GetImage();
The buffers have been pre-mapped to CUDA with these calls
// Bind the buffer to CUDA.
cudaExternalMemoryHandleDesc cudaDesc = {};
cudaDesc.type = cudaExternalMemoryHandleTypeNvSciBuf;
cudaDesc.handle.nvSciBufObject = buf.sciObj;
cudaDesc.size = correct_size_here;
CheckFail(cudaImportExternalMemory(&buf.cudaExtMem, &cudaDesc), “cudaImportExternalMemory”);
// Map the buffer to CUDA. For some reason, the mapped buffer is
// updated without explicit synchronization.
cudaExternalMemoryBufferDesc cudaDesc2 = {};
cudaDesc2.size = cudaDesc.size;
CheckFail(cudaExternalMemoryGetMappedBuffer(&buf.cudaMappedBuf, buf.cudaExtMem, &cudaDesc2),
“cudaExternalMemoryGetMappedBuffer”);
I originally thought that cudaExternalMemoryGetMappedBuffer() was needed for synchronization between SIPL and CUDA, but the call is extremely slow and obviously allocates memory.
What’s the correct way to wait for the CUDA buffer to be up-to-date with the SIPL buffer?
Thanks