Skip to content

cuda: Use strcmp over strncmp to properly get the default statistic for ratio metrics#599

Open
Treece-Burgess wants to merge 1 commit intoicl-utk-edu:masterfrom
Treece-Burgess:05-04-2026-cuda-ratio-metric-default-value
Open

cuda: Use strcmp over strncmp to properly get the default statistic for ratio metrics#599
Treece-Burgess wants to merge 1 commit intoicl-utk-edu:masterfrom
Treece-Burgess:05-04-2026-cuda-ratio-metric-default-value

Conversation

@Treece-Burgess
Copy link
Copy Markdown
Contributor

Pull Request Description

In the master branch, if a user provides a ratio metric i.e. cuda:::LTS.TriageCompute.lts__average_t_sector_aperture_device without a statistic then the default statistic that is added internally ends up being max instead of max_rate. This leads to the metric failing to be added to an EventSet:

[tburgess@hopper1 bin]$ ./papi_command_line cuda:::LTS.TriageCompute.lts__average_t_sector_aperture_device

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

Failed adding: cuda:::LTS.TriageCompute.lts__average_t_sector_aperture_device
because: Unknown error code
No events specified!
Try running something like: ./papi_command_line PAPI_TOT_CYC

This PR resolves this behavior.

Testing

Testing was done on Hopper1 at Oregon (1 * GH200) with Cuda Toolkit 12.8.1.

  • PAPI build: ✅
  • PAPI utilities*: ✅
  • Cuda component tests: ✅

* - papi_component_avail, papi_command_line, papi_native_avail

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 requested a review from dbarry9 May 5, 2026 00:58
@Treece-Burgess Treece-Burgess added type-bug Issues discussing bugs or PRs fixing bugs component-cuda PRs and Issues related to the cuda component status-ready-for-review PR is ready to be reviewed labels May 5, 2026
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 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.

1 participant