Papers
Topics
Authors
Recent
Search
2000 character limit reached

TRAPTI: Time-Resolved Analysis for SRAM Banking and Power Gating Optimization in Embedded Transformer Inference

Published 8 Apr 2026 in cs.AR | (2604.06955v1)

Abstract: Transformer neural networks achieve state-of-the-art accuracy across language and vision tasks, but their deployment on embedded hardware is hindered by stringent area, latency, and energy constraints. During inference, performance and efficiency are increasingly dominated by the Key--Value (KV) cache, whose memory footprint grows with sequence length, straining on-chip memory utilization. Although existing mechanisms such as Grouped-Query Attention (GQA) reduce KV cache requirements compared to Multi-Head Attention (MHA), effectively exploiting this reduction requires understanding how on-chip memory demand evolves over time. This work presents TRAPTI, a two-stage methodology that combines cycle-level inference simulation with time-resolved analysis of on-chip memory occupancy to guide design decisions. In the first stage, the framework obtains memory occupancy traces and memory access statistics from simulation. In the second stage, the framework leverages the traces to explore banked memory organizations and power-gating configurations in an offline optimization flow. We apply this methodology to GPT-2 XL and DeepSeek-R1-Distill-Qwen-1.5B under the same accelerator configuration, enabling a direct comparison of MHA and GQA memory profiles. The analysis shows that DeepSeek-R1-Distill-Qwen-1.5B exhibits a 2.72x reduction in peak on-chip memory utilization in this setting compared to GPT-2 XL, unlocking further opportunities for power-gating optimization.

Summary

  • The paper presents the TRAPTI framework that leverages cycle-level simulation to extract time-resolved memory occupancy traces.
  • It demonstrates significant reductions in SRAM energy (up to 78%) and latency improvements using GQA compared to MHA.
  • The study validates banking and power-gating policies as key enablers for efficient embedded Transformer inference designs.

Time-Resolved SRAM Banking and Power Gating Optimization for Embedded Transformer Inference

Overview

The paper "TRAPTI: Time-Resolved Analysis for SRAM Banking and Power Gating Optimization in Embedded Transformer Inference" (2604.06955) introduces a comprehensive methodology for optimizing embedded accelerator memory hierarchies during Transformer inference. By leveraging cycle-level simulation and time-resolved memory occupancy profiling, the TRAPTI framework enables systematic design-space exploration of SRAM banking schemes and power-gating policies, particularly in the context of attention mechanism variants such as Multi-Head Attention (MHA) and Grouped-Query Attention (GQA). The analysis demonstrates substantial reductions in memory requirements and energy consumption when adopting GQA and banked/gated SRAM architectures, yielding strong empirical evidence for integrating workload-driven occupancy traces in hardware design flows.

Attention Mechanism Impact on Memory Utilization

Transformer architectures rely extensively on self-attention, with MHA yielding significant memory overhead due to independent key and value tensors per head. The migration to GQA, which consolidates key/value representations within query head groups, directly reduces the KV cache footprint—a critical bottleneck for embedded inference.

The empirical comparison (Figure 1) confirms GQA achieves 2.89×2.89\times lower energy and 3.14×3.14\times lower latency at equivalent scale and computational complexity relative to MHA, substantiating the efficacy of GQA workload in embedded contexts. Figure 1

Figure 1

Figure 1: Normalized energy and latency comparison between MHA and GQA at matched parameter and MAC counts.

The conceptual distinction among MHA, GQA, and MQA is further delineated (Figure 2), highlighting the trade-off between memory footprint reduction versus representational flexibility. Figure 2

Figure 2: Schematic of attention variant designs illustrating KV projection sharing across heads/groups.

TRAPTI Framework and Methodology

TRAPTI combines cycle-level inference simulation (via TransInferSim) and offline banking/gating analysis (using CACTI characterization) in a two-stage workflow:

  • Stage I: Runs a discrete-event simulation of Transformer inference on a configurable accelerator (Figure 3), producing a memory occupancy trace reflecting the dynamic evolution of on-chip SRAM usage.
  • Stage II: Explores candidate SRAM banking organizations and power-gating policies by mapping occupancy traces to bank activity, quantifying energy and area implications given real-world implementation margins. Figure 3

    Figure 3: Two-stage TRAPTI workflow for memory trace extraction and banked/gated SRAM analysis.

Experimental Setup and Results

The evaluation employs GPT-2 XL (MHA) and DeepSeek-R1-Distill-Qwen-1.5B (GQA) workloads, executed on a uniform accelerator setup (Figure 4), including four 128×128 Systolic Arrays and a shared SRAM. Both models are quantized to 8-bit. Figure 4

Figure 4: Accelerator configuration used for experimental evaluation, supporting high throughput and parallelism.

Memory Occupancy and Execution Dynamics

Time-resolved occupancy analysis reveals GQA-based DS-R1D~Q-1.5B requires 2.72×2.72\times less peak SRAM than MHA-based GPT-2 XL (39.1 MiB vs. 107.3 MiB), resulting in extended intervals of idle SRAM and facilitating further memory optimization (Figure 5). Figure 5

Figure 5: SRAM occupancy traces showing markedly lower and more variable memory demand for GQA compared to MHA.

Memory-bound stall analysis (Figure 6) verifies GPT-2 XL suffers from prolonged memory-induced delays, leading to low PE utilization and energy inefficiency. In contrast, DS-R1D~Q-1.5B exhibits higher compute utilization (77%77\% vs. 38%38\%) with less time spent on memory accesses (Figure 7). Figure 6

Figure 6: Operation-level latency decomposition, highlighting memory access bottlenecks in MHA workloads.

Figure 7

Figure 7: On-chip energy consumption profile, indicating superior compute utilization and lower total energy for GQA.

Banking and Power-Gating Trade-Offs

Banking analysis exploits occupancy traces to infer bank activity timelines (Figure 8), accounting for realistic headroom factors (α\alpha) that influence packing and gating eligibility. Energy–area trade-off curves (Figure 9) demonstrate up to 78\% reduction in SRAM energy at α=0.9\alpha=0.9, with diminishing returns as bank count increases beyond 8–16. Figure 8

Figure 8: Bank activity timeline for DS-R1D~Q-1.5B under varying headroom assumptions, revealing gating windows.

Figure 9

Figure 9: Energy–area trade-off curves for banked SRAM configurations at α=0.9\alpha=0.9, emphasizing optimal banking points.

DS-R1D~Q-1.5B benefits more from banking due to temporal memory variability, while GPT-2 XL's sustained occupancy and larger KV cache footprint restricts gating opportunities.

Memory Hierarchy Generalization

TRAPTI is extendable to multi-level memory hierarchies (Figure 10), with dedicated per-array memories augmenting the shared SRAM. The distribution of occupancy across multiple banks increases idle/gate-eligible intervals and amplifies energy savings, albeit at the cost of suboptimal scheduling-induced latency and coordination overhead. Figure 10

Figure 10: Multi-level on-chip memory hierarchy setup integrating dedicated memories for enhanced banking/gating potential.

Implications and Future Directions

The results underscore the importance of aligning memory subsystem optimization with temporal workload occupancy traces. KV cache reduction mechanisms (e.g., GQA) unlock a broader SRAM design space, maximizing static energy savings through aggressive banking and power-gating. For embedded accelerators, integrating cycle-accurate trace extraction and policy-driven banking/gating flows is necessary to achieve near-optimal memory efficiency.

Theoretically, the separation of execution scheduling and memory organization enables scalable, offline exploration of memory configurations without incurring simulation overhead for each candidate. Practically, this approach will be crucial for deploying long-sequence, resource-constrained LLMs and Transformer models in edge hardware.

Future research should further refine transition overhead modeling, extend trace-based analysis to more complex memory hierarchies, and study policy sensitivity under diverse inference regimes. Optimized data placement and scheduling algorithms are required for multi-level hierarchy designs to mitigate added coordination costs.

Conclusion

The TRAPTI methodology offers a robust framework for optimizing on-chip memory organization in embedded Transformer inference, leveraging time-resolved occupancy analysis to guide banking and power-gating decisions. GQA workloads provide significantly lower and more variable memory demand than MHA, enabling higher SRAM energy reduction and compute utilization. The separation of execution tracing and offline memory configuration evaluation facilitates efficient design space exploration and lays the foundation for further scaling transformer deployments in low-latency, energy-constrained environments.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.