Skip to content

feat(cpu): add CPUHierarchy_v2 binding with per-CPU serial#129

Merged
rvatkar merged 4 commits into
mainfrom
rvatkat/feat/cpu-hierarchy-v2-serial
Jun 22, 2026
Merged

feat(cpu): add CPUHierarchy_v2 binding with per-CPU serial#129
rvatkar merged 4 commits into
mainfrom
rvatkat/feat/cpu-hierarchy-v2-serial

Conversation

@rvatkar

@rvatkar rvatkar commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Adds Go bindings for dcgmGetCpuHierarchy_v2() so callers can access the Grace CPU serial returned by DCGM.

Changes

  • Add CPUHierarchy_v2 / CPUHierarchyCPU_v2 support.
  • Convert the v2 C hierarchy into Go structs, including Serial.
  • Keep the existing v1 CPU hierarchy API unchanged.
  • Add converter tests that exercise real C-struct conversion, including:
    • populated serial
    • empty hierarchy / NumCPUs == 0
    • CPU/core conversion coverage

Validation

  • go test ./pkg/dcgm

@rvatkar rvatkar requested review from glowkey and nccurry and removed request for glowkey June 11, 2026 22:31
Comment thread pkg/dcgm/cpu.go Outdated
Comment thread pkg/dcgm/cpu.go
Comment thread pkg/dcgm/cpu_test.go Outdated
@rvatkar rvatkar merged commit a0a96a0 into main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants