cuda-python icon indicating copy to clipboard operation
cuda-python copied to clipboard

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

Open rluo8 opened this issue 4 months ago • 3 comments

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

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

rluo8 avatar Jul 20 '26 06:07 rluo8

Doc Preview CI

:rocket: View preview at
https://nvidia.github.io/cuda-python/pr-preview/pr-2390/

https://nvidia.github.io/cuda-python/pr-preview/pr-2390/cuda-core/

https://nvidia.github.io/cuda-python/pr-preview/pr-2390/cuda-bindings/

https://nvidia.github.io/cuda-python/pr-preview/pr-2390/cuda-pathfinder/


Preview will be ready when the GitHub Pages deployment is complete.

github-actions[bot] avatar Jul 20 '26 07:07 github-actions[bot]

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

leofang avatar Jul 20 '26 17:07 leofang

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 avatar Jul 21 '26 02:07 rluo8

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 avatar Aug 03 '26 01:08 rluo8

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.

rluo8 avatar Aug 05 '26 01:08 rluo8