Architecture-Aware Configuration and Scheduling of Matrix Multiplication on Asymmetric Multicore Processors

Sandra Catalán, Francisco D. Igual, Rafael Mayo, Rafael Rodríguez-Sánchez, Enrique S. Quintana-Ortí

Abstract

Asymmetric Multicore Processors (AMPs), such as ARM’s big.LITTLE architecture, offer a balance between high performance and energy efficiency. However, standard high-performance computing libraries often fail to exploit this heterogeneity, leading to workload imbalances and cache inefficiencies. This paper presents architecture-aware optimizations for General Matrix Multiplication (GEMM) within the BLIS framework. By implementing dual control trees with core-specific cache parameters and dynamic scheduling, the authors achieve performance near theoretical peaks, significantly outperforming architecture-oblivious implementations.

Introduction

Asymmetric Multicore Processors (AMPs) integrate high-performance "big" cores with energy-efficient "LITTLE" cores. While this design is ideal for mobile and embedded systems, it poses significant challenges for high-performance computing (HPC) software. Standard libraries like the Basic Linear Algebra Subprograms (BLAS) typically assume symmetric hardware. On an AMP, this leads to two primary issues:

  1. Workload Imbalance: Equal work distribution causes fast cores to idle while waiting for slower cores to complete their tasks.
  2. Cache Mismatch: High-performance math libraries use specific "blocking" parameters (strides) tuned for a specific cache size. Using parameters tuned for a big core on a LITTLE core (which has a much smaller cache) leads to massive performance degradation due to cache misses.

Methodology

The authors address these challenges by modifying the BLIS (BLAS-like Library Instantiation Software) framework. BLIS decomposes GEMM into five nested loops around a high-performance "micro-kernel."

The BLIS framework's hierarchical approach to matrix multiplication, showing data movement between memory, caches, and registers.

To optimize for AMPs, the following strategies were implemented:

  • Cache-Aware Configuration: Optimal cache blocking parameters ($m_c$ and $k_c$) were empirically determined for both Cortex-A15 (big) and Cortex-A7 (LITTLE) cores to ensure the working sets fit within their respective L2 caches.
  • Dual Control Trees: Unlike standard BLIS, which uses one set of parameters for all threads, this implementation uses two distinct "control trees" simultaneously—one for the big cluster and one for the LITTLE cluster—each with its own optimized cache strides.
  • Scheduling Strategies:
    • Static-Asymmetric Scheduling (SAS): Partitions the iteration space based on a fixed performance ratio (e.g., assigning 5x more work to a big core than a LITTLE core).
  • Dynamic-Asymmetric Scheduling (DAS): A more robust approach where clusters "pull" work as they become available, allowing the system to self-balance despite frequency scaling or system noise.

Key Insights and Results

The implementation was evaluated on a Samsung Exynos 5422 SoC (ODROID-XU3 board) featuring four Cortex-A15 and four Cortex-A7 cores.

  • The "Symmetry Penalty": Using all 8 cores with a standard symmetric schedule is actually worse than using only the 4 big cores. The naive 8-core approach delivered only 40% of the performance of the 4-core big cluster because the big cores spent most of their time polling/waiting for the slow cores.
  • Performance Gains: The optimized architecture-aware versions achieved a ~20% performance increase over using the big cluster alone, reaching levels very close to the theoretical "Ideal" scenario (the sum of the peak performance of both clusters in isolation).
  • Energy Efficiency: When properly balanced, the AMP system delivers the same GFLOPS/W as the big cluster alone but with higher total throughput. Conversely, an unbalanced (naive) schedule results in the worst energy efficiency because fast cores consume power while idling.

Limitations and Future Work

While successful, the study identifies several areas for further improvement. The current implementation uses the same micro-kernel for both core types; using architecture-specific micro-kernels could yield further gains. Additionally, while GEMM is a fundamental building block, other Level-3 BLAS operations (like TRSM or SYRK) remain to be tested. Finally, porting these strategies to modern 64-bit ARMv8 architectures is a key next step for broader applicability.

Summary updated

BibTeX
@article{catalan2016architecture,
  author = {Sandra Catalán and Francisco D. Igual and Rafael Mayo and Rafael Rodríguez-Sánchez and Enrique S. Quintana-Ortí},
  title = {{Architecture-Aware Configuration and Scheduling of Matrix Multiplication on Asymmetric Multicore Processors}},
  journal = {Clust. Comput.},
  year = {2016},
  doi = {10.1007/s10586-016-0611-8},
}
Figure