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!

At Long Last, Supercomputing Helps to Map the Poles

August 22, 2019

“For years,” Paul Morin wrote, “those of us that made maps of the Poles apologized. We apologized for the blank spaces on maps, we apologized for mountains being in the wrong place and out-of-date information.” Read more…

By Oliver Peckham

Xilinx Says Its New FPGA is World’s Largest

August 21, 2019

In this age of exploding “technology disaggregation” – in which the Big Bang emanating from the Intel x86 CPU has produced significant advances in CPU chips and a raft of alternative, accelerated architectures... Read more…

By Doug Black

Supercomputers Generate Universes to Illuminate Galactic Formation

August 20, 2019

With advanced imaging and satellite technologies, it’s easier than ever to see a galaxy – but understanding how they form (a process that can take billions of years) is a different story. Now, a team of researchers f Read more…

By Oliver Peckham

AWS Solution Channel

Efficiency and Cost-Optimization for HPC Workloads – AWS Batch and Amazon EC2 Spot Instances

High Performance Computing on AWS leverages the power of cloud computing and the extreme scale it offers to achieve optimal HPC price/performance. With AWS you can right size your services to meet exactly the capacity requirements you need without having to overprovision or compromise capacity. Read more…

HPE Extreme Performance Solutions

Bring the combined power of HPC and AI to your business transformation

FPGA (Field Programmable Gate Array) acceleration cards are not new, as they’ve been commercially available since 1984. Typically, the emphasis around FPGAs has centered on the fact that they’re programmable accelerators, and that they can truly offer workload specific hardware acceleration solutions without requiring custom silicon. Read more…

IBM Accelerated Insights

Keys to Attracting the Newest HPC Talent – Post-Millennials

[Connect with HPC users and learn new skills in the IBM Spectrum LSF User Community.]

For engineers and scientists growing up in the 80s, the current state of HPC makes perfect sense. Read more…

Singularity Moves Up the Container Value Chain

August 20, 2019

The enterprise version of the Singularity HPC container platform released this week by Sylabs is designed to allow users to create, secure and share the high-end containers in self-hosted production deployments. The e Read more…

By George Leopold

At Long Last, Supercomputing Helps to Map the Poles

August 22, 2019

“For years,” Paul Morin wrote, “those of us that made maps of the Poles apologized. We apologized for the blank spaces on maps, we apologized for mountains being in the wrong place and out-of-date information.” Read more…

By Oliver Peckham

IBM Deepens Plunge into Open Source; OpenPOWER to Join Linux Foundation

August 20, 2019

IBM today announced it was contributing the instruction set (ISA) for its Power microprocessor and the designs for the Open Coherent Accelerator Processor Inter Read more…

By John Russell

Ayar Labs to Demo Photonics Chiplet in FPGA Package at Hot Chips

August 19, 2019

Silicon startup Ayar Labs continues to gain momentum with its DARPA-backed optical chiplet technology that puts advanced electronics and optics on the same chip Read more…

By Tiffany Trader

Scientists to Tap Exascale Computing to Unlock the Mystery of our Accelerating Universe

August 14, 2019

The universe and everything in it roared to life with the Big Bang approximately 13.8 billion years ago. It has continued expanding ever since. While we have a Read more…

By Rob Johnson

AI is the Next Exascale – Rick Stevens on What that Means and Why It’s Important

August 13, 2019

Twelve years ago the Department of Energy (DOE) was just beginning to explore what an exascale computing program might look like and what it might accomplish. Today, DOE is repeating that process for AI, once again starting with science community town halls to gather input and stimulate conversation. The town hall program... Read more…

By Tiffany Trader and John Russell

Cray Wins NNSA-Livermore ‘El Capitan’ Exascale Contract

August 13, 2019

Cray has won the bid to build the first exascale supercomputer for the National Nuclear Security Administration (NNSA) and Lawrence Livermore National Laborator Read more…

By Tiffany Trader

AMD Launches Epyc Rome, First 7nm CPU

August 8, 2019

From a gala event at the Palace of Fine Arts in San Francisco yesterday (Aug. 7), AMD launched its second-generation Epyc Rome x86 chips, based on its 7nm proce Read more…

By Tiffany Trader

Lenovo Drives Single-Socket Servers with AMD Epyc Rome CPUs

August 7, 2019

No summer doldrums here. As part of the AMD Epyc Rome launch event in San Francisco today, Lenovo announced two new single-socket servers, the ThinkSystem SR635 Read more…

By Doug Black

High Performance (Potato) Chips

May 5, 2006

In this article, we focus on how Procter & Gamble is using high performance computing to create some common, everyday supermarket products. Tom Lange, a 27-year veteran of the company, tells us how P&G models products, processes and production systems for the betterment of consumer package goods. Read more…

By Michael Feldman

Supercomputer-Powered AI Tackles a Key Fusion Energy Challenge

August 7, 2019

Fusion energy is the Holy Grail of the energy world: low-radioactivity, low-waste, zero-carbon, high-output nuclear power that can run on hydrogen or lithium. T Read more…

By Oliver Peckham

Cray, AMD to Extend DOE’s Exascale Frontier

May 7, 2019

Cray and AMD are coming back to Oak Ridge National Laboratory to partner on the world’s largest and most expensive supercomputer. The Department of Energy’s Read more…

By Tiffany Trader

Graphene Surprises Again, This Time for Quantum Computing

May 8, 2019

Graphene is fascinating stuff with promise for use in a seeming endless number of applications. This month researchers from the University of Vienna and Institu Read more…

By John Russell

AMD Verifies Its Largest 7nm Chip Design in Ten Hours

June 5, 2019

AMD announced last week that its engineers had successfully executed the first physical verification of its largest 7nm chip design – in just ten hours. The AMD Radeon Instinct Vega20 – which boasts 13.2 billion transistors – was tested using a TSMC-certified Calibre nmDRC software platform from Mentor. Read more…

By Oliver Peckham

TSMC and Samsung Moving to 5nm; Whither Moore’s Law?

June 12, 2019

With reports that Taiwan Semiconductor Manufacturing Co. (TMSC) and Samsung are moving quickly to 5nm manufacturing, it’s a good time to again ponder whither goes the venerable Moore’s law. Shrinking feature size has of course been the primary hallmark of achieving Moore’s law... Read more…

By John Russell

Cray Wins NNSA-Livermore ‘El Capitan’ Exascale Contract

August 13, 2019

Cray has won the bid to build the first exascale supercomputer for the National Nuclear Security Administration (NNSA) and Lawrence Livermore National Laborator Read more…

By Tiffany Trader

Deep Learning Competitors Stalk Nvidia

May 14, 2019

There is no shortage of processing architectures emerging to accelerate deep learning workloads, with two more options emerging this week to challenge GPU leader Nvidia. First, Intel researchers claimed a new deep learning record for image classification on the ResNet-50 convolutional neural network. Separately, Israeli AI chip startup Hailo.ai... Read more…

By George Leopold

Leading Solution Providers

ISC 2019 Virtual Booth Video Tour

CRAY
CRAY
DDN
DDN
DELL EMC
DELL EMC
GOOGLE
GOOGLE
ONE STOP SYSTEMS
ONE STOP SYSTEMS
PANASAS
PANASAS
VERNE GLOBAL
VERNE GLOBAL

Nvidia Embraces Arm, Declares Intent to Accelerate All CPU Architectures

June 17, 2019

As the Top500 list was being announced at ISC in Frankfurt today with an upgraded petascale Arm supercomputer in the top third of the list, Nvidia announced its Read more…

By Tiffany Trader

Top500 Purely Petaflops; US Maintains Performance Lead

June 17, 2019

With the kick-off of the International Supercomputing Conference (ISC) in Frankfurt this morning, the 53rd Top500 list made its debut, and this one's for petafl Read more…

By Tiffany Trader

AMD Launches Epyc Rome, First 7nm CPU

August 8, 2019

From a gala event at the Palace of Fine Arts in San Francisco yesterday (Aug. 7), AMD launched its second-generation Epyc Rome x86 chips, based on its 7nm proce Read more…

By Tiffany Trader

A Behind-the-Scenes Look at the Hardware That Powered the Black Hole Image

June 24, 2019

Two months ago, the first-ever image of a black hole took the internet by storm. A team of scientists took years to produce and verify the striking image – an Read more…

By Oliver Peckham

Cray – and the Cray Brand – to Be Positioned at Tip of HPE’s HPC Spear

May 22, 2019

More so than with most acquisitions of this kind, HPE’s purchase of Cray for $1.3 billion, announced last week, seems to have elements of that overused, often Read more…

By Doug Black and Tiffany Trader

Chinese Company Sugon Placed on US ‘Entity List’ After Strong Showing at International Supercomputing Conference

June 26, 2019

After more than a decade of advancing its supercomputing prowess, operating the world’s most powerful supercomputer from June 2013 to June 2018, China is keep Read more…

By Tiffany Trader

Ayar Labs to Demo Photonics Chiplet in FPGA Package at Hot Chips

August 19, 2019

Silicon startup Ayar Labs continues to gain momentum with its DARPA-backed optical chiplet technology that puts advanced electronics and optics on the same chip Read more…

By Tiffany Trader

Qualcomm Invests in RISC-V Startup SiFive

June 7, 2019

Investors are zeroing in on the open standard RISC-V instruction set architecture and the processor intellectual property being developed by a batch of high-flying chip startups. Last fall, Esperanto Technologies announced a $58 million funding round. Read more…

By George Leopold

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