NVIDIA GPUDirect integration

Last modified by Lev Andronov on 2024/11/03 16:30

NVIDIA GPUDirect for video technology helps to efficiently transfer video frames in and out of NVIDIA GPU memory. It enables you to establish a direct connection between frame grabber and GPU, cutting the middleman memory copy and minimizing latency issues. All that is required is a simple and straight forward integration process, made even simpler by this manual.

Integration steps:

  1. Use our 'KYFGLib_Example_QueuedBuffers.c' as your starting point.
  2. Replace all '_aligned_malloc' function calls with 'cudaHostAlloc'.

The following call 'KYFG_BufferAnnounce' function will attempt to internally map virtual memory to physical addresses needed for DMA operations. Since that memory has already been mapped by 'cudaHostAlloc', the resulting physical addresses map will be identical; which means the video stream physical memory used by frame grabber will become immediately available to NVIDIA stack, avoiding the need for additional memory transfer.


gpudirect.png

NVIDIA GPUDirect principal scheme

A list of compatible GPU’s can be found at official page: NVIDIA GPUDirect for Video.

KAYA Instruments © 2024. All Rights Reserved.