Conversation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
fd8c8cd to
9a4e6bd
Compare
| func (handler NvLinkInfoHandler) V1() (NvLinkInfo_v1, Return) { | ||
| var info NvLinkInfo_v1 | ||
| info.Version = STRUCT_VERSION(info, 1) | ||
| ret := nvmlDeviceGetNvLinkInfo(handler.device, (*NvLinkInfo)(unsafe.Pointer(&info))) |
There was a problem hiding this comment.
@klueska the nvmlDeviceGetNvLinkInfo is already implemented as a versioned API, with the NvLinkInfo type aliasing two types (_v1 and _v2). This is also a NEW API which is why I elected to follow the "handler" approach here.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
pkg/nvml/lib.go
Outdated
| var nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v1 | ||
|
|
||
| // BlacklistDeviceInfo was replaced by ExcludedDeviceInfo | ||
| var GetBlacklistDeviceCount = GetExcludedDeviceCount |
There was a problem hiding this comment.
I am removing this from this PR to keep the diff cleaner.
pkg/nvml/lib.go
Outdated
| nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v2 | ||
| } | ||
|
|
||
| // The following defaults cannot be updated since the function signatures |
There was a problem hiding this comment.
I am removing this from this PR to keep the diff cleaner.
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the NVML bindings from version 12.9 to 13.0, adding new device management APIs and deprecating several older APIs. The update includes new addressing mode detection, repair status monitoring, power management features, and PRM register access capabilities.
- Updated NVML header to version 13.0.39 with official download source
- Added new device APIs for addressing mode, repair status, and power management
- Deprecated several legacy APIs with proper migration guidance
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| versions.mk | Updated Go version from 1.23.2 to 1.24.5 |
| pkg/nvml/nvml.h | Updated NVML header from 12.9.40 to 13.0.39 with new APIs and deprecations |
| pkg/nvml/zz_generated.api.go | Added new API bindings for device management functions |
| pkg/nvml/types_gen.go | Updated type definitions with new structures and corrected data types |
| pkg/nvml/nvml.go | Added new C function bindings |
| pkg/nvml/device.go | Implemented new device methods with deprecation warnings |
| pkg/nvml/vgpu.go | Added deprecation notice for VgpuInstanceGetLicenseStatus |
| pkg/nvml/mock/* | Updated mock interfaces with new methods |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
klueska
left a comment
There was a problem hiding this comment.
Thanks for the back and forth on this. Looking good now.
This change updates the mechanism to update
nvml.hto use an officially supported mechansim (closes #153) and uses this to update the bindings to v13.0.