-
Notifications
You must be signed in to change notification settings - Fork 915
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 peak_memory_usage
to all nvbench benchmarks
#10528
Comments
CC @galipremsagar who was interested in this data. @devavret it looks like you made this very easy with the |
I don't have a reason not to support this. However it may not benefit the utility of all benchmarks. Does it impact CI benchmark throughput? |
I am reluctant to add this new functionality based on Google Benchmark when we are trying to phase that out. I would support adding this as a feature to benchmarks ported to NVBench. |
@PointKernel I notice that you're already doing this in #10248 with NVBench benchmarks. It looks like it's no more complex than incorporating the resource adapter into GBench benchmarks? |
Right. It's effortless with the help of memory_stats_logger. Only two lines to be added: auto mem_stats_logger = cudf::memory_stats_logger(); // init stats logger
state.exec([&](nvbench::launch& launch) {
target_kernel();
});
state.add_element_count(mem_stats_logger.peak_memory_usage(), "Peak Memory"); // report peak memory usage to nvbench
|
So then maybe making this change is independent of whether a benchmark has been switch from GBench to NVBench? It seems like we could add this now, then when a project switches from GBench to NVBench the only required change are to switch |
There's also the parsing and reporting side that will be different. I don't want to keep building things on top of GBench when I'm actively trying to get people to switch to NVbench. |
This issue has been labeled |
This issue has been labeled |
peak_memory_usage
to all nvbench benchmarks
@GregoryKimball do you think this is worth doing systematically for all benchmarks, or something we can add on a case by case basis as the need arises? If the latter, I would vote that we close this issue and just add this when we are benchmarking specific functionality. |
Update (2023-12-05):
Adding
peak_memory_usage
to nvbenchmarks can be accomplished with this pattern:Please consult the cuIO benchmarks for how to add peak memory tracking. If we are tracking peak memory usage as well as bytes per second, then we can estimate memory footprint across the libcudf API.
Original issue:
#7770 added support for peak memory usage to cuIO benchmarks using rmm's
statistics_resource_adapter
. It would be nice to be able to expand that to all of our benchmarks so that we could more easily detect regressions in memory usage. This would be particularly useful for the Dask cuDF team, which is always looking to identify bottlenecks from memory usage. There was already discussion of doing this in #7770, so we should investigate following up now.The text was updated successfully, but these errors were encountered: