Skip to content

Document onnxruntime_perf_test usage, input data, and options#29215

Open
ArsalanShakil wants to merge 1 commit into
microsoft:mainfrom
ArsalanShakil:docs-perftest-readme
Open

Document onnxruntime_perf_test usage, input data, and options#29215
ArsalanShakil wants to merge 1 commit into
microsoft:mainfrom
ArsalanShakil:docs-perftest-readme

Conversation

@ArsalanShakil

Copy link
Copy Markdown
Contributor

Description

Rewrites onnxruntime/test/perftest/README.md, which had drifted out of date:

  • It predated the move to absl flags, so most command-line options were missing or wrong.
  • The documented test-data directory layout was incomplete and slightly incorrect (for example input0.pb rather than input_0.pb), which left users unsure how to provide inputs.
  • The sample output no longer matched what the tool prints.

The rewrite covers:

  • An overview, including the warm-up run and what is measured.
  • How to build and invoke the tool.
  • The two ways to provide input:
    • auto-generated input via -I (no data files needed), and
    • test-data directories, with a worked tools/python/onnx_test_data_utils.py example and a note that each subdirectory of the model folder is treated as one input set and input_<N>.pb files are bound to inputs by position.
  • A curated table of common options, with a pointer to --help for the complete, always-current list (so the README does not go stale again as options are added).
  • Runnable examples and updated sample output.

All option names, defaults, the directory-scanning behavior, the warm-up run, and the output format were verified against the current source (command_args_parser.cc, performance_runner.cc, and TestCase.cc).

Motivation and Context

Fixes #4934. The issue and its comments asked for clearer documentation of onnxruntime_perf_test, in particular how to construct input data and what the directory structure should be.

The perf test README was out of date: it predated the move to absl
flags (so most options were missing or wrong), the sample output no
longer matched the tool, and the test-data layout was described
incompletely, which left users unsure how to provide inputs (see microsoft#4934).

Rewrite the README to cover:
- an overview including the warm-up run and what is measured,
- how to build and invoke the tool,
- the two ways to provide input: auto-generated input via -I, and
  test-data directories, with a worked onnx_test_data_utils.py example
  and a note that each subdirectory of the model folder is one input set,
- a curated table of common options with a pointer to --help for the
  complete, always-current list,
- runnable examples and updated sample output.

Fixes microsoft#4934.
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.

Documentation and examples for onnxruntime_perf_test

1 participant