-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proper benchmarking #92
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is absolutely great and could be merged right away. I was wondering about a few more things though
-
It would be nice to benchmark an inhomogeneous system with algebraic constraints in mass matrix form. Thus we would benchmark stiff solvers as well that should improve with the upcoming Jacobian vector product.
-
Would it be possible to add these benchmarks to CI? Or should we run them on our machines manually each time we release a new Version?
-
Just for clarification: If I get this right we could also benchmark against different Julia version in order catch potential regressions in Base?
Project.toml
Outdated
@@ -4,6 +4,7 @@ authors = ["Frank Hellmann <[email protected]>, Michael Lindner <michaelli | |||
version = "0.5.4" | |||
|
|||
[deps] | |||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add this dependency to a local environment in the benchmarking
folder instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not that trivial unfortunately. Normally, pkgbenchmark
will take the benchmark files from the specific commit you are benchmarking. I think this is not what we want here. During the process of benchmarking a different commit the script will
- copy the NetworkDynamics repo to a temp location
- copy the benchmark folder to a different temp location
- change the temp NetworkDynamics folder to the commit to we want to
- at this point, it is not clear how to reach the temp ND folder from the environment which lives inside the benchmark folder, therefore it is much simpler to run everything from the ND environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on a second though though, this works with [email protected] where ther was no BenchmarkTools
in the deps. We might get away without the explicit dependency. As i do right now with PkgBenchmarks (which you have to have in your global environment so it doesn't show up in the ND deps)
well, thats the idea. Having a common place where to add as much benchmarks as we like... right now they are also a bit redudant, i'm not sure whether we should test everything for so many values of N
In theory yeah, totally possible. We can test this out at some point. For this, i think running it lokally will be sufficient. The default config will allways compare to master. I thinke once your are happy with your PR, run
Yes, right now i am adding more parameters to the benchmark script so you can do something like
to benchmark the current directory on |
Unfortunately I can't run the benchmarks on my machine. I get: |
ok great. the benchmarks make a lot of sense like that. diffusion benchmarks a star graph and kuramoto a sparse graph. at some point we should benchmark different solver calls, especially when it comes to evaluating performance of JVPs. we could add that with the JVP PR #95. |
This is a proposal on how to do proper benchmarking for future version using
PkgBenchmark.jl
andBenchmarkTools.jl
.I've added a readme to the benchmark folder on how to run those.
In short
will create 3 markdownfiles with the results of the benchmarks
You can see those markdown files in this gist.
The most importand is probably this section, where you can see the nice speedup of #80
Results
A ratio greater than
1.0
denotes a possible regression (marked with ❌), while a ratio lessthan
1.0
denotes a possible improvement (marked with ✅). Only significant results - resultsthat indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).
["diffusion", "ode_edge", "assemble", "10"]
["diffusion", "ode_edge", "assemble", "100"]
["diffusion", "ode_edge", "assemble", "1000"]
["diffusion", "ode_edge", "assemble", "10000"]
["diffusion", "ode_edge", "call_mt", "10"]
["diffusion", "ode_edge", "call_mt", "100"]
["diffusion", "static_edge", "assemble", "10"]
["diffusion", "static_edge", "assemble", "100"]
["diffusion", "static_edge", "assemble", "1000"]
["diffusion", "static_edge", "assemble", "10000"]
["diffusion", "static_edge", "call", "10"]
["diffusion", "static_edge", "call", "1000"]
["diffusion", "static_edge", "call_mt", "10"]
["diffusion", "static_edge", "call_mt", "100"]
["diffusion", "static_edge", "call_mt", "1000"]
["diffusion", "static_edge", "call_mt", "10000"]
["kuramoto", "heterogeneous", "assemble", "10"]
["kuramoto", "heterogeneous", "assemble", "100"]
["kuramoto", "heterogeneous", "assemble", "1000"]
["kuramoto", "heterogeneous", "assemble", "10000"]
["kuramoto", "heterogeneous", "call", "10"]
["kuramoto", "heterogeneous", "call", "100"]
["kuramoto", "heterogeneous", "call", "1000"]
["kuramoto", "heterogeneous", "call", "10000"]
["kuramoto", "heterogeneous", "call_mt", "10"]
["kuramoto", "heterogeneous", "call_mt", "100"]
["kuramoto", "heterogeneous", "call_mt", "1000"]
["kuramoto", "heterogeneous", "call_mt", "10000"]
["kuramoto", "homogeneous", "assemble", "10"]
["kuramoto", "homogeneous", "assemble", "100"]
["kuramoto", "homogeneous", "assemble", "1000"]
["kuramoto", "homogeneous", "assemble", "10000"]
["kuramoto", "homogeneous", "call", "10"]
["kuramoto", "homogeneous", "call", "1000"]
["kuramoto", "homogeneous", "call_mt", "100"]
["kuramoto", "homogeneous", "call_mt", "1000"]
["kuramoto", "homogeneous", "call_mt", "10000"]