Skip to content

framework: For cuda native events - extend the string length in PAPI_event_code_to_name to be PAPI_2MAX_STR_LEN#596

Open
Treece-Burgess wants to merge 1 commit into
icl-utk-edu:masterfrom
Treece-Burgess:04-24-2026-increase-str-len-for-ntv-evts
Open

framework: For cuda native events - extend the string length in PAPI_event_code_to_name to be PAPI_2MAX_STR_LEN#596
Treece-Burgess wants to merge 1 commit into
icl-utk-edu:masterfrom
Treece-Burgess:04-24-2026-increase-str-len-for-ntv-evts

Conversation

@Treece-Burgess

@Treece-Burgess Treece-Burgess commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Pull Request Description

The Perfworks Metrics API can have metrics that are greater than PAPI_MAX_STR_LEN. For example:

cuda:::TPC.TriageCompute.tpc__l1tex_sram_bytes_mem_untagged_data_shared_allocated_compute_realtime.peak_sustained_active.per_second - 131 characters
cuda:::TPC.TriageCompute.tpc__l1tex_sram_bytes_mem_untagged_data_shared_allocated_compute_realtime.peak_sustained_elapsed.per_second - 132 characters

This leads to PAPI_event_code_to_name returning PAPI_ENOMEM. This behavior can be seen on Hopper1 at Oregon (1 * GH200) with the test test_multipass_event_fail.cu.

This PR resolves this behavior by using PAPI_2MAX_STR_LEN if the eventcode provided by the user is found to be associated with the cuda component.

Testing

Testing was done on Hopper1 at Oregon (CPU: ARM Neoverse-V2 , GPU: 1 * GH200) with Cuda Toolkit 12.8.1.

  • PAPI build: ✅
  • PAPI utilities*: ✅
  • net component tests: ✅
  • coretemp component tests: ✅
  • cuda component tests: ✅

* - papi_command_line, papi_component_avail, papi_native_avail

I have also verified that the ctests and ftests that call PAPI_event_code_to_name do not use cuda component native events, rather they use the perf_eventcomponent native events.

Note: This is a temporary fix for this issue and a longer term fix will be applied at a later date.

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 April 27, 2026 17:25
@Treece-Burgess Treece-Burgess added type-bug Issues discussing bugs or PRs fixing bugs status-ready-for-review PR is ready to be reviewed labels Apr 27, 2026
@dbarry9 dbarry9 force-pushed the 04-24-2026-increase-str-len-for-ntv-evts branch from fa560b0 to 582fd04 Compare June 18, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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