Skip to content
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

Micro-benchmark inference #1759

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Micro-benchmark inference #1759

wants to merge 12 commits into from

Conversation

jainapurva
Copy link
Contributor

@jainapurva jainapurva commented Feb 21, 2025

This is the first PR, in the benchmarking effort. It provides the outline to setup inference microbenchmarking for quant api's in torchao.

The different inputs like quantization techniques, matrix sizes, compile, sparsity etc, will be given as input to the python script. The options are re-defined in the scipt for quantization techniques, and a developer can add new quant technique. The script will generate a csv with performance numbers, and that'll be used to plot charts and as an input to dashboard . The script performs the following tasks:

  • Take input as .yml
  • Performs benchmarking for quantize_ APIs eval time for configurations
  • Record all the config params and their respective time in csv file.
  • Test cases

Future PRs will include more config options and process the generated results.

Run command:

python benchmarks/microbenchmarks/benchmark_runner.py --config benchmarks/microbenchmarks/benchmark_config.yml

Output will be stored in

benchmarks/microbenchmarks/results/results.csv

Copy link

pytorch-bot bot commented Feb 21, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1759

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 22b3ddd with merge base bc4f51d (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 21, 2025
@jainapurva jainapurva added topic: new feature Use this tag if this PR adds a new feature topic: performance Use this tag if this PR improves the performance of a feature labels Feb 25, 2025
@jainapurva jainapurva requested a review from HDCharles February 25, 2025 20:32
@jainapurva jainapurva marked this pull request as ready for review February 25, 2025 22:02
[4096, 4096, 1024]
]
high_precision_dtype: "torch.bfloat16"
compile: true
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I tend to prefer to consolidate multiple variables into 1, like compile vs compile_mode is kind of redundant when you could just have

compile: "max-autotune" or compile: "false"

Copy link
Contributor

@HDCharles HDCharles left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: new feature Use this tag if this PR adds a new feature topic: performance Use this tag if this PR improves the performance of a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants