FHE Accelerator Simulators — Presentation 05

Results and the Design Space

What the simulator says: SRAM size against key traffic, the NTT-bound and memory-bound regimes, power and energy per bootstrap under a TDP, the algorithmic acceleration techniques, a design-space sweep, silicon area as a third axis (a three-way power, performance and area front), the model's limitations, a reading list (F1, CraterLake, BTS, ARK, SHARP, GPU work, HEIR, OpenFHE, Lattigo) and practice questions.

SRAM sizing Regimes Energy / bootstrap Min-KS Area Pareto Reading list
Sweep → Attribute → Explain → Decide
00

Topics We'll Cover

Concepts used here, and where they are explained. Each links to its series glossary entry: a short explanation, then links to the slides that explain it in depth, in this series, the Cryptography decks or LLM Inference Simulators.

01

The Questions, and the Ground Rules

  1. How much on-chip SRAM stops key traffic dominating?
  2. When is a design NTT-bound, memory-bound or power-bound?
  3. Which algorithmic techniques matter, and on which designs?
  4. What does a bootstrap cost in energy under a power limit?
  5. And in silicon area: which designs are worth their mm²?
Ground rules

Every number in this deck comes from examples/results.py in FHE_Accelerator_Sim, which regenerates them all; re-run it after any model change. The workload is one full-slot ark-set bootstrap (N = 216, L = 23, dnum = 4) unless stated. Hardware coefficients are illustrative: read ratios, trends and crossovers, not absolute milliseconds.

02

SRAM Against Key Traffic and Area

SRAMBaseline: bootstrapkey GBall HBM GBMin-KS + seeded + OTF: bootstrapkey GBall HBM GB
128 MiB26.98 ms9.2926.5321.22 ms4.3518.22
256 MiB17.10 ms6.9916.378.71 ms0.704.33
512 MiB13.94 ms6.7412.447.19 ms0.580.78
1 GiB11.69 ms6.7410.267.19 ms0.580.78
4 GiB11.41 ms6.7410.027.19 ms0.580.78

The third axis: area. SRAM is not free. The simulator's area model (7 nm; units from ARK's published breakdown, SRAM from a CACTI sweep; illustrative) prices the same sweep in mm², with all three key-traffic techniques. "Pareto" marks designs no other design beats on latency, energy and area:

SRAM MiBbootstrapmJdie mm²perf/mm² (1/s/mm²)perf/W (1/J)Paretoverdict
12821.22 ms1691253.50.1860.59yesmemory-bound
2568.71 ms774324.80.3541.29yesMAC-bound
3847.56 ms646392.30.3371.55yesMAC-bound
5127.19 ms607457.90.3041.65yesMAC-bound
7687.19 ms607581.10.2391.65MAC-bound
10247.19 ms607695.20.2001.65MAC-bound
20487.19 ms6071182.3 (> reticle)0.1181.65MAC-bound
40967.19 ms6072180.5 (> reticle)0.0641.65MAC-bound

Source: examples/results.md, 22. Scratchpad size

03

NTT-Bound Against Memory-Bound

Bootstrap latency and verdict as NTT throughput and HBM bandwidth vary (MAC lanes = 2 × NTT butterflies; 512 MiB; 250 W TDP under the dynamic power manager):

Baseline algorithm
NTT bfly/cycle \ HBM
500 GB/s1 TB/s2 TB/s4 TB/s
51234.2 ms memory21.9 ms NTT17.9 ms NTT16.7 ms NTT
1,02428.8 ms memory17.2 ms memory11.5 ms NTT9.8 ms NTT
2,04827.0 ms memory14.8 ms memory8.8 ms memory6.7 ms MAC
4,09626.4 ms memory13.9 ms memory7.9 ms memory5.6 ms MAC
8,19226.2 ms memory13.8 ms memory7.7 ms memory5.5 ms MAC
Min-KS + seeded + OTF
NTT bfly/cycle \ HBM
500 GB/s1 TB/s2 TB/s4 TB/s
51228.7 ms NTT28.6 ms NTT28.6 ms NTT28.6 ms NTT
2,0489.6 ms MAC9.5 ms MAC9.4 ms MAC9.4 ms MAC
8,1926.7 ms MAC6.3 ms MAC6.3 ms MAC6.2 ms MAC
04

Acceleration Techniques

AlgorithmARK-class: bootstrapkey GBverdictSmall digital: bootstrapverdict
Baseline (hoisted BSGS)13.94 ms6.74memory17.46 msNTT
No hoisting14.02 ms6.74memory20.14 msNTT
OpenFHE's BSGS (lazy ModDown)19.77 ms8.60memory18.99 msNTT
+ Min-KS8.51 ms1.15memory21.54 msNTT
+ Min-KS + seeded keys8.86 ms0.58MAC22.07 msNTT
+ Min-KS + seeded keys + OTF plaintexts7.19 ms0.58MAC26.65 msNTT
SlotToCoeff first11.51 ms5.73memory12.74 msNTT
+ all three + SlotToCoeff first5.42 ms0.50MAC20.01 msNTT
05

Power and Energy per Bootstrap

The simulator enforces the TDP with a dynamic power manager. Each kernel gets the highest clock, and each HBM chunk the highest bandwidth, that fits the headroom left by everything running at that moment; if even the lowest setting does not fit, it waits. The alternative, one worst-case clock at which every unit and HBM at full rate fit the TDP, is kept for comparison (250 W TDP throughout):

ConfigurationPower modeBootstrapMean clockAvg / peak WmJVerdict
ARK-class, baselineeither13.94 ms100%82 / 1761,139memory
… with DVFSeither15.83 ms50%72 / 1031,134memory
ARK-class, all techniqueseither7.19 ms100%84 / 150607MAC
2× NTT and MAC, all techniquesworst-case6.95 ms91%82 / 179569power (MAC)
2× NTT and MAC, all techniquesdynamic6.34 ms100%90 / 218573MAC
4× NTT and MAC, all techniquesworst-case8.28 ms74%70 / 135577power (MAC)
4× NTT and MAC, all techniquesdynamic6.20 ms100%92 / 239567MAC
4× design, all techniquesWorst-case clockDynamic manager
TDP 250 W8.28 ms at 74%, peak 135 W6.20 ms at 100%, peak 239 W
TDP 150 W11.62 ms at 53%, peak 95 W6.41 ms, mean clock 99%, peak 150 W
TDP 100 Wcannot run (worst case at the lowest clock exceeds the TDP)6.68 ms, mean clock 92%, power-bound
TDP 80 Wcannot run7.73 ms, mean clock 89%, power-bound
06

Interactive: Design-Space Map

Runs a 5 × 4 grid of full bootstraps in the browser (the bit-exact JavaScript port) and colours each cell by its verdict. Change the algorithm, SRAM, TDP or power control and watch the regions move. Try 150 W with the worst-case clock, then with the dynamic manager.

250
07

Sweeps, Pareto Fronts and Simulator Speed

A 36-point sweep (NTT 1,024–8,192 butterflies/cycle × SRAM 256 MiB–1 GiB × HBM 0.5–2 TB/s, all techniques) ran in 0.4 s on 8 processes. Its latency/energy Pareto front is a single point:

NTT bfly/cycleSRAMHBMBootstrapEnergyVerdict
8,192512 MiB2 TB/s6.34 ms573 mJMAC-bound
08

Against Published Numbers

ReferenceWhat it reportsUse here
OpenFHE on this machine (i7-3770, 8 threads)HMult 352.6 ms, HRotate 324.8 ms (N = 216, 24 limbs, dnum 4); sparse bootstrap 12.1 sCalibration: one parameter fitted to HMult; HRotate predicted within 10%; the bootstrap is predicted 30% low by the scheme model and 11% low by replaying OpenFHE's own recorded kernel stream
100x, GPU (Jung et al., ePrint 2021/508)Bootstrap 328.25 ms on a V100 (N = 216, L = 34, dnum 5, 106-bit security); 79.4 s single-threaded CPUOrder of magnitude for GPUs; not modelled (a GPU has no scratchpad of this kind)
ARK (arXiv:2205.00922), Table VIIHELR iteration (includes a bootstrap): ARK 7.42 ms, CraterLake 15.2 ms, BTS 28.4 ms; ARK 512 MB, 1 TB/s, 418.3 mm2, 281.3 W peakOrder of magnitude only: our ARK-class design bootstraps in 7–14 ms depending on the algorithm
BTS (arXiv:2112.15479)5,556× (ResNet-20) and 1,306× (logistic regression) over CPU; 373.6 mm2, up to 163.2 WContext for the memory-bound conclusion
TensorFHE (arXiv:2212.14191)913 K NTTs/s and 88 K HMults/s on an A100GPU throughput context

ASIC papers mostly report amortised metrics (TA.S., application time) at their own parameters, so their numbers are references for scale, not targets to fit. A like-for-like ASIC comparison would need their exact algorithms, which is what the trace interface is for.

09

Limitations and Extensions

Each limitation is a self-contained exercise, roughly in order of difficulty:

  1. Complex-valued data with SlotToCoeff first: the model assumes real-valued data (one EvalMod); add the second EvalMod for complex slots, and measure other level budgets for the two DFTs.
  2. Smarter power policies. The power manager is greedy and first-come: the first kernel to ask gets the highest clock that fits. Try fair-share or critical-path-aware allocation, and DVFS transition latency.
  3. Banked scratchpad and on-chip network contention, replacing "every unit gets full port bandwidth".
  4. Interleaving bootstraps (or many ciphertexts) to reuse keys across operations, ARK's "inter-operation key reuse".
  5. More from the compiler. The HEIR front end (deck 03) reads HEIR's ckks IR. Next steps: support several bootstraps per program with per-segment stage spans; let the simulator feed costs back into HEIR's bootstrap placement (its ILP placer accepts a cost model); and cross-check the Lattigo backend as well as OpenFHE.
  6. Optical extensions: chained optical stages, redundancy-based error correction, optical base conversion; each with its own precision analysis in precision.py.
  7. Correlation against RTL or an FPGA prototype of one kernel (say an NTT unit), to replace an illustrative coefficient with a measured one.
10

Reading List

11

Practice Questions

FHE-specific additions to the practice questions in LLM Inference Simulators deck 11, the role primer.

Why is CKKS bootstrapping memory-bound on a large accelerator, and what would you change first?

The homomorphic DFT stages use dozens of distinct rotation keys, each 100+ MiB at high levels and each used once per bootstrap, plus a plaintext per diagonal: gigabytes of compulsory traffic against modest arithmetic. More SRAM does not help (each key is used once). Change the algorithm first: key reuse (Min-KS), seeded keys and on-the-fly plaintexts cut key traffic by an order of magnitude; then size SRAM to the new working set and re-check the bound, which moves to compute or power. (Decks 02, 05.)

How would you validate an FHE accelerator simulator before RTL exists?

A ladder: sizes and operation counts against hand formulas and published tables; invariants (dependencies, conservation of work, determinism); analytic checks of the engine (serial chains, flow-shop makespans, roofline bounds); behavioural expectations (more SRAM never raises traffic); property-based tests over random configurations; calibration of throughput against a real library such as OpenFHE with out-of-sample predictions; and differential tests between independent implementations. Then plan correlation against RTL kernels as they arrive. (Deck 03.)

An optical engine computes FFTs very fast. What do you need to know before believing FHE gets faster?
How would you get real FHE programs into the simulator?

Define a kernel-level trace format (operations, objects, sizes, keys, dependencies) as the contract. Produce it from a compiler such as HEIR at a polynomial or modular-arithmetic level of its IR, or by instrumenting a library's key-switching and NTT routines. This repo does the library route for OpenFHE: an 82-line patch logs the stream, and replaying it predicts the measured bootstrap time to within 11%. Use the same program compiled to a CPU backend as a functional and timing reference, and track coverage (which operations and parameter sets the front end supports) as an engineering metric. (Decks 03, 05.)

12

What to Take Away

Where next

Back to the series hub, the code, the sister series LLM Inference Simulators, or the FHE fundamentals in the Cryptography section of the Mathematics hub.