Skip to content

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

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

Roofline: single-click filtering for kernels, memory levels, and bandwidth peaks#950
dhingora-amd wants to merge 4 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>
m_isolated_kernel = nullptr;
RecomputeVisibility();
}
for(const KernelInfo* kernel : m_workload->ordered_kernels)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some kernels do not have roofline data (kernel.roofline.intensities.empty()) and should not be in this list.

ImVec2(menus_content_width, 0),
ImVec2(menus_content_width,
max_menus_height - header_height - footer_height));
std::max(0.0f, max_menus_height - header_height - footer_height)));

@drchen-amd drchen-amd Jul 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this needed? It breaks the custom region when the height is small.

Screenshot from 2026-07-23 19-15-32

@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?

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