Go bindings for NVIDIA Data Center GPU Manager (DCGM).
Build and test · Development container · Samples · Contribute
This repository provides Go bindings for NVIDIA Data Center GPU Manager (DCGM). DCGM manages and monitors NVIDIA GPUs in cluster environments.
The repository also includes sample programs that show how to use the bindings.
RunDiag returns hierarchical DiagResults. Existing DiagResults.Software
and DiagResult users remain supported through a deprecated compatibility
view. New code should use results.Tests. Each test includes its status,
per-entity results, errors, information, and extra data. See the diagnostic
sample.
Use Task for common commands. Bazel builds the Go and CGO code.
These checks do not need a GPU:
task build
task test
task validateRun GPU and DCGM tests only on a suitable system:
task test:integration
task test:raceOpen the repository with a Dev Containers compatible editor to use the checked-in development environment. It includes DCGM headers, the pinned Go tools, and Bazel. CI builds and uses the same environment.
The normal build and validation commands do not need a GPU. GPU tests still need a compatible NVIDIA host.
The DCGM field constants in pkg/dcgm/const_fields.go are automatically generated from pkg/dcgm/dcgm_fields.h. Curated lowercase compatibility names are tracked in pkg/dcgm/legacy_fields.csv and included during generation.
To regenerate these constants after updating the header file:
task generateTo verify that the generated code is up to date:
task generate:checkSee CONTRIBUTING.md for the full field update process.
Read CONTRIBUTING.md before opening a pull request.
- Report a problem by opening an issue.
- Send a change by opening a pull request.