Skip to content

Print argv at the top for all benchmarking runs - #463

Open
Jacobfaib wants to merge 4 commits into
NVIDIA:mainfrom
Jacobfaib:jacobf/2026-08-27/printer-show-argv
Open

Print argv at the top for all benchmarking runs#463
Jacobfaib wants to merge 4 commits into
NVIDIA:mainfrom
Jacobfaib:jacobf/2026-08-27/printer-show-argv

Conversation

@Jacobfaib

@Jacobfaib Jacobfaib commented Aug 27, 2026

Copy link
Copy Markdown

Print the command line as the script saw it at the header of each benchmarking run.

For example, in the markdown printer:

$ ./my_bench --foo --bar -baz=bop
...
# Command Line

./my_bench --foo --bar -baz=bop

@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@oleksandr-pavlyk
oleksandr-pavlyk self-requested a review August 27, 2026 15:04
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Benchmark output now includes the command-line arguments used to run it.
    • Markdown reports format command-line arguments safely, including arguments with special characters.
    • Command-line information is forwarded across multiple configured output formats.
  • Documentation

    • Added instructions for running the throughput benchmark example from the command line.

Walkthrough

Changes

The printer API now supports command-line output. Markdown printers store and quote arguments, multiplexed printers forward output, and main_print_preamble emits it before device information. The README adds a throughput benchmark command example.

Command-line output

Layer / File(s) Summary
Printer command-line API
nvbench/printer_base.cuh, nvbench/markdown_printer.cuh, nvbench/printer_multiplex.cuh
Adds the print_argv() API, subclass hook, Markdown argument storage, and multiplex override declarations.
Markdown command-line rendering
nvbench/markdown_printer.cu
Stores arguments and writes a quoted Markdown Command Line block when arguments exist.
Preamble and multiplex integration
nvbench/printer_multiplex.cxx, nvbench/main.cuh, README.md
Forwards command-line printing through multiplexed printers, invokes it from main_print_preamble, and documents the benchmark command.

Suggested reviewers: oleksandr-pavlyk

Merge Risk: 🔵 Low · up to 68c3e

The change improves benchmark report reproducibility, but certain arguments can produce malformed Markdown, copied commands may be wrong on Windows, and custom argument handlers may cause the displayed command to differ from what the user entered. The PR is mergeable with explicit owner follow-up on these bounded correctness issues.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5b9aa6b7-d065-48f3-8fb0-42c2b1bb9804

📥 Commits

Reviewing files that changed from the base of the PR and between 66212f1 and 68c3ea1.

📒 Files selected for processing (7)
  • README.md
  • nvbench/main.cuh
  • nvbench/markdown_printer.cu
  • nvbench/markdown_printer.cuh
  • nvbench/printer_base.cuh
  • nvbench/printer_multiplex.cuh
  • nvbench/printer_multiplex.cxx

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread nvbench/main.cuh
Comment thread nvbench/markdown_printer.cu Outdated
Comment thread nvbench/markdown_printer.cu Outdated
Comment thread nvbench/markdown_printer.cu Outdated
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

Successfully merging this pull request may close these issues.

2 participants