OpenCL for Physics Applications

Introduction

Hetherogeneous computing techniques are a possible way in which the calculations performed in the typical HEP applications can be speeded up.  Several types of accelerators like GPGPUS or Intel MIC appeared or are going to appear on the market - it is therefore crucial to understand if critical algorithms used in the HEP data processing can be re-implemented so to be executed on such accelerators.

One general way in which the programmer can take advantage of an accelerator is OpenCL. The OpenCL standard defines a framework and programming language (basically C99) for parallel computation on heterogeneous systems. This standard is maintained by the Khronos Group and supported by a large group of industry leaders: for example Apple, Intel, AMD, NVIDIA, ARM. The idea behind OpenCL is to provide a hardware abstraction and provide an uniform interface to CPUs, (GP)GPUs, cell-type architectures or DSPs.

Goals

  • Implement an abstraction layer of the OpenCL API to seamlessly integrate the development of OpenCL Compute Kernel
  • Provide high-level C++ classes to ease the memory management of OpenCL
  • Implement selected parts of the CMS reconstruction outside the CMS software FW as
    OpenCL Kernels to quantify the possible gains
  • Assess the portability of the current setup when running on GPU
  • Quantify the ability of OpenCL to exploit the CPU's vector unit in real-world examples
  • Compare the CPU and GPU performance of the same Kernel
  • Test the multi-core scalability of Intel's OpenCL SDK with many cores

Progress

A real-life algorithm coming from the CMS track reconstruction, the multiple scattering updator, was implemented in the form of an OpenCL kernel. The performance on CPU and GPU was measured in terms of runtime, data transfer overhead and scalability. The promise of portability of OpenCL is maintained: the same code is smoothly executed on Intel and AMD CPUs and NVidia and AMD GPUs.
While the development based of bare OpenCL within a typical HEP software framework could result cumbersome, especially because of the variety of computer skills present in a big collaboration like Atlas or CMS, the usage of wrappers and interfaces based on OpenClam are proved to be really handy.

Material

  1. Status and future plans for software technology demonstrators, T. Hauth, October 10th 2012
  2. Evaluation of OpenCL for High Energy Physics Event Reconstruction, D. Piparo, March 14th 2012
  3. OpenCL for Physics Applications, T. Hauth, January 11th 2012

Related Topics

  1. Real-time Low Level Trigger using GPUs demonstrator
  2. First experiences with the Intel MIC processor, F. Giacomini, June 20th 2012