Skip to content

Comments

rocp_sdk: Update errorcodes#531

Merged
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom
Treece-Burgess:01-08-2025-rocp-sdk-errorcode
Feb 2, 2026
Merged

rocp_sdk: Update errorcodes#531
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom
Treece-Burgess:01-08-2025-rocp-sdk-errorcode

Conversation

@Treece-Burgess
Copy link
Contributor

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

Pull Request Description

Background:
Currently in the master branch, the rocp_sdk component tests have "desired events" or events that we want to run the tests with as they will actually give non-zero values back to us. A helper function exists which attempts to add these events and if PAPI_ENOEVNT is returned then we continue to the next "desired event"; however, if an errorcode besides PAPI_ENOEVNT is returned then the test fails.

Issue #524 was created as in ROCm versions >= 7.0.1 the advanced.c test fails due to a subset of the "desired events" not existing anymore. The helper function should catch this and move onto the next desired event, but the actual errorcode being returned internally is PAPI_EINVAL. Thus resulting in the test failing.

After discussion with Daniel, we agreed that updating PAPI_EINVAL to PAPI_ENOEVNT where applicable was the proper step to remedy this issue.

Testing

Setup

System: Odyssey at Oregon
OS: RHEL 8.10
CPU: AMD MI300A
GPU: AMD MI300A
ROCm version: 7.1.1 and 7.2.0 (pre-release)

Results

  • PAPI build: ✅
  • advanced.c passes: ✅
  • simple.c, simple_sampling.c, and two_eventsets.c pass: ✅ (for 7.2.0 two_eventsets.c shows zero values for events which previously did not have zero values this is a separate issue and will be looked into)
  • Running ./papi_command_line rocp_sdk:::SQ_BUSY_CYCLES:DIMENSION_INSTANCE=0:DIMENSION_SHADER_ENGINE=4:device=0 returns PAPI_ENOEVNT: ✅
[tburgess@odyssey bin]$ ./papi_command_line rocp_sdk:::SQ_BUSY_CYCLES:DIMENSION_INSTANCE=0:DIMENSION_SHADER_ENGINE=4:device=0

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

Failed adding: rocp_sdk:::SQ_BUSY_CYCLES:DIMENSION_INSTANCE=0:DIMENSION_SHADER_ENGINE=4:device=0
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 status-ready-for-review PR is ready to be reviewed component-rocp_sdk PRs and Issues related to the rocp_sdk component type-maintenance Update code to keep it compatible, secure, modern. labels Jan 8, 2026
@Treece-Burgess Treece-Burgess requested a review from dbarry9 January 8, 2026 21:32
@Treece-Burgess Treece-Burgess linked an issue Jan 8, 2026 that may be closed by this pull request
Copy link
Contributor

@djwoun djwoun left a comment

Choose a reason for hiding this comment

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

Tested on MI300A (Odyssey) with ROCm 7.1.1 and 7.2.0 (pre-release) as well. advanced.c passes and the fix behaves as expected.

The PAPI_EINVAL → PAPI_ENOEVNT change for unsupported event variants makes sense, but I think we should keep PAPI_EINVAL for malformed qualifier syntax (e.g., missing =) to avoid masking user typos.

Copy link
Contributor

@djwoun djwoun left a comment

Choose a reason for hiding this comment

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

My concerns regarding typos are resolved given that:

  • A missing = could be treated as either PAPI_EINVAL or PAPI_ENOEVNT
  • PAPI_ENOEVNT aligns with the CUDA component's behavior.
  • The skip logic in the component tests is being removed in PR #530.

@Treece-Burgess Treece-Burgess force-pushed the 01-08-2025-rocp-sdk-errorcode branch from 562ef28 to cc90324 Compare February 2, 2026 22:58
@Treece-Burgess Treece-Burgess merged commit ddaf719 into icl-utk-edu:master Feb 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component-rocp_sdk PRs and Issues related to the rocp_sdk component status-ready-for-review PR is ready to be reviewed type-maintenance Update code to keep it compatible, secure, modern.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: rocp_sdk component test 'advanced' fails

2 participants