Chipmaker NVIDIA has released CUDA 5, its latest and greatest toolkit for GPU computing. This new version adds Kepler hardware support for the supercomputing crowd as well as extra functionality to boost developer productivity. CUDA 5 is being launched just a few months ahead of the new K20 GPU, which is scheduled to be available before the end of the year.
Supporting advanced hardware features and increasing developing friendliness have always been a priority for the CUDA software engineers, but with Intel’s Xeon Phi and its built-in support in Parallel Studio expected to be released about the same time as the K20, there is an additional incentive for NVIDIA to make its programming platform more CPU-like.
The CUDA 5 release candidate has been out since spring, so GPU computing enthusiasts already have a taste of what it can do. Will Ramey, senior product manager of the NVIDIA’s GPU Computing Software group, says from the level of interest he’s seen from the early release, he’s expecting it to have a significant impact. “I believe this is going to be our most successful and widely used CUDA release ever,” he told HPCwire.
As far as the Kepler hardware goes, CUDA 5 will support the new “dynamic parallelism” and RDMA-enabled GPUDirect – two significant additions that the new Kepler chips will bring to high performance computing. For most programmers, the first feature will have a more far-reaching impact on application development. Dynamic parallelism allows the GPU to spawn its own threads, rather than having to rely on the CPU host to do it. That means a whole host of codes that used to require too much CPU-GPU interaction to make for a feasible port, can now be transitioned to the Kepler GPUs without the constraint of the communication overhead.
To make that type of code development more comfortable, NVIDIA has come up with GPU callable libraries, whose routines can be called natively from the application code running on the graphics processor. Prior to this, all the standard libraries were callable from the host side only, which made sense since prior to dynamic parallelism, the CPU was in charge of the application’s control flow. The design allows for plug-in APIs and callbacks, which enables developers to extend the capabilities of these routines even further.
NVIDIA is getting the ball rolling here by providing its own CUDA BLAS (Basic Linear Algebra Subroutines) package as a callable library. But the more significant impact is that it will allow ISVs and third-party developers to create these libraries as well, and build up a set of kernel packages, which can be shared more widely across the GPU computing ecosystem
Further, these callable libraries can be compiled separately, just as you would in a typical CPU build environment (Prior to this, all the code for a GPU app had to compiled together as monolithic source deck.) So you can build a GPU kernel from a number of source files and just link the individual objects at build time. This particular feature has no dependency on the Kepler GPUs and dynamic parallelism, so it’s applicable to the Fermi generation GPUs as well.
Because you can compile each source file individually, developers can enjoy significantly faster turnaround during intensive software development. According to Ramey, one NVIDIA customer had an application that encapsulated around 47,000 lines of code, and if just a single line was changed, it took around a minute to recompile all the sources. With this capability, the customer’s library recompilation now takes about four seconds.
The GPUDirect feature, which includes a hardware assist for RDMA, is also supported in the CUDA 5 software. It allows code that runs in the GPU to exchange data with other GPUs or any PCIe devices, without needing to coordinate it through the CPU host (although GPUDirect-aware software is also required for the PCIe device). That saves time for both the CPU and GPU.
With GPUDirect, InfiniBand host adapters and PCIe-connected sensors can take advantage of the RDMA acceleration by talking directly with the GPU. GE already has some of this technology working with some of its embedded systems outfitted with custom sensors that stream data into the graphics chip.
The final big addition in CUDA 5 is support for Linux and Mac OS development via an integration of NVIDIA’s Nsight development environment for Linux with the open source Eclipse IDE. CUDA 4 offered a shrink-wrapped development environment for Windows via a Visual Studio integration, but Linux users were left to cobble something together themselves. With CUDA 5, compiling, debugging, performance analysis, and other dev tools are now integrated into the Eclipse interface, providing a much more user-friendly interface for Linux developers.
As with the CUDA toolkits that went before it, this fifth generation is backward compatible all the way to the first G80 CUDA chip, when NVIDIA started its GPU computing push in earnest. As such, this latest version can target over 450 million GPUs in the field today. And since CUDA is free for the taking from NVIDIA’s developer site, there’s not much of a downside to pulling in this latest upgrade.