Stencil computation is one of the most used kernels in a wide variety of scientific applications, ranging from large-scale weather prediction to solving partial differential equations. Stencil computations are characterized by three unique properties: (1) low arithmetic intensity, (2) limited temporal data reuse, and (3) regular and predictable data access pattern. As a result, stencil computations are typically bandwidth-bound workloads, which only experience limited benefits from the deep cache hierarchy of modern CPUs. In this work, we propose Casper, a near-cache accelerator consisting of specialized stencil compute units connected to the last-level cache (LLC) of a traditional CPU. Casper is based on two key ideas: (1) avoiding the cost of moving rarely reused data through the cache hierarchy, and (2) exploiting the regularity of the data accesses and the inherent parallelism of the stencil computation to increase the overall performance. With minimal changes in LLC address decoding logic and data placement, Casper performs stencil computations at the peak bandwidth of the LLC. We show that, by tightly coupling lightweight stencil compute units near to LLC, Casper improves the performance of stencil kernels by 1.65x on average, while reducing the energy consumption by 35% compared to a commercial high-performance multi-core processor. Moreover, Casper provides a 37x improvement in performance-per-area compared to a state-of-the-art GPU.
翻译:摘要:模板计算是众多科学应用中最常用的核心算法之一,涵盖从大规模天气预报到偏微分方程求解等领域。模板计算具有三个独特特性:(1)低算术强度,(2)有限的时间数据复用性,以及(3)规律且可预测的数据访问模式。因此,模板计算通常是带宽受限型工作负载,现代CPU的深层缓存层次结构对其性能提升有限。本文提出Casper——一种近缓存加速器,由连接到传统CPU末级缓存(LLC)的专用模板计算单元构成。Casper基于两个关键思想:(1)避免通过缓存层次结构移动复用性低的数据所产生的开销,(2)利用数据访问的规律性及模板计算固有的并行性提升整体性能。通过最小化对LLC地址解码逻辑和数据放置的修改,Casper以LLC峰值带宽执行模板计算。实验表明,通过将轻量级模板计算单元紧密耦合至LLC附近,Casper使模板核函数性能平均提升1.65倍,同时相比商用高性能多核处理器降低35%能耗。此外,与最先进的GPU相比,Casper在性能/面积比方面实现37倍提升。