echandler5956f / Galileo

A light-weight and extensible C++ library for Pseudospectral Collocation of Switched Systems
MIT License
57 stars 5 forks source link

JIT Compilation/Codegen for Casadi Functions #19

Open echandler5956f opened 11 months ago

echandler5956f commented 11 months ago

JIT compiling takes unreasonably long for functions from Pinocchio. Look into the Casadi functions for generating c code for the SX functions and cache it between CMake changes.

echandler5956f commented 8 months ago

Did some tests with JIT in 136345a8ca046419db73fdb55b42758feabc1278. Jit-ing Fint, Fdiff, and F_state_error had the largest impact, cutting optimization runtime in half (at the cost of some one-time c-code generation).

This is in contrast with Jit-ing the mapped pseudospectral equations, which only cut runtime by ~10%. I suspect this is due to loop unrolling of the maps.

Looks like Jit-ing the former is our best bet for now.