Skip to content

Conversation

@mdboom
Copy link
Contributor

@mdboom mdboom commented Jan 9, 2026

This adds support for the APIs around "field values" which are pieces of numeric singleton metadata about devices. Given the capabilities of NVML, they can be retrieved or cleared, but not set.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 9, 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.

@mdboom mdboom requested a review from Copilot January 9, 2026 14:13
@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for field values APIs to cuda.core.system, enabling retrieval and clearing of numeric singleton metadata about CUDA devices through NVML. The implementation follows NVML's capabilities, which support getting and clearing field values but not setting them.

Key changes:

  • New FieldValue and FieldValues classes for managing field value data and collections
  • Device.get_field_values() and Device.clear_field_values() methods for interacting with field values
  • Improved naming in bindings layer: renamed FI enum to FieldId for better clarity
  • Enhanced input validation in _cast_field_values() for field ID tuples

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
cuda_core/cuda/core/system/_device.pyx Adds FieldValue, FieldValues classes and Device methods for getting/clearing field values
cuda_core/tests/system/test_system_device.py Adds comprehensive test coverage for get_field_values functionality
cuda_core/docs/source/api.rst Adds API documentation entries for new FieldId, FieldValue, and FieldValues classes
cuda_bindings/cuda/bindings/_nvml.pyx Renames FI to FieldId and adds validation for field value tuples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

This comment has been minimized.

mdboom and others added 4 commits January 9, 2026 09:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom mdboom self-assigned this Jan 9, 2026
@mdboom mdboom added the cuda.core Everything related to the cuda.core module label Jan 9, 2026
@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom
Copy link
Contributor Author

mdboom commented Jan 9, 2026

/ok to test

@mdboom mdboom requested a review from rparolin January 9, 2026 18:59
@mdboom mdboom merged commit 43f2037 into NVIDIA:main Jan 12, 2026
80 checks passed
@github-actions
Copy link

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.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants