Skip to content

test: skip system NVML tests when the symbol is absent in older bindings - #2390

Closed
rluo8 wants to merge 14 commits into
NVIDIA:mainfrom
rluo8:fix/skip-missing-nvml-symbol
Closed

test: skip system NVML tests when the symbol is absent in older bindings#2390
rluo8 wants to merge 14 commits into
NVIDIA:mainfrom
rluo8:fix/skip-missing-nvml-symbol

Conversation

@rluo8

Copy link
Copy Markdown
Contributor

Description

This is to fix bug 6179497, and it's a test only issue.
Tests failed when using cuda.core v1.1.0 and cuda bindings 12.9.7.

FAILED system/test_system_device.py::test_addressing_mode
FunctionNotFoundError: function nvmlDeviceGetAddressingMode is not found
FAILED system/test_system_device.py::test_repair_status
FunctionNotFoundError: function nvmlDeviceGetRepairStatus is not found

This issue was originally fixed in pr #1898, but the fix in cuda.bindings wasn't inculded in cuda 12.9.x.
This fix back-stops the skip on the cuda.core test side (independent of the cuda.bindings version): a missing NVML symbol is skipped rather than failed.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actionsgithub-actionsBot added the cuda.core Everything related to the cuda.core module label Jul 20, 2026
@rluo8rluo8 self-assigned this Jul 20, 2026
@github-actions

Copy link
Copy Markdown

@rluo8
rluo8 requested review from mdboom and rwgkJuly 20, 2026 07:05
@rluo8
rluo8force-pushed the fix/skip-missing-nvml-symbol branch from 6955804 to 7f9f7eeCompareJuly 20, 2026 07:19

@mdboommdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unsupported_before is meant to indicate that a feature isn't available on a specific hardware architecture. It's not meant to indicate that a function isn't available on a specific CTK version.

We should skip each of the failing tests individually, based on the CTK version.

For example:

@pytest.mark.skipif(get_user_mode_driver_version() < (13, 0))

@leofang

Copy link
Copy Markdown
Member

I think we should check the KMD version not UMD version?

@leofangleofang added bug Something isn't working P1 Medium priority - Should do test Improvements or additions to tests labels Jul 20, 2026
@rluo8
rluo8force-pushed the fix/skip-missing-nvml-symbol branch from 7f9f7ee to 7433f3aCompareJuly 21, 2026 02:36
@rluo8

Copy link
Copy Markdown
ContributorAuthor

Thanks @mdboom , @leofang. I updated the patch to skip the two cases when kernel mode driver < R580. Verified on a forward compatibility system (UMD 13.0 + KMD 575), the tests would still fail with FunctionNotFoundError if using UMD check. After switching to use KMD version check, the two tests could be skipped correctly.

@rluo8
rluo8 requested a review from mdboomJuly 21, 2026 02:44

@mdboommdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @rluo8. LGTM.

@mdboom
mdboom enabled auto-merge (squash) July 21, 2026 18:03
@mdboommdboom added this to the cuda.bindings next milestone Jul 29, 2026
auto-merge was automatically disabled July 30, 2026 00:59

Pull Request is not mergeable

@rluo8

rluo8 commented Aug 3, 2026

Copy link
Copy Markdown
ContributorAuthor

Hi @mdboom , the CI check have all passed now. It seems that there's something wrong with Github and it disabled the auto-merge. Could you please help merge this PR?
Thanks!

@rluo8

rluo8 commented Aug 5, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing as no longer needed.
PR #1898 already made unsupported_before skip on a missing NVML symbol, but the helper shipped inside the cuda.bindings wheel and not included in version 12.9.7.
After #2384 moved arch_check.py into the standalone cuda_python_test_helpers package, which travels with the test suite rather than with the installed cuda.bindings. Both test_addressing_mode and test_repair_status now skip on their own.

@rluo8rluo8 closed this Aug 5, 2026
github-actionsBot pushed a commit that referenced this pull request Aug 6, 2026
Removed preview folders for the following PRs:
- PR #1977
- PR #2012
- PR #2390
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingcuda.coreEverything related to the cuda.core moduleP1Medium priority - Should dotestImprovements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rluo8@leofang@mdboom