CUDA Samples is a collection of code examples that demonstrate features in the CUDA Toolkit for GPU-accelerated computing.
The samples address the need for developers to learn and understand how to use CUDA capabilities through practical, working examples. The approach provides runnable code that covers CUDA driver API, kernel development, and integration with graphics libraries like OpenGL and Vulkan. Each sample is self-contained and demonstrates a specific feature or technique, allowing developers to study implementations and adapt them for their own projects.
Developers adopting these samples should have the CUDA Toolkit installed on their system. The collection suits anyone learning CUDA programming, from beginners exploring basic kernel execution to advanced developers working with domain-specific applications or platform-specific optimizations. The samples are particularly valuable for understanding how to structure CUDA code, manage GPU memory, and integrate GPU computation with graphics pipelines. The project provides examples across multiple categories including basic operations, algorithm implementations, domain-specific computing, and platform-specific code for Tegra devices.
The project maintains a structured build system using CMake, supporting compilation on Linux and Windows as well as cross-compilation for embedded Tegra platforms. The samples are organized by complexity and application domain, with clear prerequisites and build instructions documented for each platform. The repository includes a changelog tracking revisions and updates to keep examples aligned with current CUDA Toolkit capabilities.