Tim-Salzmann / l4casadi

Use PyTorch Models with CasADi for data-driven optimization or learning-based optimal control. Supports Acados.
MIT License
350 stars 23 forks source link

No Performance Improvement with ·scripting=False· #43

Closed xueminchi closed 1 month ago

xueminchi commented 1 month ago

Hi @Tim-Salzmann

I have tested the batch version of l4casadi in an MPC demo, and it improves computational efficiency a lot, especially as the number of evaluations of the l4casadi model increases.

However, I am puzzled because the computational time of my code does not change when I enable or disable the new function (scripting=False or scripting=True), as introduced. This behavior is consistent with the script nerf_trajectory_optimization_batched.py, where scripting=False does not seem to affect the speed in the executing stage.

Best, Xuemin

Tim-Salzmann commented 1 month ago

Hi,

v2 is still in development. Setting scripting=False will have no influence in the current version. Compile is not stable enough yet from the torch side.

Best Tim

xueminchi commented 1 month ago

Hi,

v2 is still in development. Setting scripting=False will have no influence in the current version. Compile is not stable enough yet from the torch side.

Best Tim

Thanks!