Skip to content

Roofline: single-click filtering for kernels, memory levels, and bandwidth peaks#950

Open
dhingora-amd wants to merge 5 commits into
mainfrom
dhingora/roofline-enhancements
Open

Roofline: single-click filtering for kernels, memory levels, and bandwidth peaks#950
dhingora-amd wants to merge 5 commits into
mainfrom
dhingora/roofline-enhancements

Conversation

@dhingora-amd

Copy link
Copy Markdown
Contributor

Motivation

The roofline shows every kernel's dot for every memory level plus all
bandwidth ceilings at once, which is noisy and takes many clicks to pare
down. This PR adds single-click ways to focus the view; they compose and
don't change the default.

Technical Details

All in src/view/src/compute/rocprofvis_compute_roofline.{h,cpp}:

  1. Kernel-intensity filter – Options dropdown (All / HBM / L2 / L1 / LDS)
    limits kernel dots to one memory level.
  2. Kernel isolation – click a kernel's dot or legend row to show only that
    kernel; click again to restore all.
  3. Bandwidth-peak isolation – click a bandwidth row or its plot line to show
    only that peak; the legend keeps all rows and highlights the active one.

Filters apply to the plot, legend, and hover; plot clicks use a drag check so
panning isn't treated as a click; state resets on workload change.

dhingora-amd and others added 3 commits July 21, 2026 15:45
Add a "Kernel intensity" dropdown (All / HBM / L2 / L1 / LDS) to the
roofline Options menu so kernel intensity dots can be limited to a single
memory level. This declutters the plot versus showing every level's dot
per kernel, making it easier to see which roof limits the kernels.

The filter is applied consistently to the plotted dots, the legend/options
list, and hover hit-testing. Defaults to All (unchanged behavior).

Co-authored-by: Cursor <cursoragent@cursor.com>
Add single-click kernel isolation to the workload (all-kernels) roofline:
clicking a kernel's dot in the plot or its row in the legend shows only
that kernel's intensity dots; clicking it again restores the whole
workload. This makes it easy to switch between whole-workload and
single-kernel analysis.

The dot click works in any zoom state (with a drag check so panning a
zoomed plot is not treated as a click) and stacks with the memory-peak
filter. Isolation resets when the workload changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add single-click bandwidth-peak isolation to the roofline: clicking a
bandwidth ceiling row in the legend, or its line in the plot, shows only
that peak (HBM/L2/L1/LDS) and hides the others. Clicking it again restores
all peaks.

The legend keeps all bandwidth rows and highlights the active one, so peaks
can be switched with a single click; the plot line toggles the shown peak
(a drag check keeps a zoomed-plot pan from counting as a click). Compute
ceilings and kernel dots are unaffected, and this stacks with the
memory-peak filter and kernel isolation. Isolation resets on workload
change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drchen-amd

Copy link
Copy Markdown
Member

Controls should be moved under presets header. Instead of the 6 buttons we have now, there should be a dropdown for each of the filters you added

  1. Kernel-intensity filter, options: All / HBM / L2 / L1 / LDS.
  2. Kernel isolation, options: names of all kernels
  3. Bandwidth-peak isolation: options: All / HBM / L2 / L1 / LDS

The click shortcut for 2 & 3 can stay to compliment the dropdowns since they are not easily discoverable by themselves.

Comment thread src/view/src/compute/rocprofvis_compute_roofline.cpp Outdated
Comment thread src/view/src/compute/rocprofvis_compute_roofline.cpp Outdated
Comment thread src/view/src/compute/rocprofvis_compute_roofline.cpp Outdated
@drchen-amd

This comment was marked as resolved.

…ility

Address roofline PR review feedback:

- Replace the preset buttons and scattered filter controls with dropdowns
  under the Presets header: Preset, Kernel intensity, Kernel, and Bandwidth
  peak. The dot/line/legend click shortcuts still complement them.
- Drive all filtering through each item's visibility (like ApplyPreset)
  instead of separate display predicates, so the Options menu always lists
  the full data set; only the chart, legend, and hover react to filters.
- Recompute visibility sets m_options_changed so ceiling changes re-fit the
  ridges (fixes bandwidth-peak discontinuities).
- Offer only the intensity/bandwidth levels actually present in the workload.
- Elide long kernel names in the Kernel dropdown so its popup stays put.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/view/src/compute/rocprofvis_compute_roofline.cpp Outdated
Comment thread src/view/src/compute/rocprofvis_compute_roofline.cpp Outdated
@drchen-amd

Copy link
Copy Markdown
Member

I think the order and names of the dropdowns should be changed to:

  1. "Preset" -> "Compute peak"
  2. "Bandwidth peak"
  3. "Kernel"
  4. "Kernel intensity" ->"Kernel bandwidth"

Thoughts @tomk-amd?

@tomk-amd

Copy link
Copy Markdown
Collaborator

I think the order and names of the dropdowns should be changed to:

  1. "Preset" -> "Compute peak"
  2. "Bandwidth peak"
  3. "Kernel"
  4. "Kernel intensity" ->"Kernel bandwidth"

Thoughts @tomk-amd?

I think this entire interface needs to be rethought ...

image

First laying out these quick use pull downs vertically make this panel very tall - requires scrolling - also in smaller views (as mentioned already) the custom portion get clipped and is unusable.

Second these are supposed to be quick options, but being buried behind the settings (gear) button does not make them quick to access. These options should always be accessible.. One option is to lay them out horizontally at the top like a tool bar?

I think the only real options, things that should be in this settings panel, are: line thickness, legend position, and the scale marker checkbox.

@drchen-amd

Copy link
Copy Markdown
Member

Yeah I think something like this would work:
image

Although horizontal layout will mean it will handle small window sizes less gracefully than vertical laying out. I imagine it will be like the compute comparison tool bar where, less than some minimum width, we give up and spill off screen. At least with vertical layout, scrolling can accommodate any window size.

With regards to custom portion getting clipped, if that line I called out is reverted, custom should never clip. It is not obvious to me the purpose of that change.

Address roofline PR review feedback:

- Lay the four filter dropdowns out horizontally above the plot, always
  accessible instead of buried behind the gear button, with inline labels.
- Rename/reorder to Compute peak, Bandwidth peak, Kernel, Kernel bandwidth.
- Keep only line thickness, menus position, and the scale-marker checkbox
  in the gear settings panel.
- Exclude kernels with no roofline data from the Kernel dropdown.
- Revert the scroll-view height clamp so the Custom list no longer clips
  in short panels.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

3 participants