How SpaceX Is Using GPUs to Build a Better Mars Rocket

by Tony Kontzer

SpaceX, the other company led by Tesla founder and CEO Elon Musk, has an ambitious goal. It wants to put a human colony on Mars.

If that sounds hard, it’s actually even harder to pull off. You don’t just have to put people on Mars. You have to move the infrastructure needed to support them. Big rockets are needed. Really big ones.

During a packed session at GTC 2015, Adam Lichtl, SpaceX’s research director, noted that when the early pioneers crossed North America, they had to build shelter and find food. But, he quipped, “They had air.”

Plus, any expedition to Mars, which is much colder than Earth, would need facilities to generate power to provide heat and melt ice. And it turns out that designing a powerful enough rocket to accommodate the extra payload is a major conundrum.

It's called rocket science for a reason.
Going to Mars will be anything but easy. SpaceX explained how GPUs can help,

The complex physics computations necessary to complete a mere simulation have proven too much for even the world’s largest supercomputers. But by using GPUs, SpaceX has come up with a workaround. It’s not just helping the company approximate computations of unfathomable scale. It may represent an advance that can be sold to the automotive industry.

“This is really a transformational technology that allows us to tackle problems that have never been tackled before in computational dynamics,” Lichtl told a packed conference room. “Without GPU acceleration, it takes months on thousands of cores to run even the simplest simulation. What the GPUs are enabling here is exponential acceleration.”

Yottabytes of data

Here’s the problem: The computations related to what is known as “turbulent non-premixed combustion” – which occurs when fuel and oxidizers are introduced in distinct streams – are dizzying in their scale.

The reactions yield data measured in yottabytes – that’s 10 followed by 24 zeros. And, as Stephen Jones, SpaceX lead software engineer, told GTC attendees, “There’s no machine in the world that has that kind of memory and can manage that amount of data.”

Yet, to create a useful simulation that provides the needed insight into factors such as the turbulence created by combustion, Jones said, “You want to do all the mathematics without decompressing the image.”

Analogy to MP3s

By running its code on GPUs, SpaceX has generated adaptive grids that enable it to extract the details it needs while also preserving the compression that’s needed to keep the data manageable. It’s like the technology behind MP3s, which eliminates the frequencies that aren’t needed for compression while retaining the frequencies that allow us to hear musical tones and chords.

Jones said the company is also using wavelets that allow it to focus its computing efforts. Essentially, GPUs are allowing SpaceX scientists to calculate what would otherwise be massive amounts of data by zeroing in on the critical parts of a grid depicting the combustion reaction, eliminating anomalies, and extrapolating a larger data set.