Facebook’s new ‘SapFix’ AI automatically debugs your code

Facebook has quietly built and deployed an artificial intelligence programming tool called SapFix that scans code, automatically identifies bugs, tests different patches and suggests the best ones that engineers can choose to implement. Revealed today at Facebook’s @Scale engineering conference, SapFix is already running on Facebook’s massive code base and the company plans to eventually share it with the developer community.

“To our knowledge, this marks the first time that a machine-generated fix — with automated end-to-end testing and repair — has been deployed into a codebase of Facebook’s scale,” writes Facebook’s developer tool team. “It’s an important milestone for AI hybrids and offers further evidence that search-based software engineering can reduce friction in software development.” SapFix can run with or without Sapienz, Facebook’s previous automated bug spotter. It uses it in conjunction with SapFix, suggesting solutions to problems Sapienz discovers.

These types of tools could allow smaller teams to build more powerful products, or let big corporations save a ton on wasted engineering time. That’s critical for Facebook as it has so many other problems to worry about.

Glow AI hardware partners

Meanwhile, Facebook is pressing forward with its strategy of reorienting the computing hardware ecosystem around its own machine learning software. Today it announced that its Glow compiler for machine learning hardware acceleration has signed up the top silicon manufacturers, like Cadence, Esperanto, Intel, Marvell, and Qualcomm, to support Glow. The plan mirrors Facebook’s Open Compute Project for open sourcing server designs and Telecom Infra Project for connectivity technology.

Glow works with a wide array of machine learning frameworks and hardware accelerators to speed up how they perform deep learning processes. It was open sourced earlier this year at Facebook’s F8 conference.

“Hardware accelerators are specialized to solve the task of machine learning execution. They typically contain a large number of execution units, on-chip memory banks, and application-specific circuits that make the execution of ML workloads very efficient,” Facebook’s team writes. “To execute machine learning programs on specialized hardware, compilers are used to orchestrate the different parts and make them work together . . . Hardware partners that use Glow can reduce the time it takes to bring their product to market.”

Facebook VP of infrastructure Jason Taylor

Essentially, Facebook needs help in the silicon department. Instead of isolating itself and building its own chips like Apple and Google, it’s effectively outsourcing the hardware development to the experts. That means it might forego a competitive advantage from this infrastructure, but it also allows it to save money and focus on its core strengths.

“What I talked about today was the difficulty of predicting what chip will really do well in the market. When you build a piece of silicon, you’re making predictions about where the market is going to be in two years” Facebook’s VP of infrastructure Jason Taylor tells me. “The big question is if the workload that they design for is the worlflow that’s really important at the time.You’re going to see this fragmentation. At Facebook, wew want to work with all the partners out there so we have good options now and over the next several years.” Essentially, by partnering with all the chip makers instead of building its own, Facebook future-proofs its software against volatility in which chip becomes the standard.

The technologies aside, the Scale conference was evidence that Facebook will keep hacking, policy scandals be damned. There was nary a mention of Cambridge Analytica or election interference as a packed room of engineers chuckled to nerdy jokes during keynotes packed with enough coding jargon to make the unindoctrinated assume it was in another language. If Facebook is burning, you couldn’t tell from here\