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!

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

March 18, 2024

Nvidia's latest and fastest GPU, code-named Blackwell, is here and will underpin the company's AI plans this year. The chip offers performance improvements from its predecessors, including the red-hot H100 and A100 GPUs. Read more…

Nvidia Showcases Quantum Cloud, Expanding Quantum Portfolio at GTC24

March 18, 2024

Nvidia’s barrage of quantum news at GTC24 this week includes new products, signature collaborations, and a new Nvidia Quantum Cloud for quantum developers. While Nvidia may not spring to mind when thinking of the quant Read more…

2024 Winter Classic: Meet the HPE Mentors

March 18, 2024

The latest installment of the 2024 Winter Classic Studio Update Show features our interview with the HPE mentor team who introduced our student teams to the joys (and potential sorrows) of the HPL (LINPACK) and accompany Read more…

Houston We Have a Solution: Addressing the HPC and Tech Talent Gap

March 15, 2024

Generations of Houstonian teachers, counselors, and parents have either worked in the aerospace industry or know people who do - the prospect of entering the field was normalized for boys in 1969 when the Apollo 11 missi Read more…

Apple Buys DarwinAI Deepening its AI Push According to Report

March 14, 2024

Apple has purchased Canadian AI startup DarwinAI according to a Bloomberg report today. Apparently the deal was done early this year but still hasn’t been publicly announced according to the report. Apple is preparing Read more…

Survey of Rapid Training Methods for Neural Networks

March 14, 2024

Artificial neural networks are computing systems with interconnected layers that process and learn from data. During training, neural networks utilize optimization algorithms to iteratively refine their parameters until Read more…

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

March 18, 2024

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

Nvidia Showcases Quantum Cloud, Expanding Quantum Portfolio at GTC24

March 18, 2024

Nvidia’s barrage of quantum news at GTC24 this week includes new products, signature collaborations, and a new Nvidia Quantum Cloud for quantum developers. Wh Read more…

Houston We Have a Solution: Addressing the HPC and Tech Talent Gap

March 15, 2024

Generations of Houstonian teachers, counselors, and parents have either worked in the aerospace industry or know people who do - the prospect of entering the fi Read more…

Survey of Rapid Training Methods for Neural Networks

March 14, 2024

Artificial neural networks are computing systems with interconnected layers that process and learn from data. During training, neural networks utilize optimizat Read more…

PASQAL Issues Roadmap to 10,000 Qubits in 2026 and Fault Tolerance in 2028

March 13, 2024

Paris-based PASQAL, a developer of neutral atom-based quantum computers, yesterday issued a roadmap for delivering systems with 10,000 physical qubits in 2026 a Read more…

India Is an AI Powerhouse Waiting to Happen, but Challenges Await

March 12, 2024

The Indian government is pushing full speed ahead to make the country an attractive technology base, especially in the hot fields of AI and semiconductors, but Read more…

Charles Tahan Exits National Quantum Coordination Office

March 12, 2024

(March 1, 2024) My first official day at the White House Office of Science and Technology Policy (OSTP) was June 15, 2020, during the depths of the COVID-19 loc Read more…

AI Bias In the Spotlight On International Women’s Day

March 11, 2024

What impact does AI bias have on women and girls? What can people do to increase female participation in the AI field? These are some of the questions the tech Read more…

Alibaba Shuts Down its Quantum Computing Effort

November 30, 2023

In case you missed it, China’s e-commerce giant Alibaba has shut down its quantum computing research effort. It’s not entirely clear what drove the change. 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…

Analyst Panel Says Take the Quantum Computing Plunge Now…

November 27, 2023

Should you start exploring quantum computing? Yes, said a panel of analysts convened at Tabor Communications HPC and AI on Wall Street conference earlier this y 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…

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…

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…

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…

Leading Solution Providers

Contributors

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…

Training of 1-Trillion Parameter Scientific AI Begins

November 13, 2023

A US national lab has started training a massive AI brain that could ultimately become the must-have computing resource for scientific researchers. Argonne N 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…

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…

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…

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…

Google Introduces ‘Hypercomputer’ to Its AI Infrastructure

December 11, 2023

Google ran out of monikers to describe its new AI system released on December 7. Supercomputer perhaps wasn't an apt description, so it settled on Hypercomputer 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…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire