Static versus Dynamic Memory Allocation: a Comparison for Linear Algebra Kernels - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2020

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

Abstract

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
Origin : Files produced by the author(s)
Loading...

Dates and versions

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

Identifiers

  • HAL Id : hal-02456533 , version 1

Cite

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⟩
137 View
263 Download

Share

Gmail Facebook X LinkedIn More