NVIDIA / nvbench

CUDA Kernel Benchmarking Library
Apache License 2.0
474 stars 63 forks source link

Get markdown report from JSON #179

Open bernhardmgruber opened 1 month ago

bernhardmgruber commented 1 month ago

When I run an nvbench-based benchmark, like:

thrust.bench.transform.basic.base -d 0 --stopping-criterion entropy --json baseline.json

it prints a nice markdown report at the end, summarizing the run benchmarks, times, bandwidths etc. All data is also stored into baseline.json. I archive the JSON file for later use, e.g., comparing it with other results. The terminal output is discarded. However, the comparison script nvbench_compare.py later only shows the runtimes of the baseline and comparison run, not the bandwidth and %SOL. The data should be in the JSON file tough.

Is there a way to have the comparison script print the bandwidth as well? Is there a tool/script to print the markdown report given a JSON file?

Both features would be very useful to easily print the achieved bandwidth and %SOL for results stored as JSON. Otherwise, I would always need to capture and archive the markdown report as well, which is annoying and seems redundant.

alliepiper commented 1 month ago

Is there a way to have the comparison script print the bandwidth as well?

The data is in the JSON and we can modify the comparison script to print it (maybe an --additional-fields option or similar?).

Is there a tool/script to print the markdown report given a JSON file?

No, the existing markdown printer reads from the runtime data structures, not the JSON archive. This would require a new implementation.

bernhardmgruber commented 1 month ago

I would warmly welcome both additions :)