File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33
44
@@ -23,6 +23,9 @@ def test_compute_mode_supported_nonroot(all_devices):
2323 original_compute_mode = nvml .device_get_compute_mode (device )
2424
2525 for cm in COMPUTE_MODES :
26- with pytest . raises ( nvml . NoPermissionError ) :
26+ try :
2727 nvml .device_set_compute_mode (device , cm )
28+ except nvml .NoPermissionError :
29+ skip_reasons .add (f"nvmlDeviceSetComputeMode requires root for device { device } " )
30+ continue
2831 assert original_compute_mode == nvml .device_get_compute_mode (device ), "Compute mode shouldn't have changed"
You can’t perform that action at this time.
0 commit comments