Multitask and Transfer Learning for Autotuning Exascale Applications

Wissam M. Sid-Lakhdar, Mohsen Mahmoudi Aznaveh, Xiaoye S. Li, James Weldon DemmelarXiv 2019

Abstract

Autotuning high-performance computing (HPC) applications is a critical but computationally expensive process, particularly for exascale systems where a single evaluation can consume thousands of core-hours. Traditional autotuners often treat each new problem size or hardware configuration as an independent task, failing to leverage historical performance data. This paper presents a framework utilizing multitask and transfer learning to share knowledge across related tuning tasks. By employing Multi-Output Gaussian Processes, the proposed Multitask Learning Autotuning (MLA) and Transfer Learning Autotuning (TLA) variants achieve an average 1.5x speedup in application runtime compared to state-of-the-art tuners while significantly reducing the number of required trial runs.

Introduction

In the exascale era, software parameters such as block sizes, thread counts, and MPI process grids must be meticulously tuned to achieve peak performance. However, the high cost of running these massive simulations makes traditional "start-from-scratch" autotuning methods, such as OpenTuner or HpBandSter, impractical. These methods often require hundreds of evaluations to find an optimum, a luxury researchers cannot afford when dealing with expensive exascale applications.

The core challenge addressed here is bridging the gap between isolated tuning tasks. By allowing tuners to "remember" performance patterns from previous tasks and apply that knowledge to new, unseen configurations, the search for optimal parameters can be made significantly more efficient.

Methodology

The proposed framework introduces three primary strategies for knowledge sharing:

  1. Multitask Learning Autotuning (MLA): Instead of independent performance models, MLA utilizes a Multi-Output Gaussian Process (MOGP) based on the Linear Coregionalization Model. This approach learns the correlations between different tasks (e.g., different matrix sizes) simultaneously. If two tasks exhibit similar performance behaviors, the model shares information to reduce uncertainty across the search space.
  2. Transfer Learning Autotuning 1 (TLA1): This "run-free" approach builds a model to directly predict the optimal parameters for a new task based on the history of previously tuned tasks. It requires zero new evaluations of the target application, relying entirely on interpolation from the task history.
  3. Transfer Learning Autotuning 2 (TLA2): Building upon TLA1, this method uses the TLA1 prediction as a starting point for a "centered sampling" strategy. It then performs a limited number of new evaluations to fine-tune the result for the specific characteristics of the new task.

All variants utilize the Efficient Global Optimization (EGO) algorithm, which uses the model’s predicted confidence intervals to balance the exploration of unknown parameter regions with the exploitation of known high-performance areas.

Experimental Setup

The framework was evaluated using the ScaLAPACK PDGEQRF routine, a standard QR factorization benchmark. Experiments were conducted on the "Edison" supercomputer (Intel Ivy Bridge nodes) and the "Ada" cluster. The tuning process involved navigating a complex task and input space, as detailed in the notation table below.

Table of general and ScaLAPACK-specific notations used in the autotuning framework.

The task space included varying matrix sizes (up to 20,000 x 20,000) and hardware configurations (up to 128 nodes). The input space consisted of six critical tuning parameters: row and column block sizes ($mb, nb$), thread counts ($nth$), and process grid dimensions ($p, q$).

Key Results and Discussion

The multitask approach demonstrated significant advantages over traditional methods:

  • Superior Optimization: MLA outperformed OpenTuner and HpBandSter in 84% to 94% of the test cases, finding faster configurations within the same evaluation budget.
  • Runtime Efficiency: Applications tuned with MLA achieved an average 1.5x speedup, with some specific cases reaching up to 5x faster runtimes than those tuned by standard tools.
  • Zero-Run Viability: TLA1 (the run-free model) matched OpenTuner's best results in 50% of cases, despite OpenTuner having a budget of 100 actual runs. This suggests that performance landscapes are sufficiently continuous that optimal configurations can often be predicted through interpolation.
  • Low-Budget Success: In scenarios restricted to only 100 runs—typical for exascale environments—TLA2 consistently identified near-optimal settings that brute-force or meta-heuristic methods failed to find.

Conclusion and Future Work

By treating autotuning as a collective learning problem rather than a series of isolated events, the MLA/TLA framework dramatically reduces the cost of optimizing HPC applications. Future research will focus on addressing the cubic computational complexity of Gaussian Processes through deeper sparse approximations and exploring Random Forests to better handle categorical parameters. Additionally, the authors aim to apply these methods to more irregular problems, such as sparse matrix solvers, where the task space is defined by complex matrix structures rather than simple dimensions.

Summary updated

BibTeX
@misc{sidlakhdar2019multitask,
  author = {Wissam M. Sid-Lakhdar and Mohsen Mahmoudi Aznaveh and Xiaoye S. Li and James Weldon Demmel},
  title = {{Multitask and Transfer Learning for Autotuning Exascale Applications}},
  year = {2019},
  eprint = {1908.05792},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.05792},
}
Figure