Skip to content

fix(tutorial): correct return order of min/max ms in grouped_gemm benchmark#9432

Merged
Jokeren merged 1 commit intotriton-lang:mainfrom
niyunsheng:error_bar_in_grouped_gemm
Feb 11, 2026
Merged

fix(tutorial): correct return order of min/max ms in grouped_gemm benchmark#9432
Jokeren merged 1 commit intotriton-lang:mainfrom
niyunsheng:error_bar_in_grouped_gemm

Conversation

@niyunsheng
Copy link
Copy Markdown
Contributor

New contributor declaration

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these
    rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because FILL THIS IN.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

Description

This PR fixes an issue with inverted error bars in the grouped_gemm tutorial's performance plot.

Currently, the benchmark_batches and benchmark_square_matrices function returns ms, max_ms, min_ms. Since the y-axis metric is absolute runtime(ms), this inadvertently swaps the upper and lower bounds for the error bars in the triton.testing.perf_report rendering logic.

(Note: Other tutorials correctly use the inverted order because their y-axis is throughput, e.g., gbps(min_ms) as the upper bound. This issue is isolated to grouped_gemm.)

The grouped_gemm tutorial plots absolute latency `runtime(ms)` on the y-axis, but incorrectly returned `(ms, max_ms, min_ms)` from the benchmark function. This inverted the lower and upper bounds of the error bars in the generated plot. This commit fixes the return order to `(ms, min_ms, max_ms)` to ensure accurate variance visualization.
@niyunsheng niyunsheng requested a review from ptillet as a code owner February 11, 2026 14:04
@Jokeren Jokeren merged commit 2d68647 into triton-lang:main Feb 11, 2026
9 checks passed
@niyunsheng niyunsheng deleted the error_bar_in_grouped_gemm branch February 11, 2026 16:15
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