Skip to content

[FEAT] Microbenchmark add visualization#620

Open
Micky774 wants to merge 1 commit into
devfrom
zain/bench/visual
Open

[FEAT] Microbenchmark add visualization#620
Micky774 wants to merge 1 commit into
devfrom
zain/bench/visual

Conversation

@Micky774

@Micky774 Micky774 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces both static and interactive plotting visualization for microbenchmark results, including per-sample results.

Fixes # (issue)

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

Please list the changes introduced in this PR:

New — benchmarks/microbenchmarks/

  • viz_data.py — shared data layer: auto-detects the samples (--csv-samples) vs aggregate (--csv) schemas and normalizes both to one tidy frame; dtype shortening, label→bench/pass split, percentile trim, per-group stats.
  • visualize.py — Plotly figure builders + CLI emitting self-contained interactive HTML (no server). Kinds: distribution (box + raw points), scaling (median vs M with spread band), bars (median throughput, IQR error bars), comparison (baseline-vs-candidate speedup bars), report (all). --cdn for a smaller file.
  • dashboard.py — live Panel explorer (mirrors the JAX panel_app.py): selectors for plot/metric/x/hue/facet, percentile-trim slider, per-attribute filters; reuses visualize.py builders.
  • requirements-viz.txtpandas, plotly, panel.

Updated

  • README.md — "Visualizing results" section (CLI + panel serve usage, supported benchmarks).

Notes

  • Works for all microbenchmarks (dense/FP8/grouped GEMM, normalization, casting); pooled dimensions (e.g. grouped GEMM's B) trigger a [note] to split via --facet/--color/--pass.
  • Speedup is direction-correct in both metrics (cand/base for throughput, base/cand for time; >1 = candidate faster).
  • Read-only over the existing CSVs — no changes to the benchmark scripts or utils.py.

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

@ipanfilo ipanfilo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are other PRs that add more scripts to microbenchmarks. So consider make this dir more structured: move visualization to subdir

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