-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add experimental support for perf (via LinuxPerf.jl) #347
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
We might need to set up Buildkite CI on this repo. @vchuravy @staticfloat |
f27a5de
to
bbfb733
Compare
This comment was marked as outdated.
This comment was marked as outdated.
cfa2cef
to
fb0b711
Compare
6b2884f
to
b1bc53c
Compare
I'm not sure I have the bandwidth as a maintainer of this package to support this kind of infrastructure directly in benchmarktools.jl. Is there a way that we can support this inside LinuxPerf.jl rather than in BenchmarkTools.jl? Maybe a separate |
it seems like too much overhead to me to support separate CI for this just to support this feature here, especially if it's possible to support this in linuxperf.jl. Could linuxperf support a separate Especially if we need special CI to run some software, it seems much easier to support this kind of feature in that repo, rather than this one. |
I think if I can get this to a low enough maintenance overhead for you it would be best to add perf profiling in BenchmarkTools. I think we can just remove the extra CI and make it clear that this is experimental. I don't think there's much need to make sure the profiling works on CI and users can easily run their own tests. Let me know if there's anything else I can do to lower the overhead or if it's not going to be possible for the overhead to be low enough. If you care why I don't think it makes sense to put this functionality in LinuxPerf or BaseBenchmarks, I've explained below. |
Could we add something like a prehook and a posthook argument to the |
I'm imagining something like:
|
Replaces #325 (closes #325)
Depends on JuliaPerf/LinuxPerf.jl#38.
This pr adds the ability to run perf at the end of a benchmark run for at least a microsecond. It's disabled by default. If enabled it stores the results (adds them to
TrialEstimate
) with the rest of the benchmark data.The default is to only measure instructions and branch-instructions as these seem to be the only things non noisy enough to give stable results for the short runs we do. Nor do we need to measure cycles or task-clock given we are running a benchmark beforehand anyways.
For comparison benchmarking
BaseBenchmarks.SUITE[["inference", "allinference", "many_local_vars"]]
the percentage difference between the max and min minimum time over 5 runs is 1.25% whilst it's 0.002% for instruction count. Given on Nanosoldier the same benchmark is changing about 5-10% every few runs (see here), this seems like it's going to work very well