Thrust2D: A new design abstraction framework for structured grid class of algorithms. (17th July 2018) - Sarkar, Santonu; George, Ajai V; Manoj, Sankar
Summary: An important goal of structured parallel programming has been to provide a design framework that balances between the extent of abstraction built over the hardware and the amount of control given to the programmer to leverage the hardware resource features. Towards this goal, NVIDIA has released an open‐source design framework called Thrust based on C++ STL, where the developers can express the functionality in STL style, without having to know the architectural details of the underlying parallel infrastructure. While the framework is generic and portable, it does not support the right abstraction for two‐dimensional data, which is heavily used in most of the popular parallel algorithms. In this paper, we proposed Thrust2D, an extension of Thrust to support the abstraction for two‐dimensional data, targeted towards structured grid class of applications. We took several structured grid examples from Rodinia benchmark, OpenCV framework, and NVIDIA samples and rewrote them using Thrust2D. We demonstrated that, in some cases, we get nearly 80% reduction in code complexity, and for 12 out of 17 applications we have tested, the kernel performance of Thrust2D versions are well within 85% of the native CUDA versions. When we consider the total execution time, 14 out of 17 Thrust2D versions performance are within 85% of the native CUDA versions. In some cases, the performance of the Thrust2D versions has outperformed the native versions.