Skip to content

[rocprofiler-compute] Fix kernel/dispatch filtering#2479

Merged
vedithal-amd merged 14 commits into
developfrom
users/vedithal/rocprofiler-compute-fix-gui
Jan 20, 2026
Merged

[rocprofiler-compute] Fix kernel/dispatch filtering#2479
vedithal-amd merged 14 commits into
developfrom
users/vedithal/rocprofiler-compute-fix-gui

Conversation

@vedithal-amd

@vedithal-amd vedithal-amd commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

Fix kernel/dispatch filtering in GUI

Technical Details

  • Fix kernel/dispatch filtering in GUI

  • Fix dispatch filtering in analyze mode where a range of dispatch ids is provided like --dispatch "> 2"

  • Gracefully handle N/A values in GUI

  • Ensure workload path is valid before using it in GUI

JIRA ID

AIPROFCOMP-85

Test Plan

Open occupancy workload profile output in GUI mode.
Select empty kernel.

Test Result

Ensure no errors output in console.

Submission Checklist

Copilot AI review requested due to automatic review settings January 2, 2026 21:36
@vedithal-amd vedithal-amd requested review from a team and prbasyal-amd as code owners January 2, 2026 21:36
@github-actions github-actions Bot added documentation Improvements or additions to documentation project: rocprofiler-compute labels Jan 2, 2026

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.

Pull request overview

This PR fixes kernel and dispatch filtering issues in the GUI analyzer by preventing command-line filters from conflicting with GUI frontend dropdown menus, handling N/A values consistently, and ensuring proper path validation.

  • Disallows --kernel and --dispatch command-line options when using --gui mode, directing users to use GUI dropdown menus instead
  • Updates N/A value handling from empty string checks ("") to explicit "N/A" string checks in chart generation functions
  • Moves workload path initialization from constructor to pre_processing() method to ensure path validation occurs first

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
gui.py Updates chart generation functions to handle "N/A" values instead of empty strings when processing metrics
analysis_webui.py Moves dest_dir initialization from __init__() to pre_processing() to ensure path is validated before use
analysis_base.py Adds validation to prevent using --kernel or --dispatch options with --gui mode
standalone-gui.rst Adds documentation note explaining that kernel/dispatch filtering should be done via GUI dropdowns, not command-line options
CHANGELOG.md Documents the fix for kernel/dispatch filtering in GUI mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread projects/rocprofiler-compute/CHANGELOG.md Outdated
Comment thread projects/rocprofiler-compute/src/utils/gui.py Outdated
Comment thread projects/rocprofiler-compute/src/utils/gui.py Outdated
@vedithal-amd vedithal-amd changed the title [rocprofiler-compute] Fix kernel/dispatch fitlering in GUI [rocprofiler-compute] Fix kernel/dispatch filtering Jan 5, 2026

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

Looks good! Please add unit tests for this new override.

@xuchen-amd

Copy link
Copy Markdown
Contributor

Looks good! Please add unit tests for this new override.

For CLI at least, we don't seem to have proper GUI tests atm

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

Well, to make it simple, I could accept the current solution.
However, it is a valid case that: User might want to filter out specific dispatches from a single kernel. For example, -k 1 --dispatch >3

@vedithal-amd

Copy link
Copy Markdown
Contributor Author

However, it is a valid case that: User might want to filter out specific dispatches from a single kernel. For example, -k 1 --dispatch >3

@feizheng10 , this is still possible, in this case we will just filter for dispatch 3 and ignore kernel, since fixing dispatch id(s) already fixes kernel, let me know if there are any questions

@feizheng10

Copy link
Copy Markdown
Contributor

However, it is a valid case that: User might want to filter out specific dispatches from a single kernel. For example, -k 1 --dispatch >3

@feizheng10 , this is still possible, in this case we will just filter for dispatch 3 and ignore kernel, since fixing dispatch id(s) already fixes kernel, let me know if there are any questions

dispatches could be a range or set. Ignoring kernel seems not meet the case:
Think about a mocked workload repeat calling k0, k1, k2 1000 times. User is interested in only filtering out k1 invocations after 21. There are 2 ways the users could specify: (1) He/she knows and specifies exactly which dispatches targeted, (2) -k 1 --dispatch >=21. I 'd guess user would prefer (2)

* Disallow --kernel and --dispatch filtering in analyze --gui mode since
  GUI frontend offers dropdown menu for kernel and dispatch filtering
    * Update CHANGELOG and documentation

* Gracefully handle N/A values

* Ensure workload path is valid before using it in GUI
@vedithal-amd vedithal-amd force-pushed the users/vedithal/rocprofiler-compute-fix-gui branch from 80300d0 to 6c76d93 Compare January 13, 2026 00:54
@vedithal-amd

Copy link
Copy Markdown
Contributor Author

However, it is a valid case that: User might want to filter out specific dispatches from a single kernel. For example, -k 1 --dispatch >3

@feizheng10 , this is still possible, in this case we will just filter for dispatch 3 and ignore kernel, since fixing dispatch id(s) already fixes kernel, let me know if there are any questions

dispatches could be a range or set. Ignoring kernel seems not meet the case: Think about a mocked workload repeat calling k0, k1, k2 1000 times. User is interested in only filtering out k1 invocations after 21. There are 2 ways the users could specify: (1) He/she knows and specifies exactly which dispatches targeted, (2) -k 1 --dispatch >=21. I 'd guess user would prefer (2)

Hi @feizheng10 ,

I agree with you, since dispatch filtering can be a range (e.g. > 2) we cannot ignore kernel filtering. I have reverted my changes for ignoring kernel filtering.

However, I noticed that dispatch filtering using a range (e.g. > 2) was not working due to a bug, which I have fixed now.

Can you please review the changes again?

Thanks,
Vignesh

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

Retested GUI mode, no issues starting with dispatch or kernel filter, and then adding/removing in actual gui mode once loaded in browser. Approving.

@vedithal-amd vedithal-amd merged commit 4a5cbbf into develop Jan 20, 2026
28 checks passed
@vedithal-amd vedithal-amd deleted the users/vedithal/rocprofiler-compute-fix-gui branch January 20, 2026 15:02
dayatsin-amd pushed a commit that referenced this pull request Apr 7, 2026
…nal-merge-new-729 (#459)

* SWDEV-549518 - Enable logging dynamically through HIP APIS. (#1079)

* SWDEV-549518 - Enable logging dynamically through HIP APIS.

* SWDEV-549518 - Adding ROCProfiler related new API changes.

* rocprofiler-sdk changes for hip api additions.

---------

Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com>
Co-authored-by: jainprad <92369414+jainprad@users.noreply.github.com>

* [rocprof-compute] Pin ruff version for consistent formatting (#2680)

* pin ruff versions each to current latest

* Update rocprofiler-compute-formatting.yml

* Downgrade .pre-commit-config.yaml to match develop

* Fix Python Formatting (#2679)

Updated version of black to 26.1.0 updated some formatting rules

Signed-off-by: David Galiffi <David.Galiffi@amd.com>

* Add automatic PyTorch library discovery for Python applications (#2623)

* Add automatic PyTorch library discovery for Python applications (#2623)

* Add notice for the newly deprecated env variables (#2690)

* [rocprofiler-compute] Use TheRock nightly builds in testing container (#2661)

* Use TheRock nightly builds in testing container

* Add HIP_DEVICE_LIB_PATH env var for hipcc to work

* Add HIP_PLATFORM env var for cmake hip package

* Add tarball placeholder

* Add -f to curl command to fail on HTTP error

* [rocprofiler-compute] Fix kernel/dispatch filtering (#2479)

* Fix kernel/dispatch fitlering in GUI

* Disallow --kernel and --dispatch filtering in analyze --gui mode since
  GUI frontend offers dropdown menu for kernel and dispatch filtering
    * Update CHANGELOG and documentation

* Gracefully handle N/A values

* Ensure workload path is valid before using it in GUI

* Ignore kernel filters if dispatch filters provided

* Add documentation for dispatch filtering overriding kernel filtering

* Fix typo

* Fix documentation

* remove unnecessary whitespace

* Address review comments

* Allow kernel/dispatch filtering with --gui

* Address review comments

* Address review comments

* Update CHANGELOG

* Fix formatting

* [rocprofiler-systems] Add build option for "examples" to specify gfx-arch (#2626)

## Motivation
 - Added `check_rocminfo` function that returns true if the provided regex was found, false otherwise. Can also use `GET_OUTPUT` to get the raw output filtered with or without a regex.
 - Moved `rocprofiler_systems_get_gfx_archs()` to `MacroUtilities.cmake` 
 - Added `rocprofiler_systems_lookup_gfx()`, which detects whether a given `gfx` is from the `instinct`, `radeon` or `apu` family.
 - Added `ROCPROFSYS_GFX_TARGETS` as a build argument. Used to specify the offloading architectures that GPU examples should compile for. If empty, defaults to whatever your system has.
 - GPU examples now check if the given `gfx` targets (from `ROCPROFSYS_GFX_TARGETS`) are supported.
 - OMPVV offload tests now only compile if `amdflang` version is `>= 20`
 - Improve link time by reducing the number of GFX targets that binaries need to support.
   - RCCL is now passed a `GPU_TARGETS` var specifying the architectures to build/link against.

* Reset HIP_VERSION_PATCH to 0 (#2590)

* [SWDEV-559965] Update Changelog for power cap type (#2647)

* [SWDEV-559965] Update Changelog for amd-smi set --power-cap

Updated Changelog to mention flexible argument
ordering for power cap type in amdsmi power cap set.
Corrected Changelog documentation on PPT1 reset
power_cap command.

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>

* [rocprofiler-system]: Enable UCX Communication API tracing (#2306)

## Motivation

Enable UCX communication tracing and communication metadata 

## Technical Details

Implement UCX API wrappers to trace transport-layer communication. This adds communication data tracking and exposes “UCX Comm Send/Recv” timelines, enabling detailed analysis of MPI, OpenSHMEM, and other UCX-based runtime communication patterns.

- Implements function interception for UCX functions across multiple categories using gotcha component.
- Extended comm_data component to track UCX send/recv operations - Added ucx_send and ucx_recv labels for Perfetto counter tracks. Integrated UCX data tracking with existing MPI/RCCL tracking infrastructure.
- Added ROCPROFSYS_USE_UCX configuration option (enabled by default).
- Created FindUCX.cmake module for UCX header detection. Falls back to internal UCX headers if system headers not found.
- Updated all Dockerfiles  to include UCX dependencies.

* hip-issue-3876 : Take into account thread-local capture mode in checks for valid capture (#2177)

* Revert "rocr: Switch back to legacy IPC (#1744)" (#2676)

This reverts commit 7e4b622.

* SWDEV-558849 - Add support for static linking with ROCR (#2659)

* [rocprofiler-systems] Fix MPI recv_data calculation (#2694)

Fix incorrect `mpi_recv` calculation. It was using `_send_size` instead of `_recv_size` for `mpi_recv`.

* [ROCmInfo] docs: mono-repo changes and style edits (#2584)

* initial edits

* mono repo related updates

* standardize component name

* style edits

* more edits

* Update CODEOWNERS (#2705): add /project/amdsmi owner

* Use size_t datatype for global dimensions. (#2604)

* rocrtst: set HSA_ENABLE_INTERRUPT after TestExample creation (#2687)

Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Co-authored-by: cfreeamd <166262151+cfreeamd@users.noreply.github.com>

* Rework clock based unit tests (#2646)

* Update hip_api_trace.cpp for HIP_RUNTIME_API_TABLE_STEP_VERSION 22

* Update hip_api_trace.hpp for HIP_RUNTIME_API_TABLE_STEP_VERSION 22

---------

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Co-authored-by: Karthik Jayaprakash <54370791+kjayapra-amd@users.noreply.github.com>
Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com>
Co-authored-by: jainprad <92369414+jainprad@users.noreply.github.com>
Co-authored-by: jamessiddeley-amd <James.Siddeley@amd.com>
Co-authored-by: David Galiffi <David.Galiffi@amd.com>
Co-authored-by: Milan Radosavljevic <milan.radosavljevic@amd.com>
Co-authored-by: marantic-amd <marantic@amd.com>
Co-authored-by: vedithal-amd <Vignesh.Edithal@amd.com>
Co-authored-by: Kian Cossettini <Kian.Cossettini@amd.com>
Co-authored-by: Rakesh Roy <137397847+rakesroy@users.noreply.github.com>
Co-authored-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Sajina PK <sputhala@amd.com>
Co-authored-by: Ioannis Assiouras <38722728+iassiour@users.noreply.github.com>
Co-authored-by: Alysa Liu <Alysa.Liu@amd.com>
Co-authored-by: German Andryeyev <56892148+gandryey@users.noreply.github.com>
Co-authored-by: yugang-amd <yugang.wang@amd.com>
Co-authored-by: JeniferC99 <150404595+JeniferC99@users.noreply.github.com>
Co-authored-by: hongkzha-amd <Hongkun.Zhang@amd.com>
Co-authored-by: cfreeamd <166262151+cfreeamd@users.noreply.github.com>
Co-authored-by: Jatin Chaudhary <51944368+cjatin@users.noreply.github.com>
Co-authored-by: kjayapra-amd <karthik.jayaprakash@amd.com>
Co-authored-by: hsivasun_amdeng <haresh.sivasuntharampillai@amd.com>
Co-authored-by: Kandula, Venkateshwar reddy <Venkateshwarreddy.Kandula@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants