Enabling GPU Support for the COMPSs-Mobile Framework

Francesc Lordan, Rosa M. Badia, Wen-Mei HwuWACCPD@SC 2017 · DOI

TL;DR

This paper introduces an extension to the COMPSs-Mobile framework that enables mobile applications to leverage the computational power of embedded GPUs through OpenCL. This allows for significant performance improvements and energy savings by offloading intensive tasks from the CPU to the GPU, while abstracting away the complexities of GPU programming from the developer.

What Problem Does This Paper Address?

Mobile devices are increasingly equipped with powerful GPUs, but harnessing this computational power for general-purpose computing (GPGPU) within mobile applications has been challenging. Existing frameworks often require developers to write complex, hardware-specific code, and integrating GPU computation with cloud offloading adds another layer of complexity. This paper addresses the need for a unified, adaptive, and collaborative heterogeneous computing solution for mobile cloud environments that seamlessly integrates local GPU resources into existing mobile application development workflows.

Methods

The core contribution is the extension of the COMPSs-Mobile framework, a task-based programming model designed for mobile cloud computing. The authors extended COMPSs-Mobile to support offloading computation to GPUs via OpenCL. This involves:

  • OpenCL Kernel Integration: Developers can now annotate methods with @OpenCL to specify OpenCL kernels, pointing to the kernel source file instead of a Java class.
  • Generic Computing Platform: A new computing platform leveraging OpenCL was developed to manage the interaction with embedded GPUs. This platform handles data transfers between the CPU and GPU, kernel invocation, and result collection, abstracting these details from the programmer.
  • Runtime Adaptations: The COMPSs-Mobile runtime was modified to consider embedded OpenCL devices when assigning computing resources to tasks. This includes a revised policy for resource assignment that accounts for GPU availability and performance.
  • Optimization Techniques: The runtime implements optimizations such as reusing memory buffers and overlapping data transfers with kernel executions to minimize overhead and maximize performance.

Datasets

Not discussed in the paper. The paper focuses on evaluating the framework with three benchmark applications.

Key Insights and Ideas

  • Seamless GPU Integration: The framework successfully integrates GPU computation into a task-based programming model, allowing developers to benefit from GPGPU without explicit low-level GPU programming.
  • Performance and Energy Gains: Offloading tasks to the GPU significantly reduces execution time and energy consumption compared to CPU-only execution, even for applications without explicit task-level parallelism.
  • Optimization Impact: The implemented runtime optimizations (memory buffer reuse and transfer overlap) are crucial for maximizing GPU performance, especially in scenarios with high data transfer requirements.
  • Adaptive Load Balancing: The framework's ability to dynamically choose between CPU and GPU resources, and to optimize for performance or energy, offers flexibility and adaptability for mobile applications.

Key Results

The paper evaluates the proposed solution using three benchmark applications: Digits Recognition (DR), Bézier Surface (BS), and Canny Edge Detection (CED).

  • Digits Recognition (DR): GPU execution was up to 4.3x faster and consumed 27.8% less energy than CPU execution. Optimized GPU execution further reduced data transfer overhead from 1,531 ms to 5 ms.
  • Bézier Surface (BS): GPU execution was approximately 3x faster and consumed 54% less energy than CPU execution. The optimized RGPUO scenario achieved a 2.65x speedup and a 50.45% energy reduction compared to the CPU.
  • Canny Edge Detection (CED): GPU execution was up to 11.95x faster and consumed 87% less energy than CPU execution. The optimized RGPUO scenario achieved a significant speedup and energy reduction.

The paper also demonstrates the effectiveness of different load balancing policies (Static, DynPerf, DynEn), showing that dynamic policies can achieve performance comparable to static ones with less developer effort.

Limitations and Future Work

  • OpenCL Offloading: The current runtime system does not support offloading OpenCL code to remote nodes (cloud servers). The authors suggest this as a natural next step to further improve performance by leveraging cloud-based accelerators.
  • Dynamic Platform Assignment: While the current platform selection is based on task-scoped forecasts, the authors propose enhancing this by considering the overall execution impact and enabling dynamic re-assignment of pending tasks to optimize scheduling.
  • Energy Model Granularity: The energy model primarily considers computation and transfers from remote nodes, with transfers to device memory being negligible. Further refinement of the energy model could provide more nuanced insights.
  • Task Granularity: The performance benefits are more pronounced for applications with coarse-grain tasks, as data transfer overhead can become significant for very fine-grained tasks.

Summary updated

BibTeX
@inproceedings{lordan2017enabling,
  author = {Francesc Lordan and Rosa M. Badia and Wen-Mei Hwu},
  title = {{Enabling GPU Support for the COMPSs-Mobile Framework}},
  booktitle = {WACCPD@SC},
  year = {2017},
  doi = {10.1007/978-3-319-74896-2\_5},
}

Loading related content...

Figure