Skip to content

feat(rocprofiler-compute) Data fix and UX improvement for roofline - #12190

Merged
cfallows-amd merged 46 commits into
rocprofiler-compute-developfrom
user/svolkov/roofline-analysis-for-meta
Oct 17, 2026
Merged

cfallows-amd merged 46 commits into
rocprofiler-compute-developfrom
user/svolkov/roofline-analysis-for-meta

Conversation

@svolkov-amd

@svolkov-amd svolkov-amd commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Rocprofiler-compute had incorrect data and was hard to use. Therefore, while doing an analysis in the roofline, I've fixed some of these issues.

Technical Details

Changes are:

  • Kernel names are limited in size to 200 symbols. One of the side effects of the long kernel name was that for extremely long kernel names, their preview in tooltip glithched.
  • Tooltip which shows a full kernel name is added when you hover on a kernel in the kernel list on the right.
  • Tooltip for kernel on the plot is changed to structure the data better, so it's easier to inspect it.
  • New "AI axis" mode is added which shows a kernel point which is a bottleneck (ex. if L1 is a bottleneck, the L1 point is shown. If kernel is compute bound then the left-most point is shown). This mode is made default.
  • Default state of HTML is updated to always show FP32, FP16, FP8 rooflines when HTML is opened.
  • Roofline benchmark is updated:
    • FP16 and BF16 MFMA intrinsics updated.
    • Max is taken for roofline value instead of average.

Issue Tracking

AIPROFCOMP-853

Test Plan

Manual validation for various pytorch bmm operators.
Unit tests.

Test Result

Kernels show a proper limiter now, metrics in tooltip make sense, unit tests pass.

Submission Checklist

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 24, 2026
@svolkov-amd svolkov-amd changed the title User/svolkov/roofline analysis for meta feat(rocprofiler-compute) Data fix and UX improvement for roofline Sep 26, 2026
@vedithal-amd

Copy link
Copy Markdown
Contributor

@cfallows-amd and @xuchen-amd could you please take the ownership of this PR and keep it rebased and up-to-date and implement review findings after talking to @svolkov-amd - please also finish the testing, thanks!

@vedithal-amd
vedithal-amd force-pushed the rocprofiler-compute-develop branch from 95d6a38 to fb4414e Compare September 27, 2026 16:40
Base automatically changed from rocprofiler-compute-develop to develop September 28, 2026 19:57
@therock-pr-bot

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ❌ Fail Error: Check concluded with failure.
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 2 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description
  • ❌ pre-commit

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@cfallows-amd
cfallows-amd changed the base branch from develop to rocprofiler-compute-develop September 29, 2026 14:31
@cfallows-amd
cfallows-amd requested review from a team and prbasyal-amd as code owners October 9, 2026 16:57
Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:57
@cfallows-amd

Copy link
Copy Markdown
Contributor

Ctest passing on MI350X and MI455X.

Ran a 10 and 100 experiment benchmark cycle to do a comparison:
All differences are within ±2.2%, with most under ±0.3%. The largest variation is HBMBw (+2.20%) and WMMAF6Flops (+1.01%), the rest are effectively stable between 10 and 100 runs.

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.

🟡 Changes recommended

Dispatch percentages use a filtered denominator, and the truncated kernel controls do not expose full names accessibly.

5 open findings
What changed in this PR

Improves roofline accuracy and usability through corrected benchmark calculations, richer tooltips, and limiter-focused plotting.

Changes:

  • Adds limiting-peak axis mode, kernel-name truncation, and detailed hover data.
  • Uses peak benchmark samples and corrects gfx950 FP16 MFMA.
  • Expands default precisions and updates tests/documentation.
File Description
tests/​unit/​utils/​test_roofline_calc.py Updates kernel-stat field expectations.
tests/​unit/​roofline/​test_roofline_main.py Tests limiter, tooltip, precision, and truncation behavior.
src/​utils/​roofline_calc.py Adds application and renamed kernel timing data.
src/​roofline/​roofline_main.py Implements limiter selection and richer kernel models.
src/​roofline/​roofline_html.py Embeds limiter and tooltip assets.
src/​roofline/​roofline_hover.py Restructures hover content and formatting.
src/​roofline/​benchmark/​gfx9/​benchmark_gfx950.py Corrects FP16 MFMA intrinsic accounting.
src/​roofline/​benchmark/​benchmark_base.py Records peak benchmark samples and simplifies CSV output.
src/​roofline/​assets/​roofline_plot.js Adds limiting-axis and kernel-tooltip behavior.
src/​roofline/​assets/​roofline_kernel_list_tooltip.js Implements full-name tooltips.
src/​roofline/​assets/​roofline_kernel_list_tooltip.css Styles kernel-name tooltips.
docs/​how-to/​analyze/​cli.rst Documents the limiting-axis mode.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

…e full kernel name when truncated, so screen readers announce the complete name.

roofline_calc.py, roofline_main.py: totalAppDispatches added to PlotPoints, populated from top_df["Count"].sum() (the full unfiltered table). roofline_main.py now reads it from ai_data instead of summing the filtered counts list — fixes the case where a selected kernel could show 100% dispatch share.
 roofline_html.py, cli.rst: Missing space between adjacent string literals fixe, Inaccurate "bottleneck points" description replaced with accurate fallback wording in both the in-HTML tooltip and the docs.

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
Create CHANGELOG entries.

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>

@vedithal-amd vedithal-amd 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.

will review

@feizheng10 feizheng10 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.

Two problems in how a kernel's limiter is chosen and how Limited by picks the point to draw.

@feizheng10

feizheng10 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Using fake data to demonstrate the two problems above. The intensities, bandwidths, and peaks are invented. They follow the limiter rules on this pull request. This is not a profiled workload.

1. A kernel above the FP32 peaks is labeled LDS. fp8_bmm runs at 30,000 GFLOP/s on every level. The page draws FP32, FP16, and FP8, but the limiter only sees the default CLI list, FP32, and it drops any roof the kernel has already passed.

Roof How it is built GFLOP/s Result
LDS AI 0.5 × 80,000 GB/s 40,000 Kept. Lowest survivor, so this wins. Hover: Limited by Memory: LDS, 75%.
L1 AI 2 × 30,000 GB/s 60,000 Kept, higher than LDS.
L2 AI 8 × 10,000 GB/s 80,000 Kept, higher than LDS.
HBM AI 40 × 2,500 GB/s 100,000 Kept, higher than LDS.
FP32 VALU In --roofline-data-type 10,000 Dropped. Below the kernel.
FP32 MFMA Envelope cap 20,000 Dropped here. Develop would report this at 150%.
FP16 MFMA Drawn on open, not in the CLI list 80,000 Never a candidate.
FP8 MFMA Drawn on open, not in the CLI list 160,000 Never a candidate.

The same kernel at 120,000 GFLOP/s has no roof left above it, so the hover is Unknown. The drawn FP8 ceiling is still 160,000.

2. A compute-bound kernel is drawn on LDS. Second fake machine: LDS 50,000, L1 12,000, L2 2,400, HBM 500 GB/s, FP32 VALU 10,000, FP32 MFMA 20,000 GFLOP/s. compute_bound runs at 8,000. FP32 VALU is the lowest roof still above it (80% of that ceiling). Limited by still plots the leftmost point, LDS at AI 0.1, where the LDS roof is only 5,000, so the dot sits above the diagonal. The same kernel's HBM point, AI 40, is to the right of the knee and under the flat ceiling, and it is hidden. hbm_copy at 1,000 really is on the HBM roof at AI 2, and on the shared axis it appears to the right of the compute-bound kernel.

image

Working on a fix on branch users/feizheng/fix-roofline-limiter-pr12190. It keeps every known roof as a candidate and uses the envelope cap as the compute candidate, so a kernel that has passed a ceiling is still reported against it at >100%. For a compute-bound or unknown kernel it leaves limitingPeak unset, and Limited by shows every point instead of an arbitrary leftmost one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vedithal-amd

Copy link
Copy Markdown
Contributor

Pushed a commit removing the unused DEFAULT_WORKGROUPS and DEFAULT_THREADS constants from benchmark_base.py.

…CHANGELOG

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vedithal-amd

Copy link
Copy Markdown
Contributor

Pushed a CHANGELOG entry for the higher gfx950 FP16/BF16 MFMA peaks, since that's what users see from the instruction change.

- Indent the Limited by docs line so the AI axis bullet list renders
- Use max(samples) directly instead of calc_stats
- Move roofline_main test imports to module level
- Replace the nested ternary in exportViewSubtitle with peakLabel

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vedithal-amd

Copy link
Copy Markdown
Contributor

Pushed a few small fixes:

  • Indented the Limited by docs line so the bullet list renders.
  • Replaced calc_stats with max(samples).
  • Moved the roofline_main test imports to module level.
  • Replaced the nested ternary in exportViewSubtitle with a peakLabel helper.

…candidate

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vedithal-amd

Copy link
Copy Markdown
Contributor

Pushed a fix so the limiter's compute candidates come from every datatype drawn on the page, not just --roofline-data-type.

@vedithal-amd

Copy link
Copy Markdown
Contributor

@feizheng10 thanks for the detailed walkthrough, the exceeded-roof cases are a fair concern. Handling kernels above a measured roof is out of scope for this PR, so let's take it up in a follow-up.

@vedithal-amd vedithal-amd 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.

LGTM

@cfallows-amd

Copy link
Copy Markdown
Contributor

Fei's comments are valid and we will continue to correct the limiter on the plot through his new branch. Team has agreed to push this in now and create followup PRs.

@cfallows-amd
cfallows-amd merged commit 8feab02 into rocprofiler-compute-develop Oct 17, 2026
118 of 122 checks passed
@cfallows-amd
cfallows-amd deleted the user/svolkov/roofline-analysis-for-meta branch October 17, 2026 01:30
vedithal-amd added a commit that referenced this pull request Oct 19, 2026
- Route the roofline kernel list tooltip assets from #12190 through
  build_document.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
vedithal-amd added a commit that referenced this pull request Oct 25, 2026
…12190)

## Motivation

Rocprofiler-compute had incorrect data and was hard to use. Therefore,
while doing an analysis in the roofline, I've fixed some of these
issues.

## Technical Details
Changes are:
- Kernel names are limited in size to 200 symbols. One of the side
effects of the long kernel name was that for extremely long kernel
names, their preview in tooltip glithched.
- Tooltip which shows a full kernel name is added when you hover on a
kernel in the kernel list on the right.
- Tooltip for kernel on the plot is changed to structure the data
better, so it's easier to inspect it.
- New "AI axis" mode is added which shows a kernel point which is a
bottleneck (ex. if L1 is a bottleneck, the L1 point is shown. If kernel
is compute bound then the left-most point is shown). This mode is made
default.
- Default state of HTML is updated to always show FP32, FP16, FP8
rooflines when HTML is opened.
- Roofline benchmark is updated:
    - FP16 and BF16 MFMA intrinsics updated.
    - Max is taken for roofline value instead of average.


## Issue Tracking
AIPROFCOMP-853

## Test Plan
Manual validation for various pytorch bmm operators.
Unit tests.

## Test Result
Kernels show a proper limiter now, metrics in tooltip make sense, unit
tests pass.

## Submission Checklist
- [x ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.


[AIPROFCOMP-232]:
https://amd-hub.atlassian.net/browse/AIPROFCOMP-232?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Carrie Fallows <Carrie.Fallows@amd.com>
vedithal-amd added a commit that referenced this pull request Oct 26, 2026
…12190)

## Motivation

Rocprofiler-compute had incorrect data and was hard to use. Therefore,
while doing an analysis in the roofline, I've fixed some of these
issues.

## Technical Details
Changes are:
- Kernel names are limited in size to 200 symbols. One of the side
effects of the long kernel name was that for extremely long kernel
names, their preview in tooltip glithched.
- Tooltip which shows a full kernel name is added when you hover on a
kernel in the kernel list on the right.
- Tooltip for kernel on the plot is changed to structure the data
better, so it's easier to inspect it.
- New "AI axis" mode is added which shows a kernel point which is a
bottleneck (ex. if L1 is a bottleneck, the L1 point is shown. If kernel
is compute bound then the left-most point is shown). This mode is made
default.
- Default state of HTML is updated to always show FP32, FP16, FP8
rooflines when HTML is opened.
- Roofline benchmark is updated:
    - FP16 and BF16 MFMA intrinsics updated.
    - Max is taken for roofline value instead of average.


## Issue Tracking
AIPROFCOMP-853

## Test Plan
Manual validation for various pytorch bmm operators.
Unit tests.

## Test Result
Kernels show a proper limiter now, metrics in tooltip make sense, unit
tests pass.

## Submission Checklist
- [x ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.


[AIPROFCOMP-232]:
https://amd-hub.atlassian.net/browse/AIPROFCOMP-232?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Carrie Fallows <Carrie.Fallows@amd.com>
lamikr pushed a commit that referenced this pull request Oct 27, 2026
…12190)

## Motivation

Rocprofiler-compute had incorrect data and was hard to use. Therefore,
while doing an analysis in the roofline, I've fixed some of these
issues.

## Technical Details
Changes are:
- Kernel names are limited in size to 200 symbols. One of the side
effects of the long kernel name was that for extremely long kernel
names, their preview in tooltip glithched.
- Tooltip which shows a full kernel name is added when you hover on a
kernel in the kernel list on the right.
- Tooltip for kernel on the plot is changed to structure the data
better, so it's easier to inspect it.
- New "AI axis" mode is added which shows a kernel point which is a
bottleneck (ex. if L1 is a bottleneck, the L1 point is shown. If kernel
is compute bound then the left-most point is shown). This mode is made
default.
- Default state of HTML is updated to always show FP32, FP16, FP8
rooflines when HTML is opened.
- Roofline benchmark is updated:
    - FP16 and BF16 MFMA intrinsics updated.
    - Max is taken for roofline value instead of average.


## Issue Tracking
AIPROFCOMP-853

## Test Plan
Manual validation for various pytorch bmm operators.
Unit tests.

## Test Result
Kernels show a proper limiter now, metrics in tooltip make sense, unit
tests pass.

## Submission Checklist
- [x ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.


[AIPROFCOMP-232]:
https://amd-hub.atlassian.net/browse/AIPROFCOMP-232?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Carrie Fallows <Carrie.Fallows@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants