MIT Researchers Propose A New Programming Language Called ‘Exo’ For Writing High-Performance Code On Hardware Accelerators

In a recent research article, to write high-performance programs on hardware accelerators, researchers from MIT CSAIL and UC Berkeley have developed a new programming language named “Exo. A new programming language based on the “Exocompilation” principle to better facilitate the construction of high-performance libraries for specialized hardware. Exocompilation externalizes target-specific code generation support and optimization rules to user-level code. Exo enables user libraries to create specific hardware instructions, customized memory, and accelerator setup state.

By utilizing these specialized accelerator chips, Exo assists low-level performance engineers in converting elementary programs that define what they want to calculate into highly sophisticated algorithms that do the same task much more quickly.

You must create entirely new software support when developing an accelerator, a procedure where programs offload certain activities to system hardware specifically to speed those operations. While hardware accelerators are not ready to use out of the box, they can do some tasks orders of magnitude quicker than CPUs. To work with the entire application system, software must effectively utilize the accelerators’ instructions. This leads to a significant amount of technical effort that must be maintained for each programming language being compiled for a new chip.

Engineers may use Exo, for instance, to transform a straightforward matrix multiplication software into a more intricate one that utilizes these unique accelerators to run orders of magnitude quicker.

Exo is based on the idea of Exocompilation, unlike other programming languages and compilers. “Traditionally, much research has concentrated on automating the optimization process for the specific hardware.” “This is excellent for most programmers, but the compiler more frequently causes problems than solutions for performance engineers. Because the compiler optimizes itself, if it makes a mistake and delivers you 45 percent efficiency rather than 90 percent, there is no viable way to rectify it.

Exocompilation puts the performance engineer back in control. Instead of the compiler, the performance engineer now decides which optimizations to employ, when to use them, and in what order. Doing this may prevent wasting time fighting the compiler or performing everything by hand. Exo is in charge of making sure that all of these improvements are accurate at the same time. Because of this, the performance engineer may focus on improving performance rather than troubleshooting the intricate, optimized code.

 “Exo language is a compiler parameterized over the hardware it targets; the same compiler may adapt to many different hardware accelerators.” Exo provides a consistent, abstract approach to describe the “shape” of the hardware you wish to target instead of requiring you to write a tonne of complicated C++ code to build for a new accelerator. Then, rather than creating a brand-new compiler from the start, you may modify the current Exo compiler to conform to that new definition. This innovation can have a significant impact since it will allow hardware developers to experiment with and ship more concepts without having to worry about the expense of creating new compilers for every new hardware concept. The sector may stop relying on outdated hardware, which is only profitable due to ecosystem lock-in and, therefore, ineffective.

Scientific computing and machine learning applications are powered by “key sub-programs,” kernels, or high-performance computing (HPC) subroutines, accelerated by the fastest computer processors available today, such as Google’s TPU, Apple’s Neural Engine, or NVIDIA’s Tensor Cores.

Despite the clunky terminology, the programs are crucial. For instance, a “library” or collection of such subroutines known as Basic Linear Algebra Subroutines (BLAS) enables numerous machine learning activities, including neural networks, weather predictions, cloud computing, and drug discovery. These tasks all need linear algebra calculations. These new processors, whose creation involves hundreds of engineers, can only be as effective as these HPC software libraries.

This performance improvement is made manually to ensure that every last cycle of computing on these processors is utilized. Hardware developers make considerable efforts to provide an additional five or ten percent performance to these theoretical peaks. HPC subroutines often operate at 90 percent or more of their top theoretical efficiency. Therefore, that effort would be lost if the program weren’t aggressively optimized, precisely what Exo aims to prevent.

Performance engineers may define the new chips they wish to optimize using Exocompilation, eliminating the need to change the compiler. In the past, compiler developers have been responsible for maintaining the hardware interface specification, but with most of these new accelerator chips, the hardware interface is proprietary. Businesses must keep their own copy (or “fork”) of a typical compiler that has been customized to support their specific chip. For this, teams of compiler developers must be hired in addition to performance engineers.

“In Exo, they externalize the Exocompiler from the specification of hardware-specific backends. This allows us to distinguish between Exo, an open-source project, and proprietary hardware-specific code more clearly. They’ve demonstrated that Exo provides for the rapid creation of code that is just as efficient as Intel’s manually optimized Math Kernel Library. 

Exo’s future involves investigating a more effective scheduling meta-language and developing its semantics to allow parallel programming models so that it may be used with even more accelerators, such as GPUs.

This Article is written as a summary article by Marktechpost Research Staff based on the research paper 'Exocompilation for Productive Programming of Hardware Accelerators'. All Credit For This Research Goes To Researchers on This Project. Checkout the paper and MIT article.

Please Don't Forget To Join Our ML Subreddit

I am consulting intern at MarktechPost. I am majoring in Mechanical Engineering at IIT Kanpur. My interest lies in the field of machining and Robotics. Besides, I have a keen interest in AI, ML, DL, and related areas. I am a tech enthusiast and passionate about new technologies and their real-life uses.