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

Parse event qualifiers for the Rocm and Cuda components to make sure no excess characters are appended #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Treece-Burgess
Copy link
Contributor

@Treece-Burgess Treece-Burgess commented Jan 8, 2025

Pull Request Description

For both the Cuda component and the Rocm component, when adding events there is a an edge case where a user could successfully add events that had excess characters after the appended qualifier. Example of this is shown below with the Cuda component:

./papi_command_line cuda:::dram__bytes.avg:device=0test

This utility lets you add events from the command line interface to see if they work.

Successfully added: cuda:::dram__bytes.avg:device=0test

cuda:::dram__bytes.avg:device=0test : 	268 

This PR addresses adding conditional checks to test for excess characters and properly return PAPI_ENOEVNT if applicable. The new behavior is outlined below:

./papi_command_line cuda:::dram__bytes.avg:device=0test

This utility lets you add events from the command line interface to see if they work.

Failed adding: cuda:::dram__bytes.avg:device=0test
because: Event does not exist
No events specified!
Try running something like: ./papi_command_line PAPI_TOT_CYC

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

@Treece-Burgess Treece-Burgess added component-cuda PRs and Issues related to the cuda component component-rocm PRs and Issues related to the rocm component status-ready-for-review PR is ready to be reviewed type-bug Issues discussing bugs or PRs fixing bugs status-work-in-progress PR is still being worked on and removed status-ready-for-review PR is ready to be reviewed labels Jan 8, 2025
@Treece-Burgess Treece-Burgess self-assigned this Jan 8, 2025
@Treece-Burgess Treece-Burgess added status-ready-for-review PR is ready to be reviewed and removed status-work-in-progress PR is still being worked on labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-cuda PRs and Issues related to the cuda component component-rocm PRs and Issues related to the rocm component status-ready-for-review PR is ready to be reviewed type-bug Issues discussing bugs or PRs fixing bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants