Dheemanth 5443602d89
CUDA 13.4 samples update - v13.4-public
Release 13.4 of the CUDA Samples supported by CUDA Toolkit 13.4.
See Changelog for more information.
2026-09-09 17:07:08 -05:00
..
2026-05-13 17:13:18 -05:00
2026-05-13 17:13:18 -05:00
2026-05-13 17:13:18 -05:00
2026-05-13 17:13:18 -05:00

cudaNvSci - CUDA NvSciBuf/NvSciSync Interop

Description

This sample demonstrates CUDA-NvSciBuf/NvSciSync Interop. Two CPU threads import the NvSciBuf and NvSciSync into CUDA to perform two image processing algorithms on a ppm image - image rotation in 1st thread & rgba to grayscale conversion of rotated image in 2nd thread.

Key Concepts

CUDA NvSci Interop, Data Parallel Algorithms, Image Processing

Supported SM Architectures

SM 6.0 SM 6.1 SM 7.0 SM 7.2 SM 7.5 SM 8.0 SM 8.6 SM 8.7 SM 8.9 SM 9.0

Supported OSes

Linux, QNX (standard and safety cross-builds)

Supported CPU Architecture

x86_64, aarch64

CUDA APIs involved

CUDA Driver API

cuDeviceGetUuid

CUDA Runtime API

cudaExternalMemoryGetMappedBuffer, cudaImportExternalSemaphore, cudaDeviceGetAttribute, cudaNvSciSignal, cudaGetMipmappedArrayLevel, cudaImportNvSciRawBuf, cudaSetDevice, cudaImportNvSciImage, cudaNvSciApp, cudaDeviceId, cudaMallocHost, cudaSignalExternalSemaphoresAsync, cudaCreateTextureObject, cudaFreeHost, cudaNvSci, cudaNvSciWait, cudaGetDeviceCount, cudaMemcpyAsync, cudaStreamCreateWithFlags, cudaExternalMemoryGetMappedMipmappedArray, cudaStreamDestroy, cudaDeviceGetNvSciSyncAttributes, cudaDestroyTextureObject, cudaDestroyExternalMemory, cudaImportExternalMemory, cudaDestroyExternalSemaphore, cudaFreeMipmappedArray, cudaFree, cudaStreamSynchronize, cudaWaitExternalSemaphoresAsync, cudaImportNvSciSemaphore

Dependencies needed to build/run

NVSCI

Prerequisites

Download and install the CUDA Toolkit for your corresponding platform. Make sure the dependencies mentioned in Dependencies section above are installed.

On a QNX cross-build the NvSci headers and libraries come from the target filesystem, so pass -DTARGET_FS=/path/to/qnx/targetfs to cmake. Without it the build reports NvSCI not found and skips this sample. See the QNX build instructions.

References (for more details)