Transactional WaveCache: Towards Speculative and Out-of-Order DataFlow Execution of Memory Operations

Leandro A. J. Marzulo, Felipe M. G. França, Vítor Santos Costa

Introduction

Dataflow architectures offer a compelling alternative to traditional Von Neumann processors by executing instructions based on operand availability rather than a fixed program counter. However, maintaining the memory semantics of imperative languages like C or Java remains a significant challenge. The WaveScalar architecture addressed this by partitioning programs into "waves"—acyclic code fragments—and enforcing strict sequential ordering for memory operations between them. While this ensures correctness, it introduces a performance bottleneck: memory operations in one wave cannot proceed until all preceding waves have completed their memory tasks.

The Transactional WaveCache (TWC)

To overcome this limitation, the Transactional WaveCache (TWC) introduces speculative and out-of-order execution for memory operations. By treating each wave as a nested transaction, the system allows waves to execute speculatively before their predecessors finish. This approach leverages the discrete, atomic-like nature of waves to map them naturally to transactional units.

Mapping imperative code to a WaveScalar dataflow graph, illustrating memory operations within a wave.

Technical Components and Implementation

The TWC relies on several key hardware structures to manage speculation and recovery within the WaveScalar cluster-based architecture:

  • MemOp-History (MOH): A log of all memory operations, including wave IDs and data backups for stores, serving as an undo log for rollbacks.
  • Wave-Context-Table (WCT): Stores the "read set" or input operands for each wave, allowing the system to re-trigger execution if a wave must be aborted.
  • Hazard Detection: The system monitors for Read-After-Write (RAW), Write-After-Write (WAW), and Write-After-Read (WAR) conflicts across speculative waves.
  • Rollback and Cleanup: If a hazard is detected, the offending wave and its descendants are aborted. The MOH restores memory state, and the WCT re-initiates the wave. Mechanisms like MT Checkups and Execution Maps are used to purge "zombie" operands from aborted executions.
The hierarchical architecture of the WaveScalar processor, showing clusters of processing elements (PEs) and memory components.

Evaluation and Performance

The authors evaluated the TWC using the Kahuna WaveScalar architectural simulator across a variety of synthetic kernel benchmarks, including matrix algorithms and high-contention loop tests.

Key Results

  • High Contention Performance: In the VECTOR-FULL-DEP benchmark—a loop designed to maximize memory hazards—the TWC achieved a remarkable 139.7% speedup. This demonstrates that the benefits of uncovering hidden parallelism can far outweigh the overhead of speculative rollbacks.
  • General Gains: For benchmarks not limited by memory bandwidth, speedups ranged from 24% to 90%.
  • Speculation Window: Testing revealed that a "speculation window" of approximately 20 waves provides the best balance between performance gains and hardware complexity; looking further ahead yielded diminishing returns.

Discussion and Future Work

The core insight of this work is that the "wave" structure inherent to WaveScalar is naturally suited for transactional memory. However, speculation is not without cost. In memory-bound applications, speculative traffic can saturate bandwidth, leading to performance degradation (up to 16% in some cases). Future iterations of the TWC may require throttling mechanisms to detect bandwidth saturation and pause speculation.

While the hardware overhead for the MOH and WCT is non-trivial, the TWC represents a significant step toward making dataflow architectures competitive for general-purpose, memory-intensive computing by enabling parallelism across wave boundaries.

Summary updated

BibTeX
@inproceedings{marzulo2008transactional,
  author = {Leandro A. J. Marzulo and Felipe M. G. França and Vítor Santos Costa},
  title = {{Transactional WaveCache: Towards Speculative and Out-of-Order DataFlow Execution of Memory Operations}},
  booktitle = {SBAC-PAD},
  year = {2008},
  doi = {10.1109/sbac-pad.2008.29},
}
Figure