Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Jan 13, 2026

Resolves this error (error seen and fix validated on Ubuntu 24.04, linux-64):

=================================== FAILURES =================================== ________________________ test_persistence_mode_enabled _________________________

    @pytest.mark.skipif(helpers.IS_WSL or helpers.IS_WINDOWS, reason="Persistence mode not supported on WSL or Windows")
    def test_persistence_mode_enabled():
        for device in system.Device.get_all_devices():
            is_enabled = device.persistence_mode_enabled
            assert isinstance(is_enabled, bool)
            try:
>               device.persistence_mode_enabled = False
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

device     = <cuda.core.system._device.Device object at 0x7e6ca2dcb990>
is_enabled = False

tests/system/test_system_device.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cuda/core/system/_device.pyx:589: in cuda.core.system._device.Device.persistence_mode_enabled.__set__
    nvml.device_set_persistence_mode(
cuda/bindings/_nvml.pyx:23818: in cuda.bindings._nvml.device_set_persistence_mode
    ???
cuda/bindings/_nvml.pyx:23829: in cuda.bindings._nvml.device_set_persistence_mode
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   cuda.bindings._nvml.NoPermissionError: Insufficient Permissions

cuda/bindings/_nvml.pyx:1811: NoPermissionError

During handling of the above exception, another exception occurred:

    @pytest.mark.skipif(helpers.IS_WSL or helpers.IS_WINDOWS, reason="Persistence mode not supported on WSL or Windows")
    def test_persistence_mode_enabled():
        for device in system.Device.get_all_devices():
            is_enabled = device.persistence_mode_enabled
            assert isinstance(is_enabled, bool)
            try:
                device.persistence_mode_enabled = False
                assert device.persistence_mode_enabled is False
            finally:
>               device.persistence_mode_enabled = is_enabled
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

device     = <cuda.core.system._device.Device object at 0x7e6ca2dcb990>
is_enabled = False

tests/system/test_system_device.py:258:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cuda/core/system/_device.pyx:589: in cuda.core.system._device.Device.persistence_mode_enabled.__set__
    nvml.device_set_persistence_mode(
cuda/bindings/_nvml.pyx:23818: in cuda.bindings._nvml.device_set_persistence_mode
    ???
cuda/bindings/_nvml.pyx:23829: in cuda.bindings._nvml.device_set_persistence_mode
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   cuda.bindings._nvml.NoPermissionError: Insufficient Permissions

cuda/bindings/_nvml.pyx:1811: NoPermissionError

…nabled: xfail nvml.NoPermissionError

=================================== FAILURES ===================================
________________________ test_persistence_mode_enabled _________________________

    @pytest.mark.skipif(helpers.IS_WSL or helpers.IS_WINDOWS, reason="Persistence mode not supported on WSL or Windows")
    def test_persistence_mode_enabled():
        for device in system.Device.get_all_devices():
            is_enabled = device.persistence_mode_enabled
            assert isinstance(is_enabled, bool)
            try:
>               device.persistence_mode_enabled = False
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

device     = <cuda.core.system._device.Device object at 0x7e6ca2dcb990>
is_enabled = False

tests/system/test_system_device.py:255:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cuda/core/system/_device.pyx:589: in cuda.core.system._device.Device.persistence_mode_enabled.__set__
    nvml.device_set_persistence_mode(
cuda/bindings/_nvml.pyx:23818: in cuda.bindings._nvml.device_set_persistence_mode
    ???
cuda/bindings/_nvml.pyx:23829: in cuda.bindings._nvml.device_set_persistence_mode
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   cuda.bindings._nvml.NoPermissionError: Insufficient Permissions

cuda/bindings/_nvml.pyx:1811: NoPermissionError

During handling of the above exception, another exception occurred:

    @pytest.mark.skipif(helpers.IS_WSL or helpers.IS_WINDOWS, reason="Persistence mode not supported on WSL or Windows")
    def test_persistence_mode_enabled():
        for device in system.Device.get_all_devices():
            is_enabled = device.persistence_mode_enabled
            assert isinstance(is_enabled, bool)
            try:
                device.persistence_mode_enabled = False
                assert device.persistence_mode_enabled is False
            finally:
>               device.persistence_mode_enabled = is_enabled
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

device     = <cuda.core.system._device.Device object at 0x7e6ca2dcb990>
is_enabled = False

tests/system/test_system_device.py:258:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cuda/core/system/_device.pyx:589: in cuda.core.system._device.Device.persistence_mode_enabled.__set__
    nvml.device_set_persistence_mode(
cuda/bindings/_nvml.pyx:23818: in cuda.bindings._nvml.device_set_persistence_mode
    ???
cuda/bindings/_nvml.pyx:23829: in cuda.bindings._nvml.device_set_persistence_mode
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   cuda.bindings._nvml.NoPermissionError: Insufficient Permissions

cuda/bindings/_nvml.pyx:1811: NoPermissionError
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 13, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk
Copy link
Collaborator Author

rwgk commented Jan 13, 2026

/ok to test

@rwgk rwgk requested a review from mdboom January 13, 2026 21:10
@rwgk rwgk self-assigned this Jan 13, 2026
@rwgk rwgk added cuda.core Everything related to the cuda.core module test Improvements or additions to tests labels Jan 13, 2026
@github-actions

This comment has been minimized.

@rwgk rwgk merged commit be700fc into NVIDIA:main Jan 14, 2026
84 checks passed
@rwgk rwgk deleted the test_persistence_mode_enabled_xfail_NoPermissionError branch January 14, 2026 00:06
@github-actions
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

@leofang leofang added this to the cuda.core beta 12 milestone Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants