Chapter 2: Correctness, accuracy, and debugging
Abstract
One prerequisite to performance optimization is to first ensure the code is getting the correct results. We discuss two aspects of correctness in this chapter: the first concerns accuracy issues inherent in any floating-point computation performed in parallel, and the second is tools, such as cuda-gdb and cuda-memcheck, that can aid in correcting programming errors.
Keywords
Accuracy; cuda-gdb; cuda-memcheck
Before we can address performance optimization on the GPU, there are several preliminary steps that need to be performed. The first is verifying correctness of the results obtained from the GPU. We discuss two aspects of correctness in this chapter. The first aspect concerns numerical accuracy ...
Get CUDA Fortran for Scientists and Engineers, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.