How p4tare/parallel-reduction-benchmark works
Parallel Reduction Benchmark is a research framework for comparing reduction performance and energy use across CPU, NVIDIA GPU, multi-GPU, and heterogeneous systems. Users configure and plan campaigns, then run randomized experiment blocks: Python prepares datasets and topology-aware tasks, coordinates a native worker through its measurement protocol, validates results, and writes raw and summarized outputs. The native worker executes CPU/GPU strategies and reports timing metrics. The README documents energy metering and diagnostic capabilities; sampled excerpts do not show every runtime call, so some documented subsystem links use README evidence.
Main entry points: cli.py Command interface · runner.py Experiment runner · main.cpp Native worker entry · strategy.cpp Reduction strategies
Components 24
Python orchestration
- Command interface
prbench/cli.py - Configuration
prbench/config.py - Experiment runner
prbench/runner.py - Worker protocol
prbench/protocol.py
Experiment design
- Algorithm catalog
prbench/catalog.py - Sweep planner
prbench/sweep.py - Hardware topology
prbench/topology.py - Capacity checks
prbench/capacity.py - Dataset generation
prbench/datasets.py
Measurement and results
- Run manifest
prbench/manifest.py - Result validation
prbench/validation.py - Energy metering
prbench/energy.py - Hardware telemetry
prbench/telemetry.py - Raw and summary results
prbench/results.py
Native reduction worker
- Native worker entry
native/src/main.cpp - Worker arguments
native/src/cli.cpp - Reduction strategies
native/src/strategy.cpp - CPU reduction
native/src/cpu_backend.cpp - GPU reduction
native/src/gpu_backend.cu - Hybrid strategy
native/src/integrated_strategy.cu - Resident dataset
native/src/dataset.cpp
Other components
- Researcher
- RAPL counters
- NVML telemetry
Connections 25
- Researcher → Command interface: invokes
README.md - Command interface → Configuration: loads
prbench/cli.py - Command interface → Sweep planner: plans tasks
prbench/cli.py - Sweep planner → Algorithm catalog: resolves algorithms
prbench/sweep.py - Sweep planner → Hardware topology: assigns resources
prbench/sweep.py - Command interface → Hardware topology: discovers hardware
README.md - Command interface → Capacity checks: checks capacity
prbench/cli.py - Command interface → Dataset generation: prepares datasets
prbench/cli.py - Command interface → Run manifest: writes manifest
prbench/cli.py - Command interface → Experiment runner: runs campaign
prbench/cli.py - Experiment runner → Worker protocol: exchanges events
prbench/runner.py - Experiment runner → Dataset generation: gets datasets
prbench/runner.py - Experiment runner → Result validation: validates outputs
prbench/runner.py - Experiment runner → Energy metering: measures energy
prbench/runner.py - Experiment runner → Hardware telemetry: collects telemetry
prbench/runner.py - Experiment runner → Raw and summary results: appends samples
prbench/runner.py - Energy metering → RAPL counters: reads counters
README.md - Hardware telemetry → NVML telemetry: queries devices
README.md - Experiment runner → Native worker entry: launches worker
README.md - Native worker entry → Worker arguments: parses arguments
native/src/main.cpp - Native worker entry → Reduction strategies: creates strategy
native/src/main.cpp - Reduction strategies → CPU reduction: dispatches CPU work
native/src/strategy.cpp - Reduction strategies → GPU reduction: dispatches GPU work
native/src/strategy.cpp - Reduction strategies → Hybrid strategy: selects hybrid execution
- Native worker entry → Resident dataset: loads dataset
native/src/main.cpp