Skip to content

BUG: Make nvmlGetFieldValues robust to empty field list#1982

Merged
mdboom merged 2 commits intoNVIDIA:mainfrom
mdboom:get-field-values-empty
Apr 28, 2026
Merged

BUG: Make nvmlGetFieldValues robust to empty field list#1982
mdboom merged 2 commits intoNVIDIA:mainfrom
mdboom:get-field-values-empty

Conversation

@mdboom
Copy link
Copy Markdown
Contributor

@mdboom mdboom commented Apr 27, 2026

nvmlDeviceGetFieldValues and nvmlDeviceClearFieldValues raise an INVALID_ARGUMENT error when given an empty set of field values. This is really confusing from a user perspective: We should just return an empty result in that case.

This is inline with what pynvml.py does, so makes it easier to migrate.

@mdboom mdboom added this to the cuda.core v1.0.0 milestone Apr 27, 2026
@mdboom mdboom self-assigned this Apr 27, 2026
@mdboom mdboom added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module labels Apr 27, 2026
@github-actions

This comment has been minimized.

@mdboom mdboom merged commit 76a8cee into NVIDIA:main Apr 28, 2026
93 of 94 checks passed
@github-actions
Copy link
Copy Markdown

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants