Skip to content
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

Make functions being benchmarked directly accessible #31

Open
willtebbutt opened this issue Oct 31, 2024 · 2 comments
Open

Make functions being benchmarked directly accessible #31

willtebbutt opened this issue Oct 31, 2024 · 2 comments

Comments

@willtebbutt
Copy link
Member

willtebbutt commented Oct 31, 2024

This package currently makes it rather straightforward to compare the performance of different Turing.jl models, and of different ADs being applied to those models. This is great. However, it is not quite as straightforward to get hold of the various functions which are actually being benchmarked.

One reason to want this is to be able to profile the functions in question, in order to understand where performance bottlenecks are -- in my case, I would really like to be able to understand the performance of the various ADs in different situations in a granular way.

Could a function get_items_to_benchmark (I'm not attached to this particular name) be exposed as part of the public API? It would return the exact values of functions + arguments which would be benchmarked if you called benchmark_model. This would enable you to run the benchmarks independently of the suite, therefore enabling profiling, and a more fine-grained understanding of performance.

@torfjelde
Copy link
Member

You can extract this from the benchmark suite (obtained through make_benchmark_suite), no? This contains the @benchmarkable expression, which you can just run. This is what I've done before when wanting to profile. Or is that not enough?

@willtebbutt
Copy link
Member Author

Ooooo I was not aware that this was a thing. I'll give it a go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants