Cache-aware optimization of matrix multiplication and matrix factorizations on multicore processors

This paper advocates for a careful customization of the special general matrix multiplication (GEMM) kernels that are invoked from blocked routines for several relevant matrix factorizations in LAPACK, in order to improve their performance on modern multicore processors with hierarchical cache memor...

Descripción completa

Detalles Bibliográficos
Autores: Martínez, Héctor, Catalán Pallarés, Sandra, Igual Peña, Francisco D., Herrero, José R., Rodríguez Sánchez, Rafael, Quintana Ortí, Enrique S.
Tipo de recurso: artículo
Fecha de publicación:2025
País:España
Institución:Universidad de Castilla-La Mancha
Repositorio:RUIdeRA. Repositorio Institucional de la UCLM
OAI Identifier:oai:ruidera.uclm.es:10578/45194
Acceso en línea:https://doi.org/10.1007/s10586-025-05426-6
https://hdl.handle.net/10578/45194
Access Level:acceso abierto
Palabra clave:Cache memory
Computer architecture
Dense linear algebra
Matrix factorization
Multicore processors
Descripción
Sumario:This paper advocates for a careful customization of the special general matrix multiplication (GEMM) kernels that are invoked from blocked routines for several relevant matrix factorizations in LAPACK, in order to improve their performance on modern multicore processors with hierarchical cache memories. To achieve this, we leverage a refined analytical model to dynamically tune the cache configuration parameters of GEMM for these kernels, taking into account the matrix operands’ dimensions, in order to improve cache occupation. In addition, toward the same goal, we accommodate a flexible development of architecture-specific micro-kernels for GEMM that allows us to select the option that, depending on the operands’ dimensions, ameliorates cache utilization. Our experiments for the LU and QR factorizations on two platforms, equipped with ARM (NVIDIA Carmel) and x86 (AMD EPYC) multi-core processors, demonstrate the benefits of this approach in terms of a better cache utilization and, in general, higher performance. Moreover, they also reveal the delicate balance between optimizing for multi-threaded parallelism versus cache usage as well as the positive effects of software prefetching.