Skip to content

Fixed list blocks output#3232

Open
abchoudh-amd wants to merge 3 commits intodevelopfrom
list_blocks_bug
Open

Fixed list blocks output#3232
abchoudh-amd wants to merge 3 commits intodevelopfrom
list_blocks_bug

Conversation

@abchoudh-amd
Copy link
Contributor

@abchoudh-amd abchoudh-amd commented Feb 12, 2026

Motivation

--list-blocks throws error and doesn't display blocks.

Technical Details

Switch panel alias dict order

JIRA ID

AIPROFCOMP-188

Test Plan

  • Run ctests

Test Result

  • ctests passed

Submission Checklist

@abchoudh-amd abchoudh-amd marked this pull request as ready for review February 12, 2026 09:50
@abchoudh-amd abchoudh-amd requested a review from a team as a code owner February 12, 2026 09:50
Copilot AI review requested due to automatic review settings February 12, 2026 09:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes --list-blocks so it no longer errors and correctly prints block IDs with their aliases and names, aligning the alias lookup with how get_panel_alias() is structured.

Changes:

  • Invert the get_panel_alias() mapping to use panel_id -> alias when printing list-blocks output.
  • Apply the fix in both base CLI and analyze CLI implementations of list_blocks().
  • Add a regression test validating --list-blocks gfx90a output structure and a few known mappings.

Reviewed changes

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

File Description
projects/rocprofiler-compute/tests/test_utils.py Adds regression test coverage for --list-blocks output and a few expected block mappings.
projects/rocprofiler-compute/src/rocprof_compute_base.py Fixes list-blocks alias lookup by using an inverted alias map keyed by block ID.
projects/rocprofiler-compute/src/rocprof_compute_analyze/analysis_base.py Same alias-lookup fix for analyze mode list-blocks output.

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

Copy link
Contributor

@vedithal-amd vedithal-amd left a comment

Choose a reason for hiding this comment

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

LGTM with some design comments

parser.build_dfs(arch_configs=ac, filter_metrics=[], sys_info=sys_info)

print(f"{'INDEX':<8} {'BLOCK ALIAS':<16} {'BLOCK NAME'}")
panel_alias_dict = {value: key for key, value in get_panel_alias().items()}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove duplicate list_blocks in analyze mode (profile mode is missing this!)

Ideally we should remove all the general options handling out of this if block

, then we can remove duplicate list_blocks handling in analyze mode. General options should not care about the mode IMO.

Also I dont know why we mandate --list-metrics with --config-dir, that check should be removed as well.

I will let you decide, if you want to handle it here or in a different PR

@vedithal-amd
Copy link
Contributor

/AzurePipelines run rocm-ci-caller

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

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.

2 participants