Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem Conference: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis; November 16–21, 2025; St Louis, MO, USA Workshops of the International Conference for Hig
William F Godoy, Tatiana Melnichenko, Pedro Valero-Lara, Wael Elwasif, Philip Fackler, Rafael Ferreira Da Silva, Keita Teranishi, Jeffrey S Vetter · 2025
Read Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem Conference: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis; November 16–21, 2025; St Louis, MO, USA Workshops of the International Conference for Hig by William F Godoy, Tatiana Melnichenko, Pedro Valero-Lara, Wael Elwasif, Philip Fackler, Rafael Ferreira Da Silva, Keita Teranishi, Jeffrey S Vetter (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-21039.txt.
Introduction
Scientific code must run fast on graphics processors from rival vendors without being rewritten each time. William Godoy and seven co-authors test the Mojo language for that job in a 2025 paper for an SC25 workshop. Mojo is the first language built on the MLIR compiler infrastructure, with Python interoperability.
The team ports four scientific workloads to Mojo: a stencil, a memory benchmark, and two compute-heavy codes, including a Hartree-Fock chemistry kernel. They compare performance against vendor baselines on NVIDIA and AMD flagship GPUs. Mojo matches CUDA and HIP on memory-bound workloads, the authors report, while compute-bound cases are harder. The study gauges whether one language can realistically span the GPU ecosystem for high-performance science.
Catalog record
| CREATOR | William F Godoy, Tatiana Melnichenko, Pedro Valero-Lara, Wael Elwasif, Philip Fackler, Rafael Ferreira Da Silva, Keita Teranishi, Jeffrey S Vetter |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 62 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-21039
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem Conference: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis; November 16–21, 2025; St Louis, MO, USA Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC Workshops ’25), November 16–21, 2025, St Louis, MO, USA DOI: 10.1145/3731599.3767573 ISBN: 979-8-4007-1871-7/2025/11 Thanks: This manuscript has been authored by UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The US government retains and the publisher, by accepting the article for publication, acknowledges that the US government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US government purposes. DOE will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan ( https://www.energy.gov/doe-public-access-plan ). CCS: Computing methodologies Parallel programming languages CCS: General and reference Performance CCS: Software and its engineering Very high level languages William F Godoy, Tatiana Melnichenko, Pedro Valero-Lara, Wael Elwasif, Philip Fackler, Rafael Ferreira Da Silva, Keita Teranishi, Jeffrey S Vetter Abstract . We explore the performance and portability of the novel Mojo language for scientific computing workloads on GPUs. As the first language based on the LLVM’s Multi-Level Intermediate Representation (MLIR) compiler infrastructure, Mojo aims to close performance and productivity gaps by combining Python’s interoperability and CUDA-like syntax for compile-time portable GPU programming. We target four scientific workloads: a seven-point stencil (memory-bound), BabelStream (memory-bound), miniBUDE (compute-bound), and Hartree–Fock (compute-bound with atomic operations); and compare their performance against vendor baselines on NVIDIA H100 and AMD MI300A GPUs. We show that Mojo’s performance is competitive with CUDA and HIP for memory-bound kernels, whereas gaps exist on AMD GPUs for atomic operations and for fast-math compute-bound kernels on both AMD and NVIDIA GPUs. Although the learning curve and programming requirements are still fairly low-level, Mojo can close significant gaps in the fragmented Python ecosystem in the convergence of scientific computing and AI. † † cc-license: by 1. Introduction Mojo ( Modular [n. d.] ) is the latest technology for closing performance and productivity gaps in the Python ( Van Rossum et al. 2007 ) language and ecosystem, including in AI workloads. Developed by Modular Inc., Mojo is a stand-alone language that provides ahead-of-time (AOT) and just-in-time (JIT) compilation options based entirely on the Multi-Level Intermediate Representation (MLIR) ( Lattner and Pienaar 2019 ) , which is the next-generation of the widely adopted LLVM ( Lattner and Adve 2004 ) compiler infrastructure. Mojo enables productivity through the reusability of Python’s rich library ecosystem via module interoperability and offers performance portability across GPUs from different vendors. It currently supports the latest NVIDIA GPUs, and support was recently added for AMD’s MI300 GPUs. Hence, similar to modern programming languages such as Julia ( Bezanson et al. 2017 ) and Rust ( Matsakis and Klock 2014 ) , Mojo aims to mitigate the costly fragmentation that arises when using multiple languages and ecosystems to achieve high-level characteristics such as productivity (e.g., Python) and safety combined with the low-level performance of compiled languages (e.g., C ++ , C, Fortran). Heterogeneous computing architectures (e.g., CPUs + GPU accelerators) have been the primary drivers of the supercomputing and AI landscapes in recent decades. The TOP500’s 1 1 1 www.top500.org Linpack ( Dongarra et al. 2003 ) ranking from June 2025 shows that 9 out of the top 10 fastest supercomputers in the world are accelerated by GPUs. Moreover, massive investments in AI supercomputers (e.g., xAI’s Colossus) continue to drive the demand for GPUs ( Pilz et al. 2025 ) . For this reason, GPU programmability and portability are crucial for the entire high-performance computing (HPC) ecosystem. Strategies to address portability needs have mainly targeted C, C ++ , and Fortran HPC languages through new standards, including OpenMP ( OpenMP Architecture Review Board 2021 ) , OpenCL ( Stone et al. 2010 ) , OpenACC ( Wienke et al. 2012 ) , and SYCL ( Deakin and McIntosh-Smith 2020 ) , and through third-party programming models, including Kokkos ( Trott et al. 2022 ) and RAJA ( Beckingsale et al. 2019 ) . Since June of 2025, Mojo provides this capability of supporting portable GPU programming directly into the language standard library. We attempt to answer the following research question: Can scientific users benefit from Mojo’s performance-portable GPU codes? Despite the Mojo language being particularly novel, with many design decisions still in the development stages, and not completely open-source until 2026, we provide an initial exploration of Mojo’s unique value proposition—using it to write performance-portable GPU kernels using the language’s standard library. Unlike AI methods and math kernels that are well defined in scientific numerical libraries, custom science kernels can have unique computational characteristics that affect their performance. For this reason, we developed ports for four widely used scientific kernels—(i) seven-point stencil (memory-bandwidth bound), (ii) BabelStream (memory-bandwidth bound), (iii) miniBUDE (compute-bound), and (iv) Hartree–Fock (compute-bound with atomic operations)—so they can use Mojo’s portable GPU code capabilities. The kernels’ performance and profiling metrics (where appropriate) are then analyzed and compared with their equivalent CUDA and HIP baselines. The rest of the paper is organized as follows: Section 2 provides background information on the Mojo language syntax and compile-time characteristics in connection with MLIR and an overview of the selected science kernels. Section 3 introduces our Methodology for porting the codes to Mojo’s memory and kernel-launching programming model and describes the targeted benchmarks and systems used in our experiments. Section 4 describes the performance results and analysis of the Mojo-ported codes running on NVIDIA and AMD GPUs and compares the Mojo implementations with the corresponding vendor baselines in CUDA and HIP, respectively. We also summarize our comparisons by applying a performance-portability metric to all of our runs on the NVIDIA and AMD GPUs. Related work is presented in Section 5 , including attempts to close performance-portability and productivity gaps. Section 6 presents the conclusions from our study. All software artifacts are provided for reproducibility in the Appendix section for Artifact Description and Evaluation. To the best of our knowledge, this is the first work on Mojo’s unifying portable GPU accelerator model to target scientific computing kernels. 2. Background 2.1. Mojo Programming Mojo’s value proposition is in combining the ease of use and flexibility of Python with the performance of compile-time programming languages such as C ++ . Mojo can achieve this by being the first language fully built on MLIR. Figure 1 illustrates Mojo’s approach to tackling the fragmentation between compiled languages and the Python ecosystem. We are particularly interested in how Mojo performs with science kernels given the June 2025 announcement of support for the AMD MI300 series GPUs in addition to the well-supported NVIDIA Hopper and Ampere GPUs. Notably, reusing the same vendor-agnostic Mojo GPU modules adds a very unique characteristic for language-embedded GPU portability. This is in contrast with other HPC languages in which support is provided by standard third-party libraries. In fact, Mojo is unique in several ways: • Features MLIR-based compile time, JIT or AOT, for performance-portable GPU programming • Includes run-time interoperability with Python and its rich library ecosystem •