Advanced Computing in the Age of AI | Tuesday, September 26, 2023

New Language Mojo Seeks End to AI Framework Sprawl 

A software development kit for Mojo, a new Python-based language for AI development created by former Google engineers, is now available for download on Linux systems, with support for Mac and Windows coming soon, the company behind Mojo announced today.

Mojo is Pythonic language designed to help AI developers get the most performance out of their diverse compute resources. The folks at Modular who developed Mojo, including CEO Chris Lattner and President Tim Davis, were tired of dealing with the technological sprawl of modern AI frameworks, and desired a single language that could handle a range of different processing tasks related to AI, as well as different hardware, thereby eliminating the need to hop around with different languages.

“Platforms like TensorFlow, PyTorch, and CUDA do not focus on modularity,” Lattner and Davis wrote in an introductory blog post in April 2022. “They are sprawling technologies with thousands of evolving interdependent pieces that have grown organically into complicated structures over time.”

Today, AI developers are forced to work with multiple toolchains to deal with different hardware. Nothing is interoperable, little is shared, and moving between them requires dependence on “flaky converters and translators,” the founders wrote.

Mojo architecture (Image courtesy Modular)

“What we wanted was an innovative and scalable programming model that could target accelerators and other heterogeneous systems that are pervasive in the AI field,” Mojo’s creators wrote in a blog introduction to Mojo. “This meant a programming language with powerful compile-time metaprogramming, integration of adaptive compilation techniques, caching throughout the compilation flow, and other features that are not supported by existing languages.”

Mojo is based on Multi-Level Intermediate Representation, or MLIR, a project that Lattner spearheaded while at Google. MLIR is a successor to LLVM and GCC compilers, which is technology they were imminently familiar with, as Lattner co-developed LLVM, as well as the Clang compiler and the Swift programming language while at Google (Davis, meanwhile, helped create and scale systems at Google, including Tensorflow). While LLVM and GCC support a wide range of CPUs and GPUs, they were created decades ago and don’t support modern chip architectures.

“MLIR’s strength is its ability to build domain specific compilers, particularly for weird domains that aren’t traditional CPUs and GPUs, such as AI ASICS, quantum computing systems, FPGAs, and custom silicon,” Mojo’s creators wrote.

Modular intends for Mojo to become a superset of Python, or Python++, capable of supporting all the existing Python programs and libraries, but with superior performance for AI programs. The company claims Mojo apps can run up to 68,000 times faster than Python apps, and delivers performance on GPUs and ASICs that is similar to C++ or CUDA.

“We want predictable low-level performance and low-level control, and we need the ability to deploy subsets of code to accelerators,” they wrote. “Additionally, we don’t want to create a fragmented software ecosystem–we don’t want Python users who adopt Mojo to draw comparisons to the painful migration from Python 2 to 3. These are no small goals!”

Modular co-founders Chris Lattner (left) and Tim Davis previously worked at Google

Since Modular launched Mojo in May, it’s been downloaded by more than 12,000 developers, with more than 19,000 members in a Discord community and 9,000 stars on GitHub, the company says.

Today, the company announced that the Mojo SDK is now available for Linux. Developers can get a lot more done with the Mojo installed on their personal systems than what they could do in the cloud, the company says, thanks to features like the Mojo driver, which gives them the capability to program with REPL, and support for VS Code and Jupyter development environments. There’s no debugger yet, but that’s coming soon, the company says.

Meanwhile, Modular last month raised $100 million in a round led by General Catalyst that included GV (Google Ventures). That comes on top of an existing $30 million round in 2022. For more information and downloads, check out

This article originally appeared on Datanami.

About the author: Alex Woodie

Alex Woodie has written about IT as a technology journalist for more than a decade. He brings extensive experience from the IBM midrange marketplace, including topics such as servers, ERP applications, programming, databases, security, high availability, storage, business intelligence, cloud, and mobile enablement. He resides in the San Diego area.