Reducing wall time of math tests

We should address this problem. There are a few things we can do:

  • I think we can address a lot of this if we actually used the make header dependencies correctly and only rebuilt the tests necessary.
  • better org of the tests might help the perception of slow tests a bit. Right now, the tests for a single function are split into multiple folders. If they were in the same place, it’d be easier to continuously test. Single tests don’t take much time to compile.
  • we should revisit the idea that we’re supporting forward mode. There isn’t much time spent developing it, as far as I’ve seen. It is a drag on development. It does have massive potential if we can get help with it.

Anyone else have anything to help reduce the time? It’s almost all spent in compile time.

We could just give up and remove RHMC. Or someone could do the tests.

I think the reason we’re stuck is the insistence on testing everything means we can’t factor the tests as we originally did. In the beginning, we tested doubles, forward, and reverse, and assumed they’d all play nicely when plugged together. This assumption failed exactly once with a trigamma function we’d encoded too directly. So one approach is to relax our testing requirements to something more factored. The mix tests are just too much for anyone to implement.

For higher-order, we’d have to change the way we did ODE calculations and go back to autodiffing the algorithm.

1 Like