Using Python's array API standard for ESA's Euclid mission
summary
Porting the Glass cosmology library to the Array API makes core simulation code run on NumPy and JAX backends to gain GPU and autodiff support without rewriting the whole codebase. Work splits into typing, backend tests, RNG, and migration; the first three consume ~40% of effort and migration ~60%. Deliverables include a temporary typing solution, an JAX RNG wrapper that mimics NumPy RNG semantics, and an XP testing fixture to run the same tests across backends; migration is ongoing and JIT remains unsupported.
AI-written summary · about
chapters (13)
- 0:00Introduction and delays
- 0:25Python arrays and API standard
- 1:09History of Python array libraries
- 3:40Why array API standard exists
- 7:08What is Glass library
- 9:15Glass needs JAX and QI support
- 10:19Four areas of work for Glass
- 11:00Typing the Glass codebase
- 14:52Testing different backends
- 17:44Random number generators in Glass
- 23:26Migrating the codebase
- 26:39Key takeaways and future work
- 28:26Q&A session
