Bridging the Gap between Performance and Bounds of Cholesky Factorization on Heterogeneous Platforms

Emmanuel Agullo, Olivier Beaumont, Lionel Eyraud-Dubois, Julien Herrmann, Suraj Kumar, Loris Marchal, Samuel Thibault

TL;DR

This paper tackles the challenge of efficiently executing Cholesky factorization on modern heterogeneous computing platforms (CPUs + GPUs). The authors introduce improved theoretical performance bounds and demonstrate how incorporating static knowledge about task dependencies and resource suitability into dynamic schedulers can significantly close the gap between theoretical limits and actual performance.

What Problem Does This Paper Address?

Modern high-performance computing relies heavily on heterogeneous platforms, combining CPUs with accelerators like GPUs. However, optimizing complex numerical algorithms, such as Cholesky factorization, on these platforms is a significant challenge. The performance of different computational kernels (e.g., matrix multiplication vs. matrix factorization) varies drastically between CPUs and GPUs, making simple scheduling strategies ineffective. Existing dynamic schedulers, while flexible, often struggle to achieve performance close to theoretical bounds. This paper aims to bridge this gap by developing better theoretical bounds and exploring methods to improve dynamic scheduling by leveraging static information derived from the algorithm's structure.

Methods

The authors employ a multi-pronged approach:

  • Improved Theoretical Bounds: They introduce two new theoretical lower bounds for the makespan (total execution time) of Cholesky factorization:
  • Area Bound: A basic linear programming formulation that considers the total work and available resources, ignoring task dependencies.
  • Mixed Bound: An enhanced linear programming formulation that incorporates a critical path constraint, specifically accounting for the sequential nature of certain tasks (POTRF, TRSM, SYRK) on the critical path.
  • Dynamic Scheduling Analysis: They analyze the performance of existing dynamic schedulers within the StarPU runtime system, including a random scheduler, and two HEFT-like schedulers (dmda and dmdas).
  • Static Knowledge Integration: The core novelty lies in injecting static information into the dynamic scheduling process. This includes:
  • Constraint Programming (CP): Using CP to find near-optimal schedules, which are then used as a baseline or for simulation.
  • Task Affinity: Forcing specific kernels (e.g., GEMM, SYRK) to run on GPUs, or forcing certain TRSM kernels (those further from the diagonal) to run on CPUs, based on offline analysis.
  • Simulation and Actual Execution: Experiments are conducted using both the Simgrid simulator (to isolate performance from communication overhead) and actual executions on the "Mirage" machine.

Datasets

The paper does not introduce new datasets. Instead, it uses the Cholesky factorization of dense matrices of varying sizes (represented by the number of tiles, from 4x4 to 32x32) as its benchmark. The performance is evaluated based on the achieved GFLOP/s (Giga Floating-point Operations Per Second).

Key Insights and Ideas

  • GPU vs. CPU Strengths: GPUs excel at regular, compute-intensive kernels like GEMM and SYRK, while CPUs are relatively better for more irregular kernels like POTRF and certain TRSM operations, especially when considering data dependencies.
  • Limitations of Pure Dynamic Scheduling: Purely dynamic schedulers, even those based on heuristics like HEFT, can struggle with limited parallelism and task dependencies, leading to suboptimal resource utilization and performance gaps.
  • The Power of Static Knowledge: Injecting static information, derived from offline analysis of the task graph and resource characteristics, can significantly improve the performance of dynamic schedulers, bringing them closer to theoretical bounds.
  • Critical Path Matters: The "mixed bound" is more accurate than the basic "area bound" because it accounts for the critical path, highlighting the sequential bottlenecks in the computation.
  • TRSMs are Tricky: The placement of TRSM kernels is crucial. While GPUs are generally faster, forcing certain TRSMs (those far from the diagonal) onto CPUs can improve overall performance by better managing dependencies and avoiding GPU idle time.

Key Results

  • Improved Bounds: The proposed "mixed bound" provides a tighter theoretical upper bound on performance compared to simpler bounds.
  • Scheduler Performance: In heterogeneous scenarios, the random scheduler performs poorly. HEFT-like schedulers (dmda, dmdas) perform significantly better.
  • Static Knowledge Impact:
    • Forcing TRSM kernels further from the diagonal onto CPUs yielded the best performance in simulation for small and medium matrices, outperforming standard HEFT-like schedulers.
  • Actual execution of this static knowledge strategy also showed performance improvements.
  • Simulation vs. Reality: Simulation (with communication costs removed) provides a good estimate of actual performance, especially for evaluating scheduling strategies, and helps to understand the gap between theoretical bounds and achieved performance. The gap between the mixed bound and simulated performance was significant for small and medium matrices.

Limitations and Future Work

  • Constraint Programming Scalability: The constraint programming approach, while capable of finding near-optimal solutions, becomes computationally intractable for large matrix sizes, preventing it from providing true performance bounds in those cases.
  • Data Transfer Complexity: The CP formulation used in the paper did not account for data transfer times, which is a limitation for actual execution. The authors acknowledge that incorporating data transfers makes the problem intractable.
  • Future Work:
    • Extending the CP formulation to partially account for data transfers for real executions.
  • Applying the methodology to other dense linear algebra algorithms (e.g., QR, LU) and more irregular applications (e.g., sparse linear algebra, FMM).
  • Generalizing and formalizing the application-specific scheduling hints to enable easier analysis and optimization by scheduling experts.
  • Integrating the developed techniques into the StarPU runtime system and Chameleon library.

Summary updated

BibTeX
@inproceedings{agullo2015bridging,
  author = {Emmanuel Agullo and Olivier Beaumont and Lionel Eyraud-Dubois and Julien Herrmann and Suraj Kumar and Loris Marchal and Samuel Thibault},
  title = {{Bridging the Gap between Performance and Bounds of Cholesky Factorization on Heterogeneous Platforms}},
  booktitle = {Workshops @ IPDPS},
  year = {2015},
  url = {https://openreview.net/forum?id=7nlN08M4-C},
}
Figure