Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for ROCm component qualifiers #139

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

gcongiu
Copy link
Contributor

@gcongiu gcongiu commented Dec 14, 2023

Pull Request Description

The ROCm component ntv_code_to_info function does not behave consistently with other components (e.g., perf_event). This PR fixes the function behavior to align it to the CPU component.

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@gcongiu
Copy link
Contributor Author

gcongiu commented Dec 14, 2023

@bertwesarg I integrated your comments into a new PR. Would you please take a look at it?

sprintf(info->symbol, "%s:device=%i:instance=%i", ntv_table_p->events[inf.nameid].name, inf.device, inf.instance);
sprintf(info->long_descr, "%s", ntv_table_p->events[inf.nameid].descr);
sprintf(info->long_descr, "%s, masks:Mandatory device qualifier [%s]:Mandatory instance qualifier in range [0-%i]",
Copy link
Contributor

Choose a reason for hiding this comment

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

I was now able to digest how perf_event is creating the mask description, and indeed it looks like it is using : (colon) to separate multiple qualifiers. So we have two which are using a , (comma) and one which is using a : (colon). And you opted for : (colon) too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I looked at the perf_event output and found a : qualifier separator. I guess this is an inconsistency that ought to be fixed sooner or later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the components you mentioned that use a , separator are no longer in use and should eventually be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, old code makes the life harder for a programmer-archaeologist

@gcongiu gcongiu requested a review from adanalis December 14, 2023 15:25
@gcongiu gcongiu added this to the PAPI 7.1.0 release milestone Dec 14, 2023
@gcongiu gcongiu force-pushed the 2023.12.14_rocm-qualifier-fixes branch from 3162d26 to d1eacae Compare December 18, 2023 11:52
@gcongiu gcongiu force-pushed the 2023.12.14_rocm-qualifier-fixes branch from d1eacae to 06a9185 Compare December 18, 2023 15:30
@gcongiu gcongiu merged commit 29ed6f2 into icl-utk-edu:master Dec 18, 2023
22 of 26 checks passed
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