Repository navigation
Add support for collecting statistics in the benchmark pipeline - #8271
antiagainst wants to merge 3 commits into
Conversation
854c671 to
859380c
Compare
859380c to
426d36e
Compare
ScottTodd
left a comment
There was a problem hiding this comment.
Scanned through, haven't yet reviewed all files.
| add_custom_command( | ||
| OUTPUT "${_VMFB_FILE}" | ||
| OUTPUT "${_VMFB_FILE}" "${_VMFB_STAT_FILE}" | ||
| COMMAND | ||
| "$<TARGET_FILE:iree::tools::iree-translate>" | ||
| ${_TRANSLATION_ARGS} | ||
| ${_STATS_FLAGS} | ||
| "--mlir-print-op-on-diagnostic=false" | ||
| "${_MODULE_SOURCE}" | ||
| -o "${_VMFB_FILE}" |
There was a problem hiding this comment.
This always generates stats, even if collection (COLLECT_COMPILATION_STATISTICS) is not enabled?
Could add a comment if that's intentional (e.g. "stats generation is cheap, so always perform it, even if not collecting the stats")
| # COLLECT_COMPILATION_STATISTICS: Indidate whether to collect compilation | ||
| # statistics. |
There was a problem hiding this comment.
Can you elaborate on what collection actually does? (writes a JSON file to disk when the target is built? Updates a database entry when a binary is ran?)
| "COLLECT_COMPILATION_STATISTICS" | ||
| "DRIVER;TARGET_BACKEND;TARGET_ARCHITECTURE" | ||
| "BENCHMARK_MODES;BENCHMARK_TOOL;MODULES;TRANSLATION_FLAGS;RUNTIME_FLAGS" |
There was a problem hiding this comment.
Could we decouple compilation and compilation statistics collection from execution time benchmarking? It looks like this PR offers no way to track offline statistics for a configuration without tightly coupling that same configuration to an execution time benchmark.
(I have a feeling the answer will be "maybe in the future", but these sorts of infrastructure configurations are harder to split apart once they settle)
| @@ -10,6 +10,7 @@ steps: | |||
| - label: "Build" | |||
There was a problem hiding this comment.
unrelated, but isn't it about time to rename this benchmark.yml instead of benchmark2.yml? :P
| for statistic_index in range(len(statistic_results.statistics)): | ||
| statistic_case = statistic_results.statistics[statistic_index] | ||
| statistic_info = statistic_case.statistic_info |
There was a problem hiding this comment.
If statistic_results.statistics is a list / typical iterable data type, can't you simplify this?
| for statistic_index in range(len(statistic_results.statistics)): | |
| statistic_case = statistic_results.statistics[statistic_index] | |
| statistic_info = statistic_case.statistic_info | |
| for statistic_case in statistic_results.statistics: | |
| statistic_info = statistic_case.statistic_info |
same above with
for benchmark_index in range(len(benchmark_results.benchmarks)):
benchmark_case = benchmark_results.benchmarks[benchmark_index]if you need the index, the pythonic way to iterate is https://stackoverflow.com/a/522578
for idx, val in enumerate(ints):
print(idx, val)| RUNTIME_FLAGS | ||
| "--task_topology_group_count=1" | ||
|
|
||
| COLLECT_COMPILATION_STATISTICS |
There was a problem hiding this comment.
This is going to be a lot of statistics. Is each statistic for each benchmark configuration a new series?
The PR comment shows "[Top 3 out of 332 statistic results showed]". Isn't that going to be really difficult to sift through on the dashboard?
Can we group the statistics or prune the set of configurations that track them?
(Writing to a database then querying that database will offer much more flexibility than continuing to push adhoc updates to https://github.com/google/dana IMO)
|
Closing as obsolete. I believe @pzread has been wiring this up. |
This commit wires up compilation statistics support in the benchmark
pipeline. We emit additional files during compilation to record compilation
statistics and then pick those files up for displaying either on pull request
or dashboard.
Progress towards #6161 & #7972