# What are flops and how are they benchmarked?

Apple has just proudly stated that their new mac pro will be able to give up to 7 teraflops of computing power. Flops stands for Floating Point Operations Per Second. How exactly is this benchmarked though? Certain floating point operations are much heavier than others, so how exactly would a FLOP be a benchmark for computing power?

• This could be moved to scicomp.stackexchange.com
– Max Hutchinson
Commented Jun 10, 2013 at 23:37

As far as I know, they give peak performance values. Given clock speed $f$ (in Hz) and number of cycles per (shortest) floating point operation $c$, the peak performance is essentially $f \cdot c$.

Of course, modern machines execute multiple floating point operations in parallel, have multiple cores etc. A more accurate formula can be found on Wikipedia.

This measure ignores all of the pain any real program encounters, e.g. cache misses and pipeline stalls. That is, any (reasonable) benchmark will not reach this number. But as an (unattainable) ultimate figure it can be useful to compare machines and even programs (how close to peak performance do they get?) -- take such statements with a grain of salt, always.

• Such peak measurements also count floating point multiply-add as two operations even when it is a single architectural and microarchitectural operation. Such probably also uses single-precision values (which usually have twice the throughput on CPUs and an even greater discrepancy on GPUs). It likely (given Apple's reputation) also includes GPU compute--not entirely unreasonable but such tends to inflate the numbers.
– user4577
Commented Jun 11, 2013 at 18:22

I guess you should ask Apple how they got that figure. For instance, maybe they ran the lapack/linpack benchmarks (or similar) like they do for the Top500. If they're using benchmarks, this will include real-world limiting factors that Raphael mentions. Performance in the range of several teraflops is pretty respectable for a modern consumer system, equivalent to a beefy CPU and a mid-range GPU or two.

To answer your question, then, FLOPS stands for "floating point operation per second", it's measured by executing code that performs a known number and mix of floating point operations, and reporting the number of operations divided by the total time. Professionals will look at FLOPS measurements from a variety of scenarios and report appropriate metrics based on the collected data. Measuring FLOPS is a well-studied and supported endeavor and lots of benchmark suites exist for precisely this purpose. Analytical computations can be useful for upper bounds but are otherwise basically useless.

Apple has just proudly stated that their new mac pro will be able to give up to 7 teraflops of computing power. Flops stands for Floating Point Operations Per Second. How exactly is this benchmarked though?

The 7 TFLOPs spec comes from Apple's new MacPro page.

The spec is probably based on the workstation having two AMD FirePro W9000's; each according to AMD is capable of "4.0 TFLOPs single precision" performance.

Certain floating point operations are much heavier than others, so how exactly would a FLOP be a benchmark for computing power?

I could not find information on how AMD benchmarks this particular GPU for FLOPS measurements, but in general benchmarks use a mixture of operations (addition, multiplication and division) in problem sets, attempting to simulate real world conditions. FLOPS is not useful benchmark for general computing power. Unless you're doing embarrassingly parallel single-precision floating point computations, you should just ignore the Apple FLOPS number.

that's much simpler than one could imagine. first, since it's a commercial world, they say about peak performance, i.e. maximum number of FP operations that it can execute in a second. yes, it easily may be just additions. or since many modern cpus/gpus implement MAD (multiple-then-add) - it may be MAD counted as two FP operations

next, most of this power goes from GPU rather than CPU. modern GPUs are massively parallel computers, after all. i don't want to look into actual GPU specs, but it have something like 2000 cores running at about 1 Ghz. So it may perform 4 TFLOPS per GPU (remember MADs!) and 8 TFLOPS with 2 GPUs installed

Of course, since it's the peak performance, you have problems reaching the same speed in real application - you may be limited by memory/PCI-Express speed, or by the fact that those 2000 cores are joined into only a few dozens of independent execution unites, with all cores inside single unit performing the same program with different data (i.e. SIMD operation)