google-deepmind / google-deepmind/torax
Speed improvement: pre-interpolate geometries when using `fixed_time_step`
- Dominant language
- Python
- Stars
- 721
- Forks
- 145
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 49
Description
`fixed_time_step` loop calls the geometry provider's time-interpolation once per step. As a result, loading multiple geometry time slices pays the interpolation cost on every step rather than once at the geometry initialisation, inflating both compile time (~2-5x) and run time (scaling with step count).
However, with a fixed dt, every future time point is knowable in advance, so we could in theory make `fixed_time_step` pre-interpolate all of the geometries.
Contributor guide
Research direction
Locate the fixed_time_step loop and the geometry provider's time-interpolation call mentioned in the issue. First measure the current compile and run-time costs for multiple geometry time slices, then trace geometry initialization and fixed-step time points. Done means interpolation is performed once where appropriate while simulation results remain unchanged and the reported costs improve.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100