Lightning Talk: FTorch: A Library To Couple PyTorch ML Models With Fortran Climate Models
summary
FTorch is an open-source library that directly loads torchscript models into Fortran via LibTorch via Fortran 2003 bindings, bypassing Python and supporting GPU backends. It provides a zero-copy torch accessor to avoid costly memory transposes between Fortran column-major arrays and PyTorch row-major tensors, ships a comprehensive example suite under an MIT license, and already runs inference in real codes. Work-in-progress features add autograd and online training so gradients and optimizers (SGD/Adam) can update models inside the climate model.
AI-written summary · about
chapters (12)
- 0:00FTorch introduction
- 0:43Weather and climate models
- 2:06Replacing parameterizations
- 3:08Language interoperability
- 3:50FTorch workflow
- 5:15FTorch advantages
- 6:42Memory layout in FTorch
- 7:24TorchScript alternatives
- 7:46Fortran code example
- 8:27Online training in FTorch
- 9:54Loss function and autograd
- 11:18Summary and future
related talks
24mAdvancements in High-Performance AI/ML through PyTorch's Python Compiler
42mLightning Talks Friday
01h 10mLightning Talks
06mLessons learned from using the C Foreign Function Interface
49mMeteorology, Climate and Python: desperately trying to forget technical details
26mFrom NumPy to PyTorch, A Story of API Compatibility
06m⚡ Speedy but Sturdy PyTorch Optimizers
10mWhy Your Forecasting Transformer Isn’t Working (And How To Fix It...
