LLNL, Purdue Researchers Harness GPU Mixed Precision for Accuracy-Performance Tradeoff

August 5, 2019

Editor’s Note: Effective use of mixed precision calculations is becoming more important and common in scientific computing, not least because of the growing use of AI techniques in which FP64 calculations are sometimes less needed and computationally expensive. In this brief article, researchers from Lawrence Livermore National Laboratory discuss their recent breakthrough development of an auto-tuning technique for selecting optimal mixed precision calculation modes using GPUs.

Computational scientists have long relied on high-precision arithmetic to accurately solve a wide range of problems, from modeling nuclear reactors to predicting supernova physics to measuring the forces within an atomic nucleus. However, changes to hardware, spurred by the demand for more computing capability and growth in machine learning, have us rethinking the balance between the number of digits needed to perform a given calculation and computational efficiency.

Researchers from Purdue University, Prof. Saurabh Bagchi, and the U.S. Department of Energy’s Lawrence Livermore National Laboratory, Dr. Ignacio Laguna, have taken an essential step toward enabling mixed precision calculations on GPUs through novel automatic tuning methods that can be applied to real-world CUDA programs. For portions of a calculation that do not require full 64-bit double-precision arithmetic, lower precision alternatives may provide enough accuracy. The tradeoff could enable us to solve complex problems faster and at lower energy budgets, thus enabling scientific discoveries that would otherwise remain hidden away from us.

The work (GPUMixer: Performance-Driven Floating-Point Tuning for GPU Scientific Applications) recently won the best paper award at the 33rd ISC High Performance conference held June 16-20, 2019, in Frankfurt and which brought together over 3,500 researchers and commercial users. Another result from the work appeared at the 33rd International Conference on Supercomputing (ICS), held June 26-28, in Phoenix, Ariz.

The challenge that the scientific community has been trying to solve is how do we reduce the precision of the variables in a systematic manner—only those variables that would not degrade the quality of the overall result too much and their precision is reduced to the right level. Several recent changes in the GPU space have created new opportunities for mixed precision arithmetic. GPU manufacturers have begun to include native FP64 (double precision) and FP16 (half precision) arithmetic units inside of their processing units, in addition to FP32 (single precision). As a result, FP64/FP32/FP16 instructions can coexist providing different performance levels, e.g., the ratio of FP64:FP32:FP16 throughput is 1:2:4 in the P100 series of Tesla GPUs. Before the introduction of these processors, mixing FP64 and FP32 instructions had limited performance impact because mixed precision math units were rare.

The research team recently published their breakthrough result on this technical challenge.

  • PI Saurabh Bagchi said, “This solution will allow the long-running codes on GPUs, those that do a significant amount of floating-point processing, to use just the right precision of the variables to maximize speedup or alternately minimize energy consumption, and bounding the drop in quality of the output.”
  • Laguna said, “This automated approach selects precisions for floating-point arithmetic operations that both improve performance andsatisfy accuracy requirements, without needing the programmer to do the laborious tuning of the precisions.” Purdue students, Pradeep Kotipalli and Ranvijay Singh (now at NVIDIA), and Purdue Research Scientist, Dr. Paul Wood (now at Johns Hopkins University), did a significant part of the technical design and development.

No prior work has support for parallel codes found in GPU programming models as they relied on serial instrumentation or profiling support that does not span the GPU programming and execution model, such as CPU-to-GPU calls. Next, accuracy-centric approaches of the prior work lacked a performance model and simply assumed that minimal precision results in the fastest running time. For example in [figure 1], the objective function was to maximize the number of FP32 variables.

In practice, mixing precision requires casting to satisfy the mathematical operation with the most precise operand. However, casting is an expensive operation (e.g., twice as expensive as FP64 operations in the authors’ target GPU architectures) and therefore reducing precisions may actually increase the execution time. Further, when there are parallel resource pools for FP64 and FP32 (as in several GPU architectures), mixing precision allows for an additional opportunity for parallelism, which prior work ignored. Finally, approaches that solely used online runtime information [2] suffered from very large search space problems. Consider that there are nfloating point variables that can be tuned and there are 3 precision levels supported by the architecture; then the search space is 3n. In large production-level scientific applications, ncan be very large (hundreds), making this method impractical.

The authors presented AMPT-GA, pronounced “Amp-ed GA”, the first mixed precision optimization system that solves an accuracy-constrained performance maximization problem for GPU programs. AMPT-GA seeks to select the set of precision levels for floating point variables at an application level that maximizes the performance while keeping the introduced error below a tolerable threshold, as defined by the application user. The complete set of assignments of each floating point variable to a precision level is called the Precision Vector (PV) and the optimal PV is the final output of AMPT-GA.

The key insight behind AMPT-GA is that the dynamic search technique through the large space of possible precision vectors is aided by static analysis.Their static analysis identifies groups of variables whose precisions should preferentially be changed together to reduce the performance impact of the precision change of any variable through casting. Such information speeds up the online search through the large search space. Further, considering the irregular nature of the search space, AMPT-GA uses a Genetic Algorithm for the search, which helps avoid local minima that prior approaches such as [2, 3] have a tendency to fall into.

Figure 1. Overview of AMPT-GA. The inputs to AMPT-GA, shaded in green, are the application, the GPGPU properties (such as FP32 vs. FP64 instruction performance, casting cost), the error metric of interest and the corresponding error threshold, a test input, and the fuzzing process to generate similar inputs. The static path (in yellow) creates a performance and dependency model and the dynamic path (in blue) finds the Precision Vector (PV) to minimize the execution time of the application while staying under the error threshold. The blue optimization boxes are part of an iterative optimization process that run multiple generations of a Genetic Algorithm to identify the output PV. The purple boxes are measurements executed on the target GPGPU platform. During the search, each PV is evaluated through actual execution on the GPGPU unless filtered by our execution filter. The final PV for the test input is then measured against a region of similar inputs to determine its generality.

The ISC paper, GPUMixer, presents the first static analysis to identify regions of code in a GPU kernel that are guaranteed to improve performance when mixed-precision is used. While previous approaches can identify mixed-precision code segments that improve performance, they are usually dynamic in nature and require running the application many times. This approach, however, identifies these regions statically, which avoids running the application. GPUMixer also presents the first shadow computation analysis for GPUs, a method that allows estimating the error that is introduced when the precision of specific arithmetic operations is downgraded.

The team has shown the power of AMPT-GA and GPUMixer on several real GPU programs, including LULESH, a DOE’s proxy application that approximates hydrodynamics equations discretely and which has been widely used in the procurement of DOE’s next-generation supercomputers and on DOE’s Co-Design Centers. The evaluation on LULESH, the CoMD proxy application, and on several Rodinia GPU benchmarks demonstrates the practical utility of AMPT-GA and GPUMixer on finding mixed-precision configurations that improve performance and maintain an acceptable level of error.

Looking forward the work is continuing to improve the design of these methods so that even lower precision can be leveraged (e.g., half precision or lower) and better mixed-precision combinations can be found more efficiently.

Link to paper (GPUMixer: Performance-Driven Floating-Point Tuning for GPU Scientific Applications): http://lagunaresearch.org/docs/isc-2019.pdf

Authors: Ignacio Laguna (LLNL), Paul C. Wood (Johns Hopkins Applied Physics Lab), Ranvijay Singh (Nvidia), and Saurabh Bagch (Purdue University)

This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344 (Lawrence Livermore National Security, LLC – LLNL-MI-774142).

Subscribe to HPCwire's Weekly Update!

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

What’s New in Computing vs. COVID-19: Fugaku, Congress, De Novo Design & More

July 2, 2020

Supercomputing, big data and artificial intelligence are crucial tools in the fight against the coronavirus pandemic. Around the world, researchers, corporations and governments are urgently devoting their computing reso Read more…

By Oliver Peckham

OpenPOWER Reboot – New Director, New Silicon Partners, Leveraging Linux Foundation Connections

July 2, 2020

Earlier this week the OpenPOWER Foundation announced the contribution of IBM’s A21 Power processor core design to the open source community. Roughly this time last year, IBM announced open sourcing its Power instructio Read more…

By John Russell

HPC Career Notes: July 2020 Edition

July 1, 2020

In this monthly feature, we'll keep you up-to-date on the latest career developments for individuals in the high-performance computing community. Whether it's a promotion, new company hire, or even an accolade, we've got Read more…

By Mariana Iriarte

Supercomputers Enable Radical, Promising New COVID-19 Drug Development Approach

July 1, 2020

Around the world, innumerable supercomputers are sifting through billions of molecules in a desperate search for a viable therapeutic to treat COVID-19. Those molecules are pulled from enormous databases of known compoun Read more…

By Oliver Peckham

HPC-Powered Simulations Reveal a Looming Climatic Threat to Vital Monsoon Seasons

June 30, 2020

As June draws to a close, eyes are turning to the latter half of the year – and with it, the monsoon and hurricane seasons that can prove vital or devastating for many of the world’s coastal communities. Now, climate Read more…

By Oliver Peckham

AWS Solution Channel

Maxar Builds HPC on AWS to Deliver Forecasts 58% Faster Than Weather Supercomputer

When weather threatens drilling rigs, refineries, and other energy facilities, oil and gas companies want to move fast to protect personnel and equipment. And for firms that trade commodity shares in oil, precious metals, crops, and livestock, the weather can significantly impact their buy-sell decisions. Read more…

Intel® HPC + AI Pavilion

Supercomputing the Pandemic: Scientific Community Tackles COVID-19 from Multiple Perspectives

Since their inception, supercomputers have taken on the biggest, most complex, and most data-intensive computing challenges—from confirming Einstein’s theories about gravitational waves to predicting the impacts of climate change. Read more…

Hyperion Forecast – Headwinds in 2020 Won’t Stifle Cloud HPC Adoption or Arm’s Rise

June 30, 2020

The semiannual taking of HPC’s pulse by Hyperion Research – late fall at SC and early summer at ISC – is a much-watched indicator of things come. This year is no different though the conversion of ISC to a digital Read more…

By John Russell

OpenPOWER Reboot – New Director, New Silicon Partners, Leveraging Linux Foundation Connections

July 2, 2020

Earlier this week the OpenPOWER Foundation announced the contribution of IBM’s A21 Power processor core design to the open source community. Roughly this time Read more…

By John Russell

Hyperion Forecast – Headwinds in 2020 Won’t Stifle Cloud HPC Adoption or Arm’s Rise

June 30, 2020

The semiannual taking of HPC’s pulse by Hyperion Research – late fall at SC and early summer at ISC – is a much-watched indicator of things come. This yea Read more…

By John Russell

Racism and HPC: a Special Podcast

June 29, 2020

Promoting greater diversity in HPC is a much-discussed goal and ostensibly a long-sought goal in HPC. Yet it seems clear HPC is far from achieving this goal. Re Read more…

Top500 Trends: Movement on Top, but Record Low Turnover

June 25, 2020

The 55th installment of the Top500 list saw strong activity in the leadership segment with four new systems in the top ten and a crowning achievement from the f Read more…

By Tiffany Trader

ISC 2020 Keynote: Hope for the Future, Praise for Fugaku and HPC’s Pandemic Response

June 24, 2020

In stark contrast to past years Thomas Sterling’s ISC20 keynote today struck a more somber note with the COVID-19 pandemic as the central character in Sterling’s annual review of worldwide trends in HPC. Better known for his engaging manner and occasional willingness to poke prickly egos, Sterling instead strode through the numbing statistics associated... Read more…

By John Russell

ISC 2020’s Student Cluster Competition Winners Announced

June 24, 2020

Normally, the Student Cluster Competition involves teams of students building real computing clusters on the show floors of major supercomputer conferences and Read more…

By Oliver Peckham

Hoefler’s Whirlwind ISC20 Virtual Tour of ML Trends in 9 Slides

June 23, 2020

The ISC20 experience this year via livestreaming and pre-recordings is interesting and perhaps a bit odd. That said presenters’ efforts to condense their comments makes for economic use of your time. Torsten Hoefler’s whirlwind 12-minute tour of ML is a great example. Hoefler, leader of the planned ISC20 Machine Learning... Read more…

By John Russell

At ISC, the Fight Against COVID-19 Took the Stage – and Yes, Fugaku Was There

June 23, 2020

With over nine million infected and nearly half a million dead, the COVID-19 pandemic has seized the world’s attention for several months. It has also dominat Read more…

By Oliver Peckham

Supercomputer Modeling Tests How COVID-19 Spreads in Grocery Stores

April 8, 2020

In the COVID-19 era, many people are treating simple activities like getting gas or groceries with caution as they try to heed social distancing mandates and protect their own health. Still, significant uncertainty surrounds the relative risk of different activities, and conflicting information is prevalent. A team of Finnish researchers set out to address some of these uncertainties by... Read more…

By Oliver Peckham

[email protected] Turns Its Massive Crowdsourced Computer Network Against COVID-19

March 16, 2020

For gamers, fighting against a global crisis is usually pure fantasy – but now, it’s looking more like a reality. As supercomputers around the world spin up Read more…

By Oliver Peckham

[email protected] Rallies a Legion of Computers Against the Coronavirus

March 24, 2020

Last week, we highlighted [email protected], a massive, crowdsourced computer network that has turned its resources against the coronavirus pandemic sweeping the globe – but [email protected] isn’t the only game in town. The internet is buzzing with crowdsourced computing... Read more…

By Oliver Peckham

Global Supercomputing Is Mobilizing Against COVID-19

March 12, 2020

Tech has been taking some heavy losses from the coronavirus pandemic. Global supply chains have been disrupted, virtually every major tech conference taking place over the next few months has been canceled... Read more…

By Oliver Peckham

Supercomputer Simulations Reveal the Fate of the Neanderthals

May 25, 2020

For hundreds of thousands of years, neanderthals roamed the planet, eventually (almost 50,000 years ago) giving way to homo sapiens, which quickly became the do Read more…

By Oliver Peckham

DoE Expands on Role of COVID-19 Supercomputing Consortium

March 25, 2020

After announcing the launch of the COVID-19 High Performance Computing Consortium on Sunday, the Department of Energy yesterday provided more details on its sco Read more…

By John Russell

Steve Scott Lays Out HPE-Cray Blended Product Roadmap

March 11, 2020

Last week, the day before the El Capitan processor disclosures were made at HPE's new headquarters in San Jose, Steve Scott (CTO for HPC & AI at HPE, and former Cray CTO) was on-hand at the Rice Oil & Gas HPC conference in Houston. He was there to discuss the HPE-Cray transition and blended roadmap, as well as his favorite topic, Cray's eighth-gen networking technology, Slingshot. Read more…

By Tiffany Trader

Honeywell’s Big Bet on Trapped Ion Quantum Computing

April 7, 2020

Honeywell doesn’t spring to mind when thinking of quantum computing pioneers, but a decade ago the high-tech conglomerate better known for its control systems waded deliberately into the then calmer quantum computing (QC) waters. Fast forward to March when Honeywell announced plans to introduce an ion trap-based quantum computer whose ‘performance’ would... Read more…

By John Russell

Leading Solution Providers


Neocortex Will Be First-of-Its-Kind 800,000-Core AI Supercomputer

June 9, 2020

Pittsburgh Supercomputing Center (PSC - a joint research organization of Carnegie Mellon University and the University of Pittsburgh) has won a $5 million award Read more…

By Tiffany Trader

‘Billion Molecules Against COVID-19’ Challenge to Launch with Massive Supercomputing Support

April 22, 2020

Around the world, supercomputing centers have spun up and opened their doors for COVID-19 research in what may be the most unified supercomputing effort in hist Read more…

By Oliver Peckham

Australian Researchers Break All-Time Internet Speed Record

May 26, 2020

If you’ve been stuck at home for the last few months, you’ve probably become more attuned to the quality (or lack thereof) of your internet connection. Even Read more…

By Oliver Peckham

15 Slides on Programming Aurora and Exascale Systems

May 7, 2020

Sometime in 2021, Aurora, the first planned U.S. exascale system, is scheduled to be fired up at Argonne National Laboratory. Cray (now HPE) and Intel are the k Read more…

By John Russell

Nvidia’s Ampere A100 GPU: Up to 2.5X the HPC, 20X the AI

May 14, 2020

Nvidia's first Ampere-based graphics card, the A100 GPU, packs a whopping 54 billion transistors on 826mm2 of silicon, making it the world's largest seven-nanom Read more…

By Tiffany Trader

10nm, 7nm, 5nm…. Should the Chip Nanometer Metric Be Replaced?

June 1, 2020

The biggest cool factor in server chips is the nanometer. AMD beating Intel to a CPU built on a 7nm process node* – with 5nm and 3nm on the way – has been i Read more…

By Doug Black

Summit Supercomputer is Already Making its Mark on Science

September 20, 2018

Summit, now the fastest supercomputer in the world, is quickly making its mark in science – five of the six finalists just announced for the prestigious 2018 Read more…

By John Russell

TACC Supercomputers Run Simulations Illuminating COVID-19, DNA Replication

March 19, 2020

As supercomputers around the world spin up to combat the coronavirus, the Texas Advanced Computing Center (TACC) is announcing results that may help to illumina Read more…

By Staff report

  • arrow
  • Click Here for More Headlines
  • arrow
Do NOT follow this link or you will be banned from the site!
Share This