Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions cuda_bindings_13/tests/nvml/test_unit.py

This file was deleted.

4 changes: 4 additions & 0 deletions cuda_core/cuda/core/system/_device.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,10 @@ class Device:
bool
The default Auto Boosted clocks behavior

.. version-deprecated:: 1.4.0
This property is deprecated and will be removed in a future release.
Use :meth:`set_application_clocks` and
:meth:`reset_application_clocks` to control Auto Boost behavior.
"""
@property
def current_clock_event_reasons(self) -> list[ClocksEventReasons]:
Expand Down
13 changes: 12 additions & 1 deletion cuda_core/cuda/core/system/_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,18 @@ cdef class Device:
bool
The default Auto Boosted clocks behavior

"""
.. version-deprecated:: 1.4.0
This property is deprecated and will be removed in a future release.
Use :meth:`set_application_clocks` and
:meth:`reset_application_clocks` to control Auto Boost behavior.
"""
warnings.warn(
"The `is_auto_boosted_clocks_enabled` property is deprecated and will be removed in a future "
"release. Use `set_application_clocks` and `reset_application_clocks` to control Auto Boost "
"behavior.",
DeprecationWarning,
stacklevel=2,
)
current, default = nvml.device_get_auto_boosted_clocks_enabled(self._handle)
return current == nvml.EnableState.FEATURE_ENABLED, default == nvml.EnableState.FEATURE_ENABLED

Expand Down
10 changes: 10 additions & 0 deletions cuda_core/docs/source/release/1.4.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,13 @@ Fixes and enhancements
later driver; with a CUDA 12 build or an older driver, imports behave as
before.
(`#3502 <https://github.com/NVIDIA/cuda-python/issues/3502>`__)

Deprecated APIs
---------------

- Deprecated :attr:`system.Device.is_auto_boosted_clocks_enabled`. Only
Kepler GPUs report auto boosted clocks, and no supported driver runs on
them, so the property raises :class:`system.NotSupportedError` on every
current GPU. Use :meth:`system.Device.set_application_clocks` and
:meth:`system.Device.reset_application_clocks` to control Auto Boost
behavior.
Comment on lines +69 to +71

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."

12 changes: 0 additions & 12 deletions cuda_core/tests/system/test_system_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,18 +636,6 @@ def test_get_inforom_version(subtests):
inforom.validate()


# This test is not currently run in any CI job
def test_auto_boosted_clocks_enabled(subtests):
for device in system.Device.get_all_devices():
with subtests.test(device_index=device.index):
# This API is supported on KEPLER and newer, but it also seems
# unsupported elsewhere.
with unsupported_before(device, None):
current, default = device.is_auto_boosted_clocks_enabled
assert isinstance(current, bool)
assert isinstance(default, bool)


def test_clock(subtests):
for device in system.Device.get_all_devices():
for clock_type in typing.ClockType:
Expand Down
Loading