周玉环 d906a41c2e first commit 2 日 前
..
.travis.gofmt.sh d906a41c2e first commit 2 日 前
.travis.yml d906a41c2e first commit 2 日 前
LICENSE d906a41c2e first commit 2 日 前
Makefile d906a41c2e first commit 2 日 前
NVML_NOTICE d906a41c2e first commit 2 日 前
README.md d906a41c2e first commit 2 日 前
bindings.go d906a41c2e first commit 2 日 前
bindings_nocgo.go d906a41c2e first commit 2 日 前
nvml.h d906a41c2e first commit 2 日 前

README.md

Go Bindings for NVML

NVML or NVIDIA Management Library is a C-based API that can be used for monitoring NVIDIA GPU devices. It's closed source but can be downloaded as part of the GPU Deployment Kit.

The NVML API Reference describe various methods that are available as part of NVML.

The nvml.h file is included in this repository so that we don't depend on the presence of NVML in the build environment.

The bindings.go file is the cgo bridge which calls the NVML functions. The cgo preamble in bindings.go uses dlopen to dynamically load NVML and makes its functions available.