Skip to Main content Skip to Navigation
Conference papers

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.
Complete list of metadatas

Cited literature [19 references]  Display  Hide  Download

https://hal.inria.fr/hal-02456533
Contributor : Vincent Loechner <>
Submitted on : Monday, January 27, 2020 - 1:57:15 PM
Last modification on : Tuesday, January 28, 2020 - 1:35:24 AM

File

IMPACT_2020_paper_9 (1).pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-02456533, version 1

Citation

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⟩

Share

Metrics

Record views

76

Files downloads

181