Porting GLASS to the Python Array API: A Clear View to GPU Portability

GLASS is a Python library designed to generate full-universe cosmological simulations for large-scale galaxy surveys. Historically, the use of NumPy has been essential to GLASS’ success, allowing rapid development and integration with a wide range of existing cosmological software. However, as simulation demands grow and high-performance computing shifts towards GPU-heavy architectures, GLASS must evolve to support these workloads. As NumPy was not designed for non-CPU devices, it now poses a significant bottleneck to this evolution. To overcome this, we are porting GLASS to the Python Array API, decoupling the library from NumPy and enabling native GPU execution. By adopting this standard, we are expanding GLASS to support all Array API-compliant libraries, broadening its ecosystem and utility. This transition involves managing varying levels of Array API maturity across libraries and optimising core scientific models for GPU parallelism. The resulting GPU-enabled GLASS provides a significant performance boost whilst remaining performant on CPUs, facilitating seamless integration with GPU-native workflows, and enabling advanced techniques like auto-differentiable simulations via JAX.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-08-24
DOI
https://doi.org/10.5281/zenodo.22078711
Primary Topic
Galaxies: Formation, Evolution, Phenomena
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Porting GLASS to the Python Array API: A Clear View to GPU Portability

N Tessore, Patrick J. Roddy, Saransh Chopra, Aird Connor
Zenodo (CERN European Organization for Nuclear Research)
Galaxies: Formation, Evolution, Phenomena
article

Porting GLASS to the Python Array API: A Clear View to GPU Portability

N Tessore, Patrick J. Roddy, Saransh Chopra, Aird Connor
article en

Abstract

GLASS is a Python library designed to generate full-universe cosmological simulations for large-scale galaxy surveys. Historically, the use of NumPy has been essential to GLASS’ success, allowing rapid development and integration with a wide range of existing cosmological software. However, as simulation demands grow and high-performance computing shifts towards GPU-heavy architectures, GLASS must evolve to support these workloads. As NumPy was not designed for non-CPU devices, it now poses a significant bottleneck to this evolution. To overcome this, we are porting GLASS to the Python Array API, decoupling the library from NumPy and enabling native GPU execution. By adopting this standard, we are expanding GLASS to support all Array API-compliant libraries, broadening its ecosystem and utility. This transition involves managing varying levels of Array API maturity across libraries and optimising core scientific models for GPU parallelism. The resulting GPU-enabled GLASS provides a significant performance boost whilst remaining performant on CPUs, facilitating seamless integration with GPU-native workflows, and enabling advanced techniques like auto-differentiable simulations via JAX.

Zenodo (CERN European Organization for Nuclear Research)
University College London (GB)
Openalex Percentile: Top 10%
Galaxies: Formation, Evolution, Phenomena
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.