CID: A Compile-Time Implementation Decider for Heterogeneous Platforms Based on C++ Attributes
Luis Miguel Sánchez, David del Rio Astorga, Manuel F. Dolz, Javier Fernández · 2016
With the emergence of heterogeneous architectures, the development of parallel software has become an increasingly complex issue. The fact of using multiple programming models targeted to specific devices has turned the implementation process into a challenging task that comes along with a variety of difficulties. In this sense, developers are preoccupied with finding ways to alleviate the burden when optimizing applications manually for this kind of architectures. To remedy this situation, two directions have been traditionally taken: i) unified programming models, allowing the execution of kernels on a broad range of devices,, ii) device-specific libraries, offering common interfaces for different programming models. To pave the way in the latter direction, we present CID, a C++ attribute-based tool offering a single interface to better exploit resources provided by heterogeneous systems. Specifically, this tool selects at compile time the tuple device-implementation that delivers the best performance on a given platform. This process makes selections using a profile-guided optimization approach, past knowledge gained from previous executions. To evaluate the benefits of this tool, we analyze its performance on two different scenarios. The experimental results demonstrate that CID allows enhancing performance while minimizing efforts needed to tune applications running on heterogeneous platforms.