Skip to main content
QUICK REVIEW

[Paper Review] Performance Modeling for Dense Linear Algebra

Elmar Peise, Paolo Bientinesi|arXiv (Cornell University)|Sep 11, 2012
Machine Learning and Data ClassificationComputer Science6 references6 citations
TL;DR

This paper presents an automated framework for performance modeling of dense linear algebra routines by generating statistical models of BLAS and LAPACK kernels. By evaluating and combining these models, the approach accurately ranks algorithmic variants and tunes block-size parameters without runtime execution, achieving high prediction accuracy across single- and multi-core systems.

ABSTRACT

It is well known that the behavior of dense linear algebra algorithms is greatly influenced by factors like target architecture, underlying libraries and even problem size; because of this, the accurate prediction of their performance is a real challenge. In this article, we are not interested in creating accurate models for a given algorithm, but in correctly ranking a set of equivalent algorithms according to their performance. Aware of the hierarchical structure of dense linear algebra routines, we approach the problem by developing a framework for the automatic generation of statistical performance models for BLAS and LAPACK libraries. This allows us to obtain predictions through evaluating and combining such models. We demonstrate that our approach is successful in both single- and multi-core environments, not only in the ranking of algorithms but also in tuning their parameters.

Motivation & Objective

  • To automatically generate accurate performance models for BLAS and LAPACK kernels as building blocks for higher-level algorithms.
  • To predict and rank the performance of equivalent algorithmic variants in dense linear algebra without executing them.
  • To optimize algorithmic configuration, particularly block-size, based on model predictions rather than empirical benchmarking.
  • To enable efficient selection of the fastest algorithm and optimal parameters across diverse architectures and problem sizes.

Proposed method

  • Develop a tool called the Modeler that automatically generates analytical performance models for BLAS kernels using empirical measurements.
  • Construct piecewise polynomial models for performance metrics (e.g., efficiency) based on measured data from different problem sizes and block-sizes.
  • Store generated models in a persistent, accessible repository for reuse and evaluation.
  • Predict the performance of higher-level algorithms by evaluating and combining the performance models of their constituent BLAS operations.
  • Use model evaluation to rank algorithmic variants and identify optimal block-size configurations.
  • Apply two modeling strategies—favoring speed or accuracy—depending on the use case.

Experimental results

Research questions

  • RQ1Can performance models for BLAS and LAPACK kernels be automatically generated with sufficient accuracy to predict higher-level algorithm performance?
  • RQ2Can these models correctly rank multiple algorithmic variants of dense linear algebra operations based on performance without runtime execution?
  • RQ3Can the framework accurately predict the optimal block-size for a given algorithm and architecture?
  • RQ4How well do the predicted performance rankings match actual measurements across single-core and multi-core systems?

Key findings

  • The performance models accurately predict the relative efficiency of algorithmic variants, correctly ranking them across different problem sizes and architectures.
  • For the lower triangular matrix inversion, the model correctly identifies variant 3 as the most efficient for large matrices, matching experimental results.
  • The model predicts optimal block-sizes close to 100 for variants 1, 2, and 3, aligning with observed performance peaks.
  • In the multi-core setting, the model correctly captures performance crossovers between variants and predicts that variants 1 and 2 outperform variant 3 at larger matrix sizes.
  • For the Sylvester equation solver, the model successfully separates the 16 variants into high- and low-performance groups, correctly identifying the top four performers (variants 1, 2, 5, and 6).
  • Despite individual model inaccuracies, the combined predictions achieve high predictive power for ranking and configuration tuning, with efficiency predictions closely matching experimental measurements.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.