Abstract
Modern mobile and low-power devices increasingly utilize Asymmetric Multicore Processors (AMPs) to balance performance and energy efficiency. However, standard high-performance computing (HPC) libraries often suffer from significant load imbalances on these architectures. This paper presents a strategy for optimizing dense linear algebra libraries (BLAS and LAPACK) specifically for AMPs. By employing a two-tiered parallelization strategy within the BLIS framework—dynamic workload distribution across heterogeneous core types and static repartitioning within clusters—the authors achieve performance levels reaching 93% of the theoretical peak on the Samsung Exynos 5422 SoC.
Introduction
Most high-performance computing (HPC) libraries are designed for symmetric processors where every core is identical. In contrast, modern mobile and low-power devices often use Asymmetric Multicore Processors (AMPs), such as ARM’s big.LITTLE architecture, which pair "fast/power-hungry" cores with "slow/energy-efficient" ones.
When running standard multi-threaded libraries on an AMP, fast cores frequently idle while waiting for slow cores to finish their assigned tasks, leading to a classic load imbalance problem. While complex runtime systems can manage tasks, rewriting entire libraries like LAPACK to be "task-aware" is a massive undertaking. This research explores whether the complexity of asymmetry can be encapsulated within the BLAS layer so that legacy software like LAPACK benefits automatically.
Methodology
The authors built their solution on the BLIS (BLAS-like Library Instantiation Software) framework. Their approach involves three main components:
- Two-Tiered Parallelization:
- Coarse-grain (Dynamic): The middle loop of the matrix multiplication algorithm (Loop 3) is parallelized using a dynamic scheduler. This allows the "big" cores to automatically grab more work units than the "LITTLE" cores.
- Fine-grain (Static): Within each cluster of identical cores, static scheduling is used for the inner loops (Loops 4 or 5) to minimize synchronization overhead.
- Cache Optimization: Cache configuration parameters ($m_c, n_c, k_c$) were manually tuned specifically for the Cortex-A15 and Cortex-A7 architectures to ensure data remains in the L1/L2 caches during computation.
- Shape-Aware Tuning: Recognizing that LAPACK often calls BLAS with rectangular matrices, the authors adjusted scheduling strategies and cache block sizes to maintain load balance even when one matrix dimension is small.
Experimental Setup
The study utilized the Samsung Exynos 5422 SoC on an ODROID-XU3 board. This architecture features a cluster of four high-performance Cortex-A15 cores and a cluster of four energy-efficient Cortex-A7 cores.
Performance was evaluated using standard numerical benchmarks, including Level-3 BLAS kernels (GEMM, SYMM, TRMM, TRSM, SYRK, SYR2K) and LAPACK routines such as Cholesky factorization (POTRF), LU factorization (GETRF), and reduction to tridiagonal form (SYTRD).
Key Results and Insights
- Peak Efficiency: For square matrix multiplication (GEMM), the optimized library achieved 12.7 GFLOPS, roughly 93% of the ideal peak performance for the hardware. The
POTRFroutine also reached ~93% efficiency as it is dominated by theSYRKkernel. - The "D3S4" Strategy: The most effective parallelization strategy (dubbed D3S4) involves dynamic scheduling at Loop 3 and static scheduling at Loop 4, providing the best balance between flexibility and low overhead.
- Architectural Bottlenecks:
GETRF(LU) reached only 84% of the ideal peak due to the sequential nature of the "panel factorization" step. Furthermore, routines relying on Level-2 BLAS (matrix-vector), likeSYTRD, performed poorly as they are limited by memory bandwidth rather than raw computational power.
Conclusion
This work demonstrates that a two-tiered parallelization strategy within the BLAS layer can effectively mitigate the performance penalties of processor asymmetry. While Level-3 BLAS routines see massive gains, future work is required to address memory-bound Level-2 BLAS routines and sequential bottlenecks in LU and QR factorizations through "look-ahead" strategies.
Summary updated