-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In this example:
https://gist.github.com/EiffL/8e46d261e5d52cd28ca81e233fef9b04
It takes 3 mins for the first evaluation of the model to run, but just a few seconds in the second run.
@modichirag has also been able to check that the compilation time is a function of the number of steps. This would indicate that the code is building an overly complex computational graph including explicitly each step of the nbody.
I suspect this is due to using a python for loop in the nbody function. Probably things would improve a lot if it were replaced with a lax.scan
Metadata
Metadata
Assignees
Labels
No labels