CUDPP Documentation
1.0 alpha
CUDPP is the CUDA Data Parallel Primitives Library. CUDPP is a library of data-parallel algorithm primitives such as parallel-prefix-sum ("scan"), parallel sort and parallel reduction. Primitives such as these are important building blocks for a wide variety of data-parallel algorithms, including sorting, stream compaction, and building data structures such as trees and summed-area tables.
Homepage for CUDPP:
http://www.gpgpu.org/developer/cudpp/
Announcements and discussion of CUDPP are hosted on the CUDPP Google Group.
You may want to start by browsing the
CUDPP Public Interface. For information on building CUDPP, see
Building CUDPP.
The "apps" subdirectory included with CUDPP has a few source code samples that use CUDPP:
- simpleCUDPP, a simple example of using cudppScan()
- satGL, an example of using cudppMultiScan() to generate a summed-area table of a scene rendered in real time. The SAT is then used to simulate depth of field.
- cudpp_testrig, a comprehensive test application for all the functionality of CUDPP
We have also provided a code walkthrough of the simpleCUDPP example.
For specific release details see the
Change Log.
- Note:
- This release (1.0 alpha) should be considered alpha code. Some of the features, including the entire "plan" interface, are being released for the first time and may need to change as real users find problems with them. We expect to lock down the public interface by the time we get to the full 1.0 release in the near future.
This release (1.0 alpha) has been thoroughly tested on the following OSes.
- Windows XP (32-bit) (CUDA 2.0)
- Redhat Enterprise Linux 5 (RHEL 5 x86_64, 64-bit) (CUDA 2.0)
- and Mac OS X 10.5.2 (Leopard) (CUDA 1.1)
It has additionally been partially tested (via the CUDA SDK samples that use it) on the following OSes.
- Windows XP (64-bit) (CUDA 2.0)
- Windows Vista (32-bit and 64-bit) (CUDA 2.0)
- Redhat Enterprise Linux 4 (RHEL 4 x86, 32-bit) (CUDA 2.0)
We expect CUDPP to build and run correctly on other flavors of Linux, but these are not actively tested by the developers at this time.
CUDPP is implemented in
NVIDIA CUDA. It requires the CUDA Toolkit version 1.1 or later. Please see the NVIDIA
CUDA homepage to download CUDA as well as the CUDA Programming Guide and CUDA SDK, which includes many CUDA code examples. Two of the samples in the CUDA SDK ("marchingCubes" also "lineOfSight") also use CUDPP.
Design goals for CUDPP include:
- Performance. We aim to provide best-of-class performance for our primitives. We welcome suggestions and contributions that will improve CUDPP performance. We also want to provide primitives that can be easily benchmarked, and compared against other implementations on GPUs and other processors.
- Modularity. We want our primitives to be easily included in other applications. To that end we have made the following design decisions:
- CUDPP is provided as a library that can link against other applications.
- CUDPP calls run on the GPU on GPU data. Thus they can be used as standalone calls on the GPU (on GPU data initialized by the calling application) and, more importantly, as GPU components in larger CPU/GPU applications.
- CUDPP is implemented as 4 layers:
- The Public Interface is the external library interface, which is the intended entry point for most applications. The public interface calls into the Application-Level API.
- The Application-Level API comprises functions callable from CPU code. These functions execute code jointly on the CPU (host) and the GPU by calling into the Kernel-Level API below them.
- The Kernel-Level API comprises functions that run entirely on the GPU across an entire grid of thread blocks. These functions may call into the CTA-Level API below them.
- The CTA-Level API comprises functions that run entirely on the GPU within a single Cooperative Thread Array (CTA, aka thread block). These are low-level functions that implement core data-parallel algorithms, typically by processing data within shared (CUDA
__shared__) memory.
Programmers may use any of the lower three CUDPP layers in their own programs by building the source directly into their application. However, the typical usage of CUDPP is to link to the library and invoke functions in the CUDPP Public Interface, as in the simpleCUDPP, satGL, and cudpp_testrig application examples included in the CUDPP distribution.
In the future, if and when CUDA supports building device-level libraries, we hope to enhance CUDPP to ease the use of CUDPP internal algorithms at all levels.
We expect the normal use of CUDPP will be in one of two ways:
- Linking the CUDPP library against another application.
- Running our "test" application, cudpp_testrig, that exercises CUDPP functionality.
The following publications describe work incorporated in CUDPP.
- Mark Harris, Shubhabrata Sengupta, and John D. Owens. "Parallel Prefix Sum (Scan) with CUDA". In Hubert Nguyen, editor, GPU Gems 3, chapter 39, pages 851–876. Addison Wesley, August 2007. http://graphics.idav.ucdavis.edu/publications/print_pub?pub_id=916
- Shubhabrata Sengupta, Mark Harris, Yao Zhang, and John D. Owens. "Scan Primitives for GPU Computing". In Graphics Hardware 2007, pages 97–106, August 2007. http://graphics.idav.ucdavis.edu/publications/print_pub?pub_id=915
- Mark Harris, NVIDIA Ltd.
- John D. Owens, University of California, Davis
- Shubho Sengupta, University of California, Davis
- Yao Zhang, University of California, Davis
- Andrew Davidson, Louisiana State University
Thanks to Jim Ahrens, Timo Aila, Ian Buck, Guy Blelloch, Jeff Bolz, Michael Garland, Jeff Inman, Eric Lengyel, Samuli Laine, David Luebke, Pat McCormick, and Richard Vuduc for their contributions during the development of this library.
CUDPP Developers from UC Davis thank their funding agencies:
- Department of Energy Early Career Principal Investigator Award DE-FG02-04ER25609
- SciDAC Institute for Ultrascale Visualization (http://www.iusv.org/)
- Los Alamos National Laboratory
- National Science Foundation (grant 0541448)
- Generous hardware donations from NVIDIA
CUDPP is copyright The Regents of the University of California, Davis campus and NVIDIA Corporation. The license is a modified version of the BSD license, designed to encourage reuse of this software in other projects, both commercial and non-commercial. A portion of the code is copyright NVIDIA Corporation alone, and the remainder is copyright NVIDIA and UC Davis. The portion that are copyright NVIDIA alone (license_nv.txt) have essentially the same license as the rest (license.txt), but with some details of academic funding agencies removed. For details, please see the
CUDPP License page.