SARIS: Accelerating Stencil Computations on Energy-Efficient RISC-V Compute Clusters with Indirect Stream Registers

Paul Scheffler, Luca Colagrande, Luca Benini · DOI

Abstract

Stencil computations are fundamental to scientific computing, yet they often suffer from significant performance bottlenecks on energy-efficient, in-order processors due to the high overhead of memory address calculation and data movement. This paper introduces SARIS (Stencil Acceleration using Register-mapped Indirect Streams), a methodology that leverages hardware-managed stream registers to decouple data access from computation. By offloading address generation to a dedicated hardware unit, SARIS enables RISC-V cores to achieve near-peak floating-point unit (FPU) utilization. Our evaluation on a 12nm RISC-V cluster demonstrates a 2.72x average speedup and an increase in FPU utilization from 35% to 81%, significantly improving energy efficiency and scalability for high-performance computing workloads.

1. Introduction

Stencil computations serve as the backbone for a wide array of scientific applications, including seismic simulations, weather forecasting, and image processing. These algorithms update grid points based on the values of neighboring points, a process that is mathematically straightforward but computationally taxing for standard processors.

On energy-efficient "in-order" RISC-V cores, the "bookkeeping" associated with these computations—calculating multiple memory addresses, loading irregular data, and managing register pressure—often consumes the majority of the instruction cycle. Research indicates that in standard baseline configurations, only approximately 35% of instructions perform useful mathematical operations, while the remainder is dedicated to data movement. SARIS addresses this inefficiency by offloading the complexity of memory access to specialized hardware.

2. Methodology: The SARIS Architecture

SARIS (Stencil Acceleration using Register-mapped Indirect Streams) introduces a hardware-software co-design approach to eliminate the address-calculation bottleneck. The core of the methodology lies in Stream Registers (SRs), a hardware extension that maps memory streams directly to architectural registers.

2.1 Indirect Indirection and Hardware Offloading

SARIS utilizes a dedicated hardware unit known as the Stream Semantic Register (SSSR). Instead of requiring the CPU to calculate neighbor addresses during every loop iteration, SARIS stores the relative offsets of a stencil (its "shape") in static index arrays. The SSSR uses these indices to fetch data autonomously. When the CPU accesses a specific register (e.g., ft0), the hardware has already pre-fetched the required neighbor from memory, making the data available immediately.

2.2 Point Loop Scheduling and Hardware Loops

To maximize concurrency, the authors developed a scheduling methodology that partitions memory reads across multiple stream registers, balancing the load on the memory system. Furthermore, SARIS leverages the "Snitch" RISC-V core’s ability to perform hardware-accelerated floating-point repetitions (FREP). This allows the system to execute floating-point operations with minimal instruction fetch overhead, further streamlining the execution pipeline.

3. Evaluation and Experimental Setup

The SARIS methodology was evaluated using a benchmark suite of ten diverse stencil codes, ranging from 2D image filters to complex 3D seismic operators (such as ac_iso_cd). These benchmarks varied in dimensionality, radius (1 to 4), and operational complexity (5 to 54 FLOPs per grid point).

Testing was conducted using cycle-accurate RTL simulations of a Snitch RISC-V cluster. Power estimations were derived from a 12nm FinFET process to ensure realistic energy efficiency metrics.

4. Key Results and Insights

4.1 Performance and Utilization

SARIS achieved a 2.72x average speedup over an optimized baseline on an 8-core RISC-V cluster. More importantly, FPU utilization increased from a baseline of 35% to a near-ideal 81%. By separating the "where" (data location) from the "what" (computation), the FPU is allowed to run at near-peak capacity while the CPU acts as a manager rather than a laborer.

4.2 Energy Efficiency and Scalability

Because the processor cores spend significantly less time stalled while waiting for data, energy efficiency improved by 1.58x. In terms of scalability, projections for a 256-core manycore system with HBM2E memory show SARIS reaching 79% of peak compute performance. This outperforms leading GPU-based code generators like AN5D, which typically achieve approximately 69% on similar workloads.

4.3 Eliminating Register Pressure

In traditional stencil implementations, loop unrolling is often limited by the number of available physical registers. SARIS bypasses this limitation by "streaming" neighbors through a single register interface. This effectively provides the programmer with infinite virtual registers for data input, allowing for more complex stencils without the performance degradation associated with register spilling.

5. Limitations and Future Work

While SARIS provides substantial gains, it currently requires manual implementation and scheduling of point loops. To achieve widespread adoption, the authors identify the need to integrate this methodology into automated compiler toolchains, such as LLVM. Additionally, while SARIS efficiently saturates available memory bandwidth, very simple stencils with low operational intensity will eventually be limited by the physical constraints of HBM2E memory. Future research will focus on automating the SARIS workflow and exploring its application in broader classes of data-parallel algorithms.

Summary updated

BibTeX
@inproceedings{scheffler2024saris,
  author = {Paul Scheffler and Luca Colagrande and Luca Benini},
  title = {{SARIS: Accelerating Stencil Computations on Energy-Efficient RISC-V Compute Clusters with Indirect Stream Registers}},
  booktitle = {DAC},
  year = {2024},
  doi = {10.1145/3649329.3658494},
}
Figure