Revaluating FPGAs for 64-bit Floating-Point Calculations

By Dave Strenski of Cray, and Jim Simkins, Richard Walke and Ralph Wittig of Xilinx

May 14, 2008

A year ago the article “FPGA Floating Point Performance — a pencil and paper evaluation” was published in HPCwire showing a method for comparing the peak 64-bit floating-point performance between FPGAs and Opteron processors. The article showed that the theoretical peak performance of the Virtex-4 LX200 was about 50 percent better than the then current dual-core Opteron. Since that article, a follow-up whitepaper from Altrea added refinements to the calculations to make them more realistic, which dropped the 64-bit floating-point performance of the LX200 to about equal to that of the 2.5 GHz dual-core Opteron for matrix multiply.

A year later, we now have generally available 2.5 GHz quad-core Opterons and Virtex-5 LX330, SX95T and recently announced SX240T FPGAs. In addition to this, Xilinx is releasing a new version of their floating-point cores that reduces the amount of logic and DSP slices needed for building floating-point function units. Taken together it is time to revisit Opteron floating-point performance versus FPGA performance.

Using the same assumptions as before, the peak performance of a microprocessor is given as the number of floating-point results per clock, times the number of cores, times the clock frequency. For the quad-core Opteron, this equates to a theoretical peak of (4 ops/clk * 4 cores * 2.5 GHz) 40 Gflop/s in 64-bit mode and 80 Gflop/s in 32-bit mode. For actual predicted performance, microprocessors use DGEMM (64-bit matrix multiply), which is typically 80 percent to 90 percent lower then the peak.

For FPGAs, the peak can be represented as the available logic on the device divided by the amount of logic needed to build a function unit, times the maximum clock frequency those function units will run at. Calculating this peak is more involved since there are several ways one can implement function units, using different ratios of logic and DSP resources. The microprocessors are also forced to yield an “add” and a “mult” every clock cycle, whereas the FPGA’s ratio of “add” to “mult” can be varied, creating multiple peak performances.

To calculate the FPGA’s actual performance level, first we need to remove a section of logic to be used for the interface to the microprocessor and the logic needed for memory controllers. Using the data from the DRC’s data sheet, we see that an interface can use as much at 20,000 LUTs. For the calculations in the table below, 20,000 LUTs and 20,000 FFs have been subtracted from the devices for this interface. Next, as mentioned in the Altera whitepaper, the total amount of LUTs and FFs are further reduced by removing another 33 percent of the logic for routing. Finally, the clock frequency at which the device will run the function units is the minimum of the clock frequencies for all the floating-point cores placed on the device. This clock frequency is then further reduced by 15 percent for routing and timing considerations.

Since we’re looking at multiple FPGAs and multiple ratios of “add” to “mult”, a pencil and paper calculation quickly gets tedious. Looking at three FPGA devices (LX330, SX95T, SX240T), two floating-point precisions (64-bit and 32-bit), and six implementations of a function unit, “add” (full and logic) and “mult” (max, full, medium, logic), a program was written to exhaustively try every combination of function units for the two precisions and found the maximum number of function units that would fit on each device. The program then calculates the frequency at which those function units would run and the Gflop/s performance for each configuration, saving the best configuration for different ratios of “add” to “mult”. The table shows the outcome of these calculations along with speedup values over the reference quad-core Opteron.

Predicted Performance

                    GFLOPS (64-bits)           Speedup over Opteron
             Opteron  LX330   SX95T  SX240T    LX330  SX95T  SX240T
all add       17.00   32.96    8.99   29.97     1.94   0.53   1.76
8-add:1-mult  19.13   33.77    8.99   29.97     1.77   0.47   1.57
4-add:1-mult  21.25   28.14    8.32   32.10     1.32   0.39   1.51
2-add:1-mult  25.50   21.71    9.99   34.97     0.85   0.39   1.37
1-add:1-mult  34.00   18.89   11.32   39.29     0.56   0.33   1.16
1-add:2-mult  25.50   16.28   12.99   42.37     0.64   0.51   1.66
1-add:4-mult  21.25   15.07   13.32   43.33     0.71   0.63   2.04
1-add:8-mult  19.13   14.47   14.98   40.45     0.76   0.78   2.12
all mult      17.00   13.47   17.75   37.56     0.79   1.04   2.21
best                  34.30   17.75   44.94              
                          
                    GFLOPS (32-bits)           Speedup over Opteron
             Opteron  LX330   SX95T  SX240T    LX330  SX95T  SX240T
all add       34.00   85.09   24.01   80.39     2.50   0.71   2.36
8-add:1-mult  38.25   87.43   25.06   84.56     2.29   0.66   2.21
4-add:1-mult  42.50   90.45   27.84   92.22     2.13   0.66   2.17
2-add:1-mult  51.00   94.47   31.32  104.40     1.85   0.61   2.05
1-add:1-mult  68.00   89.04   36.19  122.50     1.31   0.53   1.80
1-add:2-mult  51.00   88.72   43.85  141.98     1.74   0.86   2.78
1-add:4-mult  42.50   81.81   53.94  149.64     1.92   1.27   3.52
1-add:8-mult  38.25   79.08   62.64  153.47     2.07   1.64   4.01
all mult      34.00   79.69   75.17  162.52     2.34   2.21   4.78
best                  94.47   75.17  162.52

As an example of one of these data points, the 64-bit performance for an equal ratio of “add” to “mult” is calculated by placing 59 full “add”s and 59 max “mult”s. This design uses (59*730 + 59*327) 62,363 LUTs, (59*957 + 59*504) 86,199 FFs, and (59*3 + 59*11) 826 DSP slices and runs at a the discounted clock frequency of 333 MHz. These resources are all less than what is available on the SX240T device, LUTs (149,760-20,000)*(2/3) 86,506, FFs (149,760-20,000)*(2/3) 86,506, and DSP 1056, with the FFs being the limiting factor.

Even though the Opteron has increased its performance 4x from the dual-core (2x ops/clk and 2x in cores), the current FPGAs are still able to keep pace with Opterons. Even at the Opteron’s optimal design point of an “add” and “mult” per clock, the SX240T is still 1.16 better at 64-bits and 1.80x at 32-bit results. More notable is how the FPGA’s speedup over Opteron gets better as the ratio of “add” to “mult” moves away from this optimal design point. In the best cases the SX240T running an algorithm using only 64-bit floating-point “add” is 1.76x faster and an algorithm using only “mult” would be 2.21x faster. With 32-bit floating-point numbers in the all “mult” situation, the SX240T is 4.78x faster.

The current amount of work needed to make efficient FPGA designs might discourage a user from exploring FPGA acceleration. However we must realize that the DGEMM performance on a microprocessor is the best actual performance and typically hand coded in assembler by the microprocessor vendor. Typical user code that has been run through a compiler normally achieves maybe 25 percent of the peak, and even less as the number of cores increases. Advanced users will spend a great deal of time coaching the compiler to generate better performance, but there are a limited number of options. While FPGA programming may be more challenging, the programmer has complete control over the device and is able to create a design that achieves results much closer to the predicted performance numbers. This work can also be contracted to an FPGA expert to ensure optimal performance.

These tables considered the device itself and not the interconnect bandwidth. The speed gained on any accelerator device is moot if the time required to export the data from the microprocessor’s memory to the accelerator and back exceeds the time the microprocessor could have calculate the result in place. As an example, the DRC system uses a 16-bit wide, 400 MHz, DDR HyperTransport connection to their Virtex-4 device, giving it a peak bandwidth of 1.6 GB/s in and 1.6 GB/s out. This speed is limited by the clock frequency of the Virtex-4, and the Virtex-5 should be able to clock this connection at 600 MHz, giving a bandwidth in and out of 2.4 GB/s. Still, the algorithm being accelerated will need to have a fairly high computational intensity to take advantages of the FPGA.

Once the data is on the FPGA accelerator, the other factor that controls performance is the local memory bandwidth. Referencing the DRC RPU datasheet, that FPGA implementation has an aggregate peak memory bandwidth of 14.4 GB/s using a Virtex-4 device, with the Virtex-5 improving this bandwidth. Lastly, once the data is on the FPGA, the SX240T has 516 dual-ported 36-bit wide Block RAMs, which means the design can pull and/or push (32/8 * 2 * 516) 4128 bytes every clock. At a conservative clock frequency of 250 MHz, that’s 1032 GB/s of internal memory bandwidth. These higher bandwidths are what give the FPGA a true advantage over the microprocessor. Not only are the bandwidths higher but they are more flexible and can be used to make a custom cache for the algorithm being solved.

Looking at the resource needs between 32-bit and 64-bit function units, the Xilinx cores show that floating-point 64-bit adds take twice as much logic as 32-bit adds, but 64-bit multiplies take four times as much logic as 32-bit multiplies. This can make a significant difference in the number of function units that can fit on a device. To use this as an advantage, recall what developers did on the Cell processor in “Exploiting Single Precision Arithmetic and Achieving Full Precision Accuracy.” The FPGA could get even better results then above by calculating 32 or 24-bit floating point results and iterating those results up to a higher precision.

Another consideration is what does 64-bit accuracy mean and do we really need it? A recently published paper in International Symposium on FPGA “When FPGAs are better at floating-point than microprocessors,” goes into this topic in detail. The paper explains that most interfaces to computing systems are inherently fixed-point. “No sensors nor analog-to-digital converter provides floating-point output, let alone 64-bit floating-point precision.” Programmers should take advantage of this inherent fixed-point input and use it as an advantage and build algorithms that use the minimal amount of precision to achieve the accuracy needed, and pack more performance on the computing device.

To understand the raw computing performance of the FPGA, consider the SX240T with 149,760 LUT6 with 2 outputs per LUT (149,760 LUTs * 2 bit operators per LUT * 250 Mhz * 1/64) is 1.17 trillion 64-bit op/s. Compare to the quad-core Opteron’s 40 billion 64-bit op/s. Add to this the flexibility of wiring those operations any way the programmer wishes.

Clearly microprocessors are hitting their limits in serial processing, and programmers are forced to make their codes more parallel. There are many options; multi-processor, multi-core, Cell, GPUs, FPGAs and others. While FPGAs can keep pace with the microprocessor at their optimal design point, their are many codes for which the FPGA are the best choice for acceleration.

Subscribe to HPCwire's Weekly Update!

Be the most informed person in the room! Stay ahead of the tech trends with industry updates delivered to you every week!

2024 Winter Classic: Texas Two Step

April 18, 2024

Texas Tech University. Their middle name is ‘tech’, so it’s no surprise that they’ve been fielding not one, but two teams in the last three Winter Classic cluster competitions. Their teams, dubbed Matador and Red Read more…

2024 Winter Classic: The Return of Team Fayetteville

April 18, 2024

Hailing from Fayetteville, NC, Fayetteville State University stayed under the radar in their first Winter Classic competition in 2022. Solid students for sure, but not a lot of HPC experience. All good. They didn’t Read more…

Software Specialist Horizon Quantum to Build First-of-a-Kind Hardware Testbed

April 18, 2024

Horizon Quantum Computing, a Singapore-based quantum software start-up, announced today it would build its own testbed of quantum computers, starting with use of Rigetti’s Novera 9-qubit QPU. The approach by a quantum Read more…

2024 Winter Classic: Meet Team Morehouse

April 17, 2024

Morehouse College? The university is well-known for their long list of illustrious graduates, the rigor of their academics, and the quality of the instruction. They were one of the first schools to sign up for the Winter Read more…

MLCommons Launches New AI Safety Benchmark Initiative

April 16, 2024

MLCommons, organizer of the popular MLPerf benchmarking exercises (training and inference), is starting a new effort to benchmark AI Safety, one of the most pressing needs and hurdles to widespread AI adoption. The sudde Read more…

Quantinuum Reports 99.9% 2-Qubit Gate Fidelity, Caps Eventful 2 Months

April 16, 2024

March and April have been good months for Quantinuum, which today released a blog announcing the ion trap quantum computer specialist has achieved a 99.9% (three nines) two-qubit gate fidelity on its H1 system. The lates Read more…

Software Specialist Horizon Quantum to Build First-of-a-Kind Hardware Testbed

April 18, 2024

Horizon Quantum Computing, a Singapore-based quantum software start-up, announced today it would build its own testbed of quantum computers, starting with use o Read more…

MLCommons Launches New AI Safety Benchmark Initiative

April 16, 2024

MLCommons, organizer of the popular MLPerf benchmarking exercises (training and inference), is starting a new effort to benchmark AI Safety, one of the most pre Read more…

Exciting Updates From Stanford HAI’s Seventh Annual AI Index Report

April 15, 2024

As the AI revolution marches on, it is vital to continually reassess how this technology is reshaping our world. To that end, researchers at Stanford’s Instit Read more…

Intel’s Vision Advantage: Chips Are Available Off-the-Shelf

April 11, 2024

The chip market is facing a crisis: chip development is now concentrated in the hands of the few. A confluence of events this week reminded us how few chips Read more…

The VC View: Quantonation’s Deep Dive into Funding Quantum Start-ups

April 11, 2024

Yesterday Quantonation — which promotes itself as a one-of-a-kind venture capital (VC) company specializing in quantum science and deep physics  — announce Read more…

Nvidia’s GTC Is the New Intel IDF

April 9, 2024

After many years, Nvidia's GPU Technology Conference (GTC) was back in person and has become the conference for those who care about semiconductors and AI. I Read more…

Google Announces Homegrown ARM-based CPUs 

April 9, 2024

Google sprang a surprise at the ongoing Google Next Cloud conference by introducing its own ARM-based CPU called Axion, which will be offered to customers in it Read more…

Computational Chemistry Needs To Be Sustainable, Too

April 8, 2024

A diverse group of computational chemists is encouraging the research community to embrace a sustainable software ecosystem. That's the message behind a recent Read more…

Nvidia H100: Are 550,000 GPUs Enough for This Year?

August 17, 2023

The GPU Squeeze continues to place a premium on Nvidia H100 GPUs. In a recent Financial Times article, Nvidia reports that it expects to ship 550,000 of its lat Read more…

Synopsys Eats Ansys: Does HPC Get Indigestion?

February 8, 2024

Recently, it was announced that Synopsys is buying HPC tool developer Ansys. Started in Pittsburgh, Pa., in 1970 as Swanson Analysis Systems, Inc. (SASI) by John Swanson (and eventually renamed), Ansys serves the CAE (Computer Aided Engineering)/multiphysics engineering simulation market. Read more…

Intel’s Server and PC Chip Development Will Blur After 2025

January 15, 2024

Intel's dealing with much more than chip rivals breathing down its neck; it is simultaneously integrating a bevy of new technologies such as chiplets, artificia Read more…

Choosing the Right GPU for LLM Inference and Training

December 11, 2023

Accelerating the training and inference processes of deep learning models is crucial for unleashing their true potential and NVIDIA GPUs have emerged as a game- Read more…

Baidu Exits Quantum, Closely Following Alibaba’s Earlier Move

January 5, 2024

Reuters reported this week that Baidu, China’s giant e-commerce and services provider, is exiting the quantum computing development arena. Reuters reported � Read more…

Comparing NVIDIA A100 and NVIDIA L40S: Which GPU is Ideal for AI and Graphics-Intensive Workloads?

October 30, 2023

With long lead times for the NVIDIA H100 and A100 GPUs, many organizations are looking at the new NVIDIA L40S GPU, which it’s a new GPU optimized for AI and g Read more…

Shutterstock 1179408610

Google Addresses the Mysteries of Its Hypercomputer 

December 28, 2023

When Google launched its Hypercomputer earlier this month (December 2023), the first reaction was, "Say what?" It turns out that the Hypercomputer is Google's t Read more…

AMD MI3000A

How AMD May Get Across the CUDA Moat

October 5, 2023

When discussing GenAI, the term "GPU" almost always enters the conversation and the topic often moves toward performance and access. Interestingly, the word "GPU" is assumed to mean "Nvidia" products. (As an aside, the popular Nvidia hardware used in GenAI are not technically... Read more…

Leading Solution Providers

Contributors

Shutterstock 1606064203

Meta’s Zuckerberg Puts Its AI Future in the Hands of 600,000 GPUs

January 25, 2024

In under two minutes, Meta's CEO, Mark Zuckerberg, laid out the company's AI plans, which included a plan to build an artificial intelligence system with the eq Read more…

DoD Takes a Long View of Quantum Computing

December 19, 2023

Given the large sums tied to expensive weapon systems – think $100-million-plus per F-35 fighter – it’s easy to forget the U.S. Department of Defense is a Read more…

China Is All In on a RISC-V Future

January 8, 2024

The state of RISC-V in China was discussed in a recent report released by the Jamestown Foundation, a Washington, D.C.-based think tank. The report, entitled "E Read more…

Shutterstock 1285747942

AMD’s Horsepower-packed MI300X GPU Beats Nvidia’s Upcoming H200

December 7, 2023

AMD and Nvidia are locked in an AI performance battle – much like the gaming GPU performance clash the companies have waged for decades. AMD has claimed it Read more…

Nvidia’s New Blackwell GPU Can Train AI Models with Trillions of Parameters

March 18, 2024

Nvidia's latest and fastest GPU, codenamed Blackwell, is here and will underpin the company's AI plans this year. The chip offers performance improvements from Read more…

Eyes on the Quantum Prize – D-Wave Says its Time is Now

January 30, 2024

Early quantum computing pioneer D-Wave again asserted – that at least for D-Wave – the commercial quantum era has begun. Speaking at its first in-person Ana Read more…

GenAI Having Major Impact on Data Culture, Survey Says

February 21, 2024

While 2023 was the year of GenAI, the adoption rates for GenAI did not match expectations. Most organizations are continuing to invest in GenAI but are yet to Read more…

The GenAI Datacenter Squeeze Is Here

February 1, 2024

The immediate effect of the GenAI GPU Squeeze was to reduce availability, either direct purchase or cloud access, increase cost, and push demand through the roof. A secondary issue has been developing over the last several years. Even though your organization secured several racks... Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire