HPC Technique Propels Deep Learning at Scale

By Tiffany Trader

February 21, 2017

Researchers from Baidu’s Silicon Valley AI Lab (SVAIL) have adapted a well-known HPC communication technique to boost the speed and scale of their neural network training and now they are sharing their implementation with the larger deep learning community.

The technique, a modified version of the OpenMPI algorithm “ring all-reduce,” is being used at Baidu to parallelize the training of their speech recognition model, Deep Speech 2, across many GPU nodes. The two pieces of software Baidu is announcing today are the baidu-allreduce C library, as well as a patch for TensorFlow, which allows people who have already modeled in TensorFlow to compile this new version and use it for parallelizing across many devices. The codes are available on GitHub.

Ring all-reduce – all GPUs send data simultaneously

Baidu’s SVAIL team developed the approach about two years ago for their internal deep learning framework, named Gene and Majel (in tribute to the famous Star Trek creator and the actress who voiced the onboard computer interfaces for the series). The technique is commonplace in HPC circles, but underused within artificial intelligence and deep learning, according to Baidu.

Many of the researchers in the SVAIL group had come from the high performance computing space and recognized the competitive edge it offered.

“The algorithm is actually part of OpenMPI, but the OpenMPI implementation is not as fast,” comments Baidu Research Scientist Shubho Sengupta. “So the way we stumbled upon it was we started using OpenMPI for doing training and we realized it was not scaling to the extent that we want it to scale. I started digging through the OpenMPI source, found the algorithm, saw that it’s not very efficient, and reimplemented it.”

The SVAIL researchers wrote their own implementation of the ring algorithm for higher performance and better stability. The key distinction from the OpenMPI version is that the SVAIL implementation avoids extraneous copies between the CPU and GPU.

Explains Sengupta, “Once OpenMPI does the communication of these matrices, if the matrices are in GPU memory, it actually copies to CPU memory to do the reduction part of it – that’s actually quite wasteful. You don’t really need to do a copy, you could just write a small kernel that does the reduction in GPU memory space itself. And this especially helps when you are doing all-reduce within a node and all the GPUs are within a PCI root complex, then it doesn’t do any of the copies actually – it can just do everything in GPU memory space. This very simple idea of eliminating this copy resulted in this speedup in scaling over OpenMPI’s own implementation.”

Employing this algorithm along with SVAIL’s focus on fast networking (InfiniBand) and careful hardware-software codesign has enabled the team to get linear GPU scaling up to 128 GPUs, an achievement that was detailed in their December 2015 paper, “Deep Speech 2: End-to-End Speech Recognition in English and Mandarin.”

With their internal implementation of ring all-reduce, the team achieves between a 2.3-21.4X speedup over OpenMPI (version 1.8.5) depending on the number of GPUs.

Sengupta notes that their implementation is fastest for a small number of GPUs. “At 8 GPUs it’s about 20x faster, then as you increase the number of GPUs, it drops because now you actually have to copy data to the CPU to send across the network. But for the internal framework, we can scale all the way up to 128 GPUs and get linear scaling.”

Comparison of two different all-reduce implementations. All times are in seconds. Performance gain is the ratio of OpenMPI all-reduce time to SVAIL’s all-reduce time. (Source: Deep Speech 2 paper)

Sengupta’s teammate Baidu Research Scientist Andrew Gibiansky says similar benefits can now be seen with TensorFlow: “In terms of the TensorFlow implementation, we get the same linear scaling path past eight. In terms of a comparison with running on a single GPU, it ends up being about 31x faster at 40 GPUs.”

After the Deep Speech 2 paper was published, the SVAIL team began getting requests from the community who wanted to know more about the implementation. Given that the algorithm is pretty tightly coupled to SVAIL’s proprietary deep learning framework, they needed to come up with a different way to release it, so they created two new implementations, one specifically for TensorFlow and one that is more general.

Gibiansky, who led the work on the TensorFlow patch, describes their multi-pronged approach to disseminating the information. “You can read the blog post [for a thorough technical explanation] and figure it out. If you’re using TensorFlow, you can use our modification to train your own models with this. And if you’re a deep learning author, you can look at our C library and integrate that. The goal is really to take this idea we’ve found to be really successful internally and try to start spreading it so that other people can also take advantage of it.”

Sengupta shares an interesting perspective on the opportunities to be mined for deep learning within HPC.

“With MPI – people [in deep learning] think that it is this old technology, that it is not relevant, but I think because of our work we have shown that you can build very fast collectives using MPI and that allows you to do synchronous gradient descent which converges faster, gives you deterministic results and you don’t need to do asynchronous gradient descent with parameter servers which was the dominant way of doing this when we first started,” says Sengupta.

As for the reduced-copy approach propagating back to MPI, Gibiansky notes that if you look at some of the other MPI implementations, they’re slowly moving their collectives to GPU versions. “MVPICH recently introduced an all-gather that doesn’t end up copying to CPU – so OpenMPI will probably get there, it just might take a while. Potentially giving this a little more visibility, we can spur that on.”

“There’s a lot of interest now in collectives and one thing we also realized is the all-reduce operation used in traditional HPC setups, it actually transfers data that’s actually not very large,” Sengupta adds. “What it usually does, when I talk to HPC people, it’s trying to figure out the status of something across a bunch of machines – while in deep learning we are transferring these large matrices – like 2048×2048, essentially 4 million 32-bit floating points. For the traditional HPC community, this is a very atypical input for all-reduce. The traditional HPC community does not actually use all-reduce with really large data sizes. I think with deep learning, more and more people are realizing that collective operations for really large matrices is also very important.”

A detailed explanation of ring all-reduce and Baidu’s GPU implementation is covered in this technical blog post, published today by Baidu Research. A variant of the technique is also used to provide high-performance node-local scaling for PaddlePaddle, the company’s open source deep learning framework.

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!

University of Chicago Researchers Generate First Computational Model of Entire SARS-CoV-2 Virus

January 15, 2021

Over the course of the last year, many detailed computational models of SARS-CoV-2 have been produced with the help of supercomputers, but those models have largely focused on critical elements of the virus, such as its Read more…

By Oliver Peckham

Pat Gelsinger Returns to Intel as CEO

January 14, 2021

The Intel board of directors has appointed a new CEO. Intel alum Pat Gelsinger is leaving his post as CEO of VMware to rejoin the company that he parted ways with 11 years ago. Gelsinger will succeed Bob Swan, who will remain CEO until Feb. 15. Gelsinger previously spent 30 years... Read more…

By Tiffany Trader

Roar Supercomputer to Support Naval Aircraft Research

January 14, 2021

One might not think “aircraft” when picturing the U.S. Navy, but the military branch actually has thousands of aircraft currently in service – and now, supercomputing will help future naval aircraft operate faster, Read more…

By Staff report

DOE and NOAA Extend Computing Partnership, Plan for New Supercomputer

January 14, 2021

The National Climate-Computing Research Center (NCRC), hosted by Oak Ridge National Laboratory (ORNL), has been supporting the climate research of the National Oceanic and Atmospheric Administration (NOAA) for the last 1 Read more…

By Oliver Peckham

Using Micro-Combs, Researchers Demonstrate World’s Fastest Optical Neuromorphic Processor for AI

January 13, 2021

Neuromorphic computing, which uses chips that mimic the behavior of the human brain using virtual “neurons,” is growing in popularity thanks to high-profile efforts from Intel and others. Now, a team of researchers l Read more…

By Oliver Peckham

AWS Solution Channel

Now Available – Amazon EC2 C6gn Instances with 100 Gbps Networking

Amazon EC2 C6gn instances powered by AWS Graviton2 processors are now available!

Compared to C6g instances, this new instance type provides 4x higher network bandwidth, 4x higher packet processing performance, and 2x higher EBS bandwidth. Read more…

Intel® HPC + AI Pavilion

Intel Keynote Address

Intel is the foundation of HPC – from the workstation to the cloud to the backbone of the Top500. At SC20, Intel’s Trish Damkroger, VP and GM of high performance computing, addresses the audience to show how Intel and its partners are building the future of HPC today, through hardware and software technologies that accelerate the broad deployment of advanced HPC systems. Read more…

Honing In on AI, US Launches National Artificial Intelligence Initiative Office

January 13, 2021

To drive American leadership in the field of AI into the future, the National Artificial Intelligence Initiative Office has been launched by the White House Office of Science and Technology Policy (OSTP). The new agen Read more…

By Todd R. Weiss

Pat Gelsinger Returns to Intel as CEO

January 14, 2021

The Intel board of directors has appointed a new CEO. Intel alum Pat Gelsinger is leaving his post as CEO of VMware to rejoin the company that he parted ways with 11 years ago. Gelsinger will succeed Bob Swan, who will remain CEO until Feb. 15. Gelsinger previously spent 30 years... Read more…

By Tiffany Trader

Julia Update: Adoption Keeps Climbing; Is It a Python Challenger?

January 13, 2021

The rapid adoption of Julia, the open source, high level programing language with roots at MIT, shows no sign of slowing according to data from Julialang.org. I Read more…

By John Russell

Intel ‘Ice Lake’ Server Chips in Production, Set for Volume Ramp This Quarter

January 12, 2021

Intel Corp. used this week’s virtual CES 2021 event to reassert its dominance of the datacenter with the formal roll out of its next-generation server chip, the 10nm Xeon Scalable processor that targets AI and HPC workloads. The third-generation “Ice Lake” family... Read more…

By George Leopold

Researchers Say It Won’t Be Possible to Control Superintelligent AI

January 11, 2021

Worries about out-of-control AI aren’t new. Many prominent figures have suggested caution when unleashing AI. One quote that keeps cropping up is (roughly) th Read more…

By John Russell

AMD Files Patent on New GPU Chiplet Approach

January 5, 2021

Advanced Micro Devices is accelerating the GPU chiplet race with the release of a U.S. patent application for a device that incorporates high-bandwidth intercon Read more…

By George Leopold

Programming the Soon-to-Be World’s Fastest Supercomputer, Frontier

January 5, 2021

What’s it like designing an app for the world’s fastest supercomputer, set to come online in the United States in 2021? The University of Delaware’s Sunita Chandrasekaran is leading an elite international team in just that task. Chandrasekaran, assistant professor of computer and information sciences, recently was named... Read more…

By Tracey Bryant

Intel Touts Optane Performance, Teases Next-gen “Crow Pass”

January 5, 2021

Competition to leverage new memory and storage hardware with new or improved software to create better storage/memory schemes has steadily gathered steam during Read more…

By John Russell

Farewell 2020: Bleak, Yes. But a Lot of Good Happened Too

December 30, 2020

Here on the cusp of the new year, the catchphrase ‘2020 hindsight’ has a distinctly different feel. Good riddance, yes. But also proof of science’s power Read more…

By John Russell

Esperanto Unveils ML Chip with Nearly 1,100 RISC-V Cores

December 8, 2020

At the RISC-V Summit today, Art Swift, CEO of Esperanto Technologies, announced a new, RISC-V based chip aimed at machine learning and containing nearly 1,100 low-power cores based on the open-source RISC-V architecture. Esperanto Technologies, headquartered in... Read more…

By Oliver Peckham

Azure Scaled to Record 86,400 Cores for Molecular Dynamics

November 20, 2020

A new record for HPC scaling on the public cloud has been achieved on Microsoft Azure. Led by Dr. Jer-Ming Chia, the cloud provider partnered with the Beckman I Read more…

By Oliver Peckham

NICS Unleashes ‘Kraken’ Supercomputer

April 4, 2008

A Cray XT4 supercomputer, dubbed Kraken, is scheduled to come online in mid-summer at the National Institute for Computational Sciences (NICS). The soon-to-be petascale system, and the resulting NICS organization, are the result of an NSF Track II award of $65 million to the University of Tennessee and its partners to provide next-generation supercomputing for the nation's science community. Read more…

Is the Nvidia A100 GPU Performance Worth a Hardware Upgrade?

October 16, 2020

Over the last decade, accelerators have seen an increasing rate of adoption in high-performance computing (HPC) platforms, and in the June 2020 Top500 list, eig Read more…

By Hartwig Anzt, Ahmad Abdelfattah and Jack Dongarra

Aurora’s Troubles Move Frontier into Pole Exascale Position

October 1, 2020

Intel’s 7nm node delay has raised questions about the status of the Aurora supercomputer that was scheduled to be stood up at Argonne National Laboratory next year. Aurora was in the running to be the United States’ first exascale supercomputer although it was on a contemporaneous timeline with... Read more…

By Tiffany Trader

Google Hires Longtime Intel Exec Bill Magro to Lead HPC Strategy

September 18, 2020

In a sign of the times, another prominent HPCer has made a move to a hyperscaler. Longtime Intel executive Bill Magro joined Google as chief technologist for hi Read more…

By Tiffany Trader

Julia Update: Adoption Keeps Climbing; Is It a Python Challenger?

January 13, 2021

The rapid adoption of Julia, the open source, high level programing language with roots at MIT, shows no sign of slowing according to data from Julialang.org. I Read more…

By John Russell

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

Leading Solution Providers

Contributors

Programming the Soon-to-Be World’s Fastest Supercomputer, Frontier

January 5, 2021

What’s it like designing an app for the world’s fastest supercomputer, set to come online in the United States in 2021? The University of Delaware’s Sunita Chandrasekaran is leading an elite international team in just that task. Chandrasekaran, assistant professor of computer and information sciences, recently was named... Read more…

By Tracey Bryant

Top500: Fugaku Keeps Crown, Nvidia’s Selene Climbs to #5

November 16, 2020

With the publication of the 56th Top500 list today from SC20's virtual proceedings, Japan's Fugaku supercomputer – now fully deployed – notches another win, Read more…

By Tiffany Trader

European Commission Declares €8 Billion Investment in Supercomputing

September 18, 2020

Just under two years ago, the European Commission formalized the EuroHPC Joint Undertaking (JU): a concerted HPC effort (comprising 32 participating states at c Read more…

By Oliver Peckham

Texas A&M Announces Flagship ‘Grace’ Supercomputer

November 9, 2020

Texas A&M University has announced its next flagship system: Grace. The new supercomputer, named for legendary programming pioneer Grace Hopper, is replacing the Ada system (itself named for mathematician Ada Lovelace) as the primary workhorse for Texas A&M’s High Performance Research Computing (HPRC). Read more…

By Oliver Peckham

At Oak Ridge, ‘End of Life’ Sometimes Isn’t

October 31, 2020

Sometimes, the old dog actually does go live on a farm. HPC systems are often cursed with short lifespans, as they are continually supplanted by the latest and Read more…

By Oliver Peckham

Nvidia and EuroHPC Team for Four Supercomputers, Including Massive ‘Leonardo’ System

October 15, 2020

The EuroHPC Joint Undertaking (JU) serves as Europe’s concerted supercomputing play, currently comprising 32 member states and billions of euros in funding. I Read more…

By Oliver Peckham

Gordon Bell Special Prize Goes to Massive SARS-CoV-2 Simulations

November 19, 2020

2020 has proven a harrowing year – but it has produced remarkable heroes. To that end, this year, the Association for Computing Machinery (ACM) introduced the Read more…

By Oliver Peckham

Nvidia-Arm Deal a Boon for RISC-V?

October 26, 2020

The $40 billion blockbuster acquisition deal that will bring chipmaker Arm into the Nvidia corporate family could provide a boost for the competing RISC-V architecture. As regulators in the U.S., China and the European Union begin scrutinizing the impact of the blockbuster deal on semiconductor industry competition and innovation, the deal has at the very least... 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