English

Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem

Distributed, Parallel, and Cluster Computing 2025-09-26 v1 Computational Engineering, Finance, and Science Emerging Technologies Programming Languages

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.

Keywords

Cite

@article{arxiv.2509.21039,
  title  = {Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem},
  author = {William F. Godoy and Tatiana Melnichenko and Pedro Valero-Lara and Wael Elwasif and Philip Fackler and Rafael Ferreira Da Silva and Keita Teranishi and Jeffrey S. Vetter},
  journal= {arXiv preprint arXiv:2509.21039},
  year   = {2025}
}

Comments

Accepted at the IEEE/ACM SC25 Conference WACCPD Workshop. The International Conference for High Performance Computing, Networking, Storage, and Analysis, St. Louis, MO, Nov 16-21, 2025. 15 pages, 7 figures. WFG and TM contributed equally

R2 v1 2026-07-01T05:55:55.270Z