A Compiler for Automatic Selection of Suitable Processing-in-Memory Instructions

Hameeza Ahmed1, Paulo C. Santos2,a, João P. C. Lima2,b, Rafael F. Moura2,c, Marco A. Z. Alves3, Antônio C. S. Beck2,d and Luigi Carro2,e
1Dep. of Computer and Information Systems Eng. - NED University - Karachi, Pakistan
hameeza@neduet.edu.pk
2Informatics Institute - Federal University of Rio Grande do Sul - Porto Alegre, Brazil
apcssjunior@inf.ufrgs.br
bjplima@inf.ufrgs.br
crfmoura@inf.ufrgs.br
dcaco@inf.ufrgs.br
ecarro@inf.ufrgs.br
3Department of Informatics - Federal University of Paraná - Curitiba, Brazil
mazalves@inf.ufpr.br

ABSTRACT


Although not a new technique, due to the advent of 3D-stacked technologies, the integration of large memories and logic circuitry able to compute large amount of data has revived the Processing-in-Memory (PIM) techniques. PIM is a technique to increase performance while reducing energy consumption when dealing with large amounts of data. Despite several designs of PIM are available in the literature, their effective implementation still burdens the programmer. Also, various PIM instances are required to take advantage of the internal 3D-stacked memories, which further increases the challenges faced by the programmers. In this way, this work presents the Processing-In-Memory cOmpiler (PRIMO). Our compiler is able to efficiently exploit large vector units on a PIM architecture, directly from the original code. PRIMO is able to automatically select suitable PIM operations, allowing its automatic offloading. Moreover, PRIMO concerns about several PIM instances, selecting the most suitable instance while reduces internal communication between different PIM units. The compilation results of different benchmarks depict how PRIMO is able to exploit large vectors, while achieving a near-optimal performance when compared to the ideal execution for the case study PIM. PRIMO allows a speedup of 38× for specific kernels, while on average achieves 11.8× for a set of benchmarks from PolyBench Suite.

Keywords: Compiler, Processing in Memory, Near-data computing, Vector instructions, SIMD, 3D-Stacked memories.



Full Text (PDF)