Skip to content

microbenchmarks: add buffer rotation option#677

Open
matthiasdiener wants to merge 2 commits into
devfrom
mdiener/benchmarks-rotating
Open

microbenchmarks: add buffer rotation option#677
matthiasdiener wants to merge 2 commits into
devfrom
mdiener/benchmarks-rotating

Conversation

@matthiasdiener

@matthiasdiener matthiasdiener commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Add a new option, --rotating-buffers, to rotate input buffers (off by default).
Follows the discussions in:

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in --rotating-buffers mode to the microbenchmarks to cycle input tensors through a buffer ring, reducing artificial cache-residency effects and aligning measurements with common GEMM benchmarking methodology.

Changes:

  • Introduces buffer-rotation utilities (rotating, make_input) and a new CLI flag --rotating-buffers [N] in the shared microbenchmark runner.
  • Updates several benchmarks (GEMM, FP8 GEMM, normalization, grouped GEMM, casting) to use rotation-aware input construction.
  • Documents the new option and usage examples in the microbenchmarks README.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
benchmarks/microbenchmarks/utils.py Adds rotation machinery + CLI flag plumbing and helper APIs used by benchmarks.
benchmarks/microbenchmarks/README.md Documents --rotating-buffers behavior and provides example invocations.
benchmarks/microbenchmarks/benchmark_normalization.py Switches normalization benchmarks to rotation-aware input generation.
benchmarks/microbenchmarks/benchmark_grouped_gemm.py Updates grouped GEMM benchmark to optionally follow rotated activation buffers.
benchmarks/microbenchmarks/benchmark_gemm.py Switches GEMM benchmark to rotation-aware input generation.
benchmarks/microbenchmarks/benchmark_gemm_fp8.py Switches FP8 GEMM benchmark to rotation-aware input generation.
benchmarks/microbenchmarks/benchmark_casting.py Uses rotation-aware inputs for quantize path and rotates FP8 tensors for dequantize path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmarks/microbenchmarks/utils.py
Comment thread benchmarks/microbenchmarks/utils.py
Comment thread benchmarks/microbenchmarks/utils.py
Comment thread benchmarks/microbenchmarks/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread benchmarks/microbenchmarks/benchmark_grouped_gemm.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

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