{"id":16555047,"url":"https://github.com/mxpv/nvml-go","last_synced_at":"2025-10-05T06:40:00.494Z","repository":{"id":57499912,"uuid":"117901679","full_name":"mxpv/nvml-go","owner":"mxpv","description":"golang wrapper for NVIDIA Management Library (NVML)","archived":false,"fork":false,"pushed_at":"2018-02-27T00:35:04.000Z","size":49,"stargazers_count":20,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T00:31:55.583Z","etag":null,"topics":["cuda","golang","golang-wrapper","gpu","nvidia","nvidia-smi","nvml"],"latest_commit_sha":null,"homepage":"https://developer.nvidia.com/nvidia-management-library-nvml","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxpv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-17T22:42:42.000Z","updated_at":"2024-05-10T03:54:08.000Z","dependencies_parsed_at":"2022-08-28T16:11:01.048Z","dependency_job_id":null,"html_url":"https://github.com/mxpv/nvml-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxpv%2Fnvml-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxpv%2Fnvml-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxpv%2Fnvml-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxpv%2Fnvml-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxpv","download_url":"https://codeload.github.com/mxpv/nvml-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858914,"owners_count":16556039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","golang","golang-wrapper","gpu","nvidia","nvidia-smi","nvml"],"created_at":"2024-10-11T19:52:56.658Z","updated_at":"2025-10-05T06:39:55.455Z","avatar_url":"https://github.com/mxpv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/mxpv/nvml-go?status.svg)](https://godoc.org/github.com/mxpv/nvml-go/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mxpv/nvml-go)](https://goreportcard.com/report/github.com/mxpv/nvml-go)\n[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n# nvml-go\ngolang wrapper for NVIDIA Management Library (NVML)\n\n## Basic example ##\n\n```go\nfunc ExampleNew() {\n\tnvml, err := New(\"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdefer nvml.Shutdown()\n\n\terr = nvml.Init()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdriverVersion, err := nvml.SystemGetDriverVersion()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tlog.Printf(\"Driver version:\\t%s\", driverVersion)\n\n\tnvmlVersion, err := nvml.SystemGetNVMLVersion()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tlog.Printf(\"NVML version:\\t%s\", nvmlVersion)\n\n\tdeviceCount, err := nvml.DeviceGetCount()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor i := uint32(0); i \u003c deviceCount; i++ {\n\t\thandle, err := nvml.DeviceGetHandleByIndex(i)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tname, err := nvml.DeviceGetName(handle)\n\t\tlog.Printf(\"Product name:\\t%s\", name)\n\n\t\tbrand, err := nvml.DeviceGetBrand(handle)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tlog.Printf(\"Product Brand:\\t%s\", brand)\n\n\t\tuuid, err := nvml.DeviceGetUUID(handle)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tlog.Printf(\"GPU UUID:\\t\\t%s\", uuid)\n\n\t\tfan, err := nvml.DeviceGetFanSpeed(handle)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tlog.Printf(\"Fan Speed:\\t\\t%d\", fan)\n\t}\n}\n```\n\n\n## TODO ##\n- [Unit Queries](http://docs.nvidia.com/deploy/nvml-api/group__nvmlUnitQueries.html)\n- [Unit Commands](http://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceCommands.html)\n- Linux support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxpv%2Fnvml-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxpv%2Fnvml-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxpv%2Fnvml-go/lists"}