Static versus Dynamic Memory Allocation: a Comparison for Linear Algebra Kernels - INRIA - Institut National de Recherche en Informatique et en Automatique Accéder directement au contenu
Communication Dans Un Congrès Année : 2020

Static versus Dynamic Memory Allocation: a Comparison for Linear Algebra Kernels

Résumé

The polyhedral model permits to automatically improve data locality and enable parallelism of regular linear algebra kernels. In previous work we have proposed a new data structure, 2d-packed layout, to store only the non-zeros elements of regular sparse (triangular and banded) matrices dynamically allocated for different basic linear algebra operations, and used Pluto to parallelize and optimize them. To our surprise, there were huge discrepancies in our measures of these kernels execution times that were due to the allocation mode: as statically declared arrays or as dynamically allocated arrays of pointers. In this paper we compare the performance of various linear algebra kernels, including some linear algebra kernels from the PolyBench suite, using different array allocation modes. We present our detailed investigation of the possible reasons of the performance variation on two different architectures: a dual 12-cores AMD (Magny-Cours) and a dual 10-cores Intel Xeon (Haswell-EP). We conclude that static or dynamic memory allocation has an impact on performance in many cases, and that the processor architecture and the gcc compiler's decisions can provoke significant and sometimes surprising variations, in favor of one or the other allocation mode.
Fichier principal
Vignette du fichier
IMPACT_2020_paper_9 (1).pdf (564.73 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-02456533 , version 1 (27-01-2020)

Identifiants

  • HAL Id : hal-02456533 , version 1

Citer

Toufik Baroudi, Vincent Loechner, Rachid Seghir. Static versus Dynamic Memory Allocation: a Comparison for Linear Algebra Kernels. IMPACT 2020, in conjunction with HiPEAC 2020, Jan 2020, Bologna, Italy. ⟨hal-02456533⟩
139 Consultations
279 Téléchargements

Partager

Gmail Facebook X LinkedIn More