Benchmarking Photonic Computers

A vendor slide says "400 TOPS/W — 100× beyond GPUs." Is that a breakthrough, a rounding convention, or a crime scene? By the end of this lesson you will be able to tell, and quickly. TOPS/W is a fraction, which means there are exactly two ways to flatter it: inflate the numerator (count operations generously) or deflate the denominator (count watts forgetfully) — and photonic systems, with their unusually long tail of off-headline costs, offer more room for forgetfulness than any hardware since the analog computers of the 1950s. None of this requires bad faith; it only requires a boundary drawn where the drawing is easiest. Benchmarking is the craft of redrawing that boundary around the whole machine, normalising for precision, and then asking the question that no peak number answers: can the machine actually be fed? For that last part we will reuse a tool you already own — the roofline model.

The numerator: what is an "op"?

Start with the defensible part. An N \times N mesh clocked at vector rate f performs N^2 multiply-accumulates per pass, and by universal convention one MAC counts as two operations (a multiply and an add):

\text{peak throughput} \;=\; 2N^2 f \qquad\text{e.g.}\quad 2 \times 64^2 \times 10\ \mathrm{GHz} \;\approx\; 82\ \mathrm{TOPS}.

The mischief starts after that. "Effective" ops: some claims multiply the count by a sparsity factor (ops that were skipped are ops that were "done"), or count a low-precision op as several high-precision ones. Peak vs delivered: 2N^2f assumes every channel busy every cycle; real layers rarely fill a fixed N, and a mesh multiplying a 20\times 20 matrix in a 64-wide engine delivers a tenth of its peak. Precision-free ops: an op at 4 bits is not an op at 8 — digital multiplier energy grows roughly quadratically with bit width, so a fair cross-machine comparison states its precision or normalises to a common one (INT8-equivalent is the customary anchor). The numerator rule: ops must be countable, precision-tagged, and delivered on a named workload.

The denominator: six line items, usually two reported

Now the forgetful half of the fraction. A complete photonic accelerator draws power in six places, and this course has priced every one of them: the laser (at wall-plug efficiency — a 20%-efficient laser turns 1 W of needed light into 5 W at the socket, per the on-chip lasers lesson); the DACs and drivers; the ADCs and TIAs (the interface lesson's exponential price list); the thermal tuning that holds thousands of phases (the drift lesson's 20-watt surprise); and the digital orchestration — SRAM, scheduling, calibration loops. A worked example in round numbers, for the 82-TOPS mesh above:

Line itemPowerIn the brochure?
Light itself (optical MACs)≈ 0.8 W opticalalways
Laser at 20% wall-plug4 Wsometimes
DACs + ADCs (128 × 25 mW)3.2 Wrarely
Drivers + TIAs2 Wrarely
Thermal tuning (4032 phases)10 Walmost never
Digital control + SRAM5 Walmost never

Brochure arithmetic: 82 / 4 \approx 20 TOPS/W. Honest arithmetic: 82 / 24.2 \approx 3.4 TOPS/W — a factor of six, conjured purely by boundary-drawing, before any question of utilisation. Neither number is fabricated; they simply answer different questions, and only one of them is the question a datacenter operator is asking. The denominator rule: watts are measured at the wall, for the whole machine, while running the named workload.

The roofline: can the beast be fed?

Even an honestly-measured peak means nothing if data cannot arrive fast enough — and here photonics meets an unglamorous truth: its memory system is electronic. Place the accelerator on a roofline: attainable throughput is \min(\text{peak},\, \mathrm{BW}\times I), where I is the workload's arithmetic intensity in ops per byte fetched. A weight-stationary mesh streaming batch-1 vectors achieves I \approx 2 ops/byte on its activations — deep in memory-bound territory — while a well-batched layer with resident weights can reach hundreds. The ridge point I^* = \text{peak}/\mathrm{BW} tells you the minimum reuse a workload must have before the photonic peak is even reachable: raise the peak tenfold without touching the memory system and you have mostly moved the ridge further from your workloads. Slide the peak in the chart and watch how little the left half of the picture — where real inference layers live — changes.

Latency, throughput, and the auditor's checklist

One more axis, then the checklist. Photonic marketing loves latency ("inference at the speed of light") and photonic physics half-supports it: light does cross a mesh in picoseconds. But end-to-end latency includes DAC settling, detector integration, ADC conversion and the digital round trip — typically nanoseconds to microseconds — and quoted TOPS figures usually assume saturating batch sizes that are themselves a latency cost. Throughput at batch 512 and latency at batch 1 are different products; insist on knowing which one is being sold. Here is the full audit, compressed:

Six questions, thirty seconds each. Most extraordinary claims do not survive the second one.

The single most common omission in photonic-computing claims — common enough to deserve its own box — is the conversion chain. The tell is a per-op energy quoted in attojoules or single-digit femtojoules: that is the optical energy, and it is real, but the interface lesson showed that each DAC/ADC sample costs picojoules, amortised only as far as the mesh is wide. A "0.1 fJ/op" system with 8-bit converters and N = 64 is, at the wall, a ~100 fJ/op system — three orders of magnitude of difference living entirely in the phrase "conversion not included", usually detectable only in a methods section, a footnote, or an absence. The same audit applies, incidentally, to analog-electronic and memristor accelerators, which share the conversion problem and the selective amnesia. When a datasheet's energy figure seems to defy the rest of this course: find the DAC. If you cannot find it, you have found the answer.

Hardware marketing has always raced ahead of hardware. Supercomputing spent decades policing the gap between peak FLOPS and LINPACK-delivered FLOPS; the megahertz wars sold clock frequency as if it were performance until Pentium 4 made the fallacy expensive; and the first generation of AI accelerators taught everyone that "INT8 TOPS" and "FP16 TOPS" differ by design choice, not achievement. The photonic twist is only that the gap between the flattering boundary and the honest one is wider — because lasers, converters and tuning are physically separate components that can be left off a die photo with a clear conscience. The countermeasure is also old: standard workloads, measured at the wall, reported with accuracy. MLPerf did it for digital accelerators; photonics will have earned its seat at that table on the day a vendor publishes a wall-plug MLPerf number — an event worth watching for, and, as the next lesson shows, one the industry has so far been in no hurry to supply.