Skip to content

[BUG]: cuda.core.system.Device unavailable with cuda-bindings 13.1.1 — requires unreleased 13.1.2 #1715

Closed

Description

@Pedrexus

Hello all, thanks for the nice library!

After installing cuda-core==0.6.0 + cuda-bindings==13.1.1 (latest on PyPI, conda-forge, and the NVIDIA conda channel), CUDA_BINDINGS_NVML_IS_COMPATIBLE is always False and Device is never exported from cuda.core.system.

Tracing through the source: _system.pyx in the 0.6.0 tag checks _BINDINGS_VERSION >= (13, 1, 2), but cuda-bindings 13.1.2 was never published — PR #1404 bumped the source version to unblock cuda-core development, and issue #1521 (the actual release) was closed as not_planned. So every user of cuda-core==0.6.0 gets Device silently unavailable.

Additionally, five symbols are missing from _nvml 13.1.1 that _device.pyx / _fan.pxi / _event.pxi / _system_events.pyx alias at import time: DeviceArch, FieldId, ClocksEventReasons, EventType, FanControlPolicy, SystemEventType.

I was able to find a work around by creating a cuda/bindings/nvml.py re-exporting _nvml with the six missing stubs and patching_version.py to report 13.1.2:

# cuda/bindings/_version.py
__version__ = "13.1.2"
__version_tuple__ = (13, 1, 2)

# cuda/bindings/nvml.py
import enum
from cuda.bindings._nvml import *

class DeviceArch(enum.IntEnum):
    DEVICE_ARCH_AMPERE = 7; DEVICE_ARCH_ADA = 8; DEVICE_ARCH_HOPPER = 9; ...

class FieldId(enum.IntEnum): pass
class ClocksEventReasons(enum.IntFlag): GpuIdle = 0x01; ...
class EventType(enum.IntFlag): SingleBitEccError = 0x1; ...
class SystemEventType(enum.IntFlag): GpuDriverUnbind = 0x1; ...
class FanControlPolicy(enum.IntEnum): TEMPERATURE_CONTINOUS_SW = 0; MANUAL = 1

After that, Device(index=0).name, .memory_info, .temperature.sensor() etc. all work correctly against 13.1.1.

Suggested fix: either publish cuda-bindings 13.1.2, or lower the version check to match what's actually available in 13.1.1.

Activity

  1. mdboom commented on Mar 4, 2026

    @mdboom
    Contributor

    Unfortunately, this is working as designed, and is an unfortunate fallout from our staggered release process. While it's nice to know that patching works, there is no guarantee that it's working correctly -- there are other fixes on cuda_bindings main that are required to make cuda.core.system pass its tests.

    I suggest just waiting for the next cuda_bindings release (which will probably be 13.2 at this point).

  2. Pedrexus commented on Mar 5, 2026

    @Pedrexus
    Author

    got it. I will wait for the next release then and use the patch for now. Thanks for the response.

  3. leofang commented on Mar 5, 2026

    @leofang
    Member

    @Pedrexus For our curiosity, how did you notice that we're preparing for a pynvml replacement?

  4. Pedrexus commented on Mar 5, 2026

    @Pedrexus
    Author

    @leofang I was building a GPU monitoring tool and looking for a higher-level API to replace pynvml (nvidia-ml-py) calls.

    While browsing the cuda.core docs, I found cuda.core.system.Device (and the 0.6.0 release notes confirmed it as a new NVML-based device query API), which could access sensor data.

    However, the system Device wasn't importable at runtime despite the docs, so I used Claude to investigate, and that is how I found _system.pyx, the linked PR and issue, and eventually cuda.bindings.nvml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds the team's attention

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions