To address memory bottlenecks in processor-centric systems, the ProcessingIn-Memory (PIM) paradigm, which promises high levels of parallelism with high memory bandwidth and low memory access latency, has been studied for decades. After decades of ...
To address memory bottlenecks in processor-centric systems, the ProcessingIn-Memory (PIM) paradigm, which promises high levels of parallelism with high memory bandwidth and low memory access latency, has been studied for decades. After decades of research, several vendors have recently begun to commercialize near-bank PIM architectures. General Matrix Multiplication (GEMM), one of the primary linear algebra kernels, serves an important role in deep learning and scientific applications. However, to the best of our knowledge, there’s no publicly available software implementation tailored to these new architectures, but only research for General Matrix Vector Multiplication (GEMV) or hardware approach for GEMM exists.
In this paper, we propose PGEMMlib, an efficient GEMM library for the realworld PIM system. PGEMMlib provides the various tiling techniques and the TileSelector to operate the efficient GEMM in the near-bank PIM. The proposed tiling techniques can reduce the memory transfer overhead and maximize the parallelism to perform GEMM in PIM with the appropriate tiling factors. In the real-world PIM,
the appropriate tiling factors vary significantly depending on the input GEMM shape and the given PIM resources. Therefore, we also provide Tile-Selector, based on an analytical approach, in order to select appropriate input-aware tiling factors from a large search space of tiling variants. With the selected parameters, TileSelector allows efficient execution of input GEMM operations. Also, PGEMMlib provides the parallel method of BatchedGEMM, which has been widely used in deep learning models. Compared to the baseline GEMM from existing GEMV operations, PGEMMlib provides a peak speedup of up to 9.32x and 1.68x geometric mean performance improvement for key matrix multiplications used in large language models. Moreover, PGEMMlib’s GEMM is highly scalable, making it easy to expand to larger PIM systems in the near future.