Ideal and Predictable Hit Ratio for Matrix Transposition in Data Caches

Matrix transposition is a fundamental operation, but it may present a very low and hardly predictable data cache hit ratio for large matrices. Safe (worst-case) hit ratio predictability is required in real-time systems. In this paper, we obtain the relations among the cache parameters that guarantee...

ver descrição completa

Detalhes bibliográficos
Autores: Pedro Zapater, Alba, Rodríguez Lafuente, Clemente, Segarra, Juan, Gran Tejero, Rubén, Viñals, Víctor
Tipo de documento: artigo
Data de publicação:2020
País:España
Recursos:Universidad del País Vasco
Repositório:Addi. Archivo Digital para la Docencia y la Investigación
OAI Identifier:oai:addi.ehu.eus:10810/41908
Acesso em linha:http://hdl.handle.net/10810/41908
Access Level:Acceso aberto
Palavra-chave:transposition
data cache memory
real-time
tiling
cache oblivious
Descrição
Resumo:Matrix transposition is a fundamental operation, but it may present a very low and hardly predictable data cache hit ratio for large matrices. Safe (worst-case) hit ratio predictability is required in real-time systems. In this paper, we obtain the relations among the cache parameters that guarantee the ideal (predictable) data hit ratio assuming a Least-Recently-Used (LRU) data cache. Considering our analytical assessments, we compare a tiling matrix transposition to a cache oblivious algorithm, modified with <i>phantom padding</i> to improve its data hit ratio. Our results show that, with an adequate tile size, the tiling version results in an equal or better data hit ratio. We also analyze the energy consumption and execution time of matrix transposition on real hardware with pseudo-LRU (PLRU) caches. Our analytical hit/miss assessment enables the usage of a data cache for matrix transposition in real-time systems, since the number of misses in the worst case is bound. In general and high-performance computation, our analysis enables us to restrict the cache resources devoted to matrix transposition with no negative impact, in order to reduce both the energy consumption and the pollution to other computations.