Skip to content

test: remove tests for hardware no supported driver runs on; deprecate is_auto_boosted_clocks_enabled - #3655

Closed
mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3577
Closed

mdboom wants to merge 1 commit into
NVIDIA:mainfrom
mdboom:issue3577

Conversation

@mdboom

@mdboom mdboom commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Closes #3577. Part of #2077.

Summary

Two tests exercised NVML features that exist only on hardware no supported driver runs on, so they skipped in every configuration. They are removed rather than kept as permanent skips, and the cuda.core API behind one of them is deprecated:

 cuda_bindings_13/tests/nvml/
-    test_unit.py                       # unit_handles fixture + test_unit_get_devices_returns_array
 cuda_core/tests/system/test_system_device.py
-    test_auto_boosted_clocks_enabled
 cuda_core/cuda/core/system/_device.pyx
     Device.is_auto_boosted_clocks_enabled
+        .. version-deprecated:: 1.4.0
+        warnings.warn(..., DeprecationWarning)
 cuda_core/docs/source/release/1.4.0-notes.rst
+    Deprecated APIs: system.Device.is_auto_boosted_clocks_enabled
Test NVML API Why it can never run
test_unit_get_devices_returns_array nvmlUnitGetDevices NVML units are Tesla S-class chassis (2008-2011)
test_auto_boosted_clocks_enabled nvmlDeviceGetAutoBoostedClocksEnabled Only Kepler reports it; Kepler needs an R470 or older driver, which neither cuda-bindings 12.x nor 13.x supports
  • Decision on is_auto_boosted_clocks_enabled: deprecated, following the system.NvlinkInfo.max_links precedent (1.1.0). It raises NotSupportedError on every current GPU; the deprecation message points to set_application_clocks / reset_application_clocks, which control Auto Boost on Pascal and newer.
  • The generated cuda.bindings.nvml unit bindings are unchanged; they mirror nvml.h.
  • Other bindings root: cuda_bindings_12/tests/nvml/ has no unit test and nothing else uses the unit_handles fixture, so no matching change is needed there.

Evidence

CI coverage: on main, test_unit_get_devices_returns_array skips in all 30 CUDA 13 configurations ("No NVML units present on this system"), and test_auto_boosted_clocks_enabled skips in all 65 cuda.core configurations (not supported on L4, RTX 4090, H100, GH200, GB300, ...). After this change neither test exists.

Locally (cuda.core built from this branch): cuda_core/tests/system/ passes (87 passed, 29 skipped, 5 xfailed), cuda_bindings_13/tests/nvml passes (58 passed, 40 skipped), and with -W error the property raises the DeprecationWarning.

Confirming in CI: no job in this PR's CI run should report either test. For example:

gh run view <CI run id> --repo NVIDIA/cuda-python --log | grep -cE "test_unit_get_devices_returns_array|test_auto_boosted_clocks_enabled"   # expect 0

Merge Danger

Door: two-way. The deprecation only adds a warning; the property behaves as before.

Blast Radius: callers of system.Device.is_auto_boosted_clocks_enabled now see a DeprecationWarning (and, as before, NotSupportedError on current GPUs).

Reviewers: please feel free to push commits directly to this PR to improve it.

🤖 Generated with Claude Code

…e is_auto_boosted_clocks_enabled

test_unit_get_devices_returns_array (cuda_bindings_13) needs NVML units,
which exist only on Tesla S-class chassis, and test_auto_boosted_clocks_enabled
(cuda_core) needs a GPU that reports auto boosted clocks, which only Kepler
does. No driver that cuda-bindings 12.x or 13.x supports runs on either, so
both tests skipped in every configuration. Delete them, along with the
unit_handles fixture. The generated NVML bindings are unchanged.

Deprecate cuda.core.system.Device.is_auto_boosted_clocks_enabled, which
raises NotSupportedError on every current GPU, following the
NvlinkInfo.max_links precedent.

Closes NVIDIA#3577.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdboom mdboom added this to the cuda.core 1.4.0 milestone Nov 30, 2026
@mdboom mdboom added test Improvements or additions to tests cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Nov 30, 2026
@mdboom mdboom self-assigned this Nov 30, 2026
@mdboom mdboom added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Nov 30, 2026
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Summary by CodeRabbit

  • Deprecations
    • Accessing the automatic boost-clock status property now emits a deprecation warning. It may raise NotSupportedError on current GPUs; use the application-clock controls instead.
  • Documentation
    • Updated the 1.4.0 release notes with the deprecation details and alternatives.

The PR removes two tests for NVML features unavailable on supported hardware. It marks Device.is_auto_boosted_clocks_enabled as deprecated, emits a warning when accessed, and documents application-clock alternatives.

Changes: Unsupported NVML features

Layer / File(s) Summary
Deprecate the auto-boost API
cuda_core/cuda/core/system/_device.pyi, cuda_core/cuda/core/system/_device.pyx, cuda_core/docs/source/release/1.4.0-notes.rst
The property is marked deprecated in its documentation and emits a DeprecationWarning when accessed. The release notes identify application-clock methods as alternatives.
Remove tests for unsupported hardware features
cuda_bindings_13/tests/nvml/test_unit.py, cuda_core/tests/system/test_system_device.py
The NVML unit-device test and the auto-boost clock test are removed.

Assessment against linked issues

Objective Addressed Explanation
[#3577] Remove the two tests for unsupported hardware features and record a decision on is_auto_boosted_clocks_enabled. ✅

Suggested reviewers: jpascucci-nv, juenglin

Change: Other

Merge Risk: Low · up to 747d8

The new deprecation warning for the auto-boost query recommends application-clock methods that do not exist on the device class. Fix the guidance in the warning, docstrings and release notes before merging. Nothing else in the change alters behavior.

Security architecture risk: Minimal · up to 747d8

The property remains available and uses the same read-only device query. Callers that treat deprecation warnings as errors can now fail before the query runs, but the change does not grant device access or modify clock settings.

Security review details

Trust Boundaries and Controls

  • inferred — The getter adds no caller-supplied arguments and still passes the existing Device handle to the same NVML read. The fixed warning does not select a different device, change the caller's authority, or invoke the clock-setting methods it names.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d7af1aa and 747d8f2.

Files selected for processing: 5

  • cuda_bindings_13/tests/nvml/test_unit.py
  • cuda_core/cuda/core/system/_device.pyi
  • cuda_core/cuda/core/system/_device.pyx
  • cuda_core/docs/source/release/1.4.0-notes.rst
  • cuda_core/tests/system/test_system_device.py
Files with no reviewable changes: 2

  • cuda_bindings_13/tests/nvml/test_unit.py
  • cuda_core/tests/system/test_system_device.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 5 remain after this review.

Comment on lines +69 to +71
current GPU. Use :meth:`system.Device.set_application_clocks` and
:meth:`system.Device.reset_application_clocks` to control Auto Boost
behavior.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

important: Remove references to nonexistent application-clock methods

system.Device does not define set_application_clocks or reset_application_clocks. Following this guidance raises AttributeError. The same names appear in the deprecation warning, which users see at runtime, and in the property docstrings.

Update each site so it names only an existing API, or states that no replacement is available:

  • cuda_core/docs/source/release/1.4.0-notes.rst:69-71
  • cuda_core/cuda/core/system/_device.pyx:609-610, 621-622, 626
  • cuda_core/cuda/core/system/_device.pyi:1384-1385, 1396-1397

As per coding guidelines, "Keep user-facing behaviors coherent with docs and samples."

@github-actions

Copy link
Copy Markdown
Contributor

@jpascucci-nv jpascucci-nv 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.

I don't know what a fix to this looks like so I'm not going to post a PR: Sol 6.1 High raises two issues.
[P2] The migration guidance names nonexistent methods. The new warning recommends set_application_clocks and reset_application_clocks, but neither exists on system.Device. Following it raises AttributeError. Update the warning, docstrings, and release notes to identify an available API or state that there is no replacement.

[P2] The Kepler-only rationale overlooks Maxwell. The release note claims only Kepler implements Auto Boost. NVIDIA also documents it on Maxwell, which remains supported by CUDA 12 and R580. CI skips do not establish universal lack of support. Correct this claim and verify Maxwell before using it to justify deprecation.

@mdboom

mdboom commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

I think given @jpascucci-nv's agent's findings, we should just close this as WONTFIX.

@mdboom mdboom closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: remove tests for hardware no supported driver runs on (S-class units, Kepler auto-boost)

2 participants