{"id":27106486,"url":"https://github.com/jcbritobr/nvml-csharp","last_synced_at":"2025-04-06T19:56:05.336Z","repository":{"id":54037037,"uuid":"346230485","full_name":"jcbritobr/nvml-csharp","owner":"jcbritobr","description":"Nvml( nvidia monitoring library) wrapper for c#.","archived":false,"fork":false,"pushed_at":"2021-03-13T21:37:28.000Z","size":1422,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-17T19:26:18.144Z","etag":null,"topics":["csharp","cuda","gpu","library","monitoring","nvidia","nvml"],"latest_commit_sha":null,"homepage":"","language":"C#","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/jcbritobr.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":"2021-03-10T04:26:17.000Z","updated_at":"2024-01-26T01:56:15.000Z","dependencies_parsed_at":"2022-08-13T06:10:51.714Z","dependency_job_id":null,"html_url":"https://github.com/jcbritobr/nvml-csharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbritobr%2Fnvml-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbritobr%2Fnvml-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbritobr%2Fnvml-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbritobr%2Fnvml-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcbritobr","download_url":"https://codeload.github.com/jcbritobr/nvml-csharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543581,"owners_count":20955865,"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":["csharp","cuda","gpu","library","monitoring","nvidia","nvml"],"created_at":"2025-04-06T19:56:04.669Z","updated_at":"2025-04-06T19:56:05.316Z","avatar_url":"https://github.com/jcbritobr.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# ![](thumbs/nvml-csharp.png)\n\n### The nvidia monitoring library wrapper written in c#. Please, read the [documentation](https://docs.nvidia.com/deploy/nvml-api/nvml-api-reference.html#nvml-api-reference) for better understand what is nvml.\n\n* Example on how to get running processes list\n```csharp\ntry\n{\n    NvGpu.NvmlInitV2();\n    var device = IntPtr.Zero;\n    device = NvGpu.NvmlDeviceGetHandleByIndex(0);\n    var (list, count) = NvGpu.NvmlDeviceGetComputeRunningProcesses(device);\n    NvGpu.NvmlShutdown();\n}\ncatch (Exception e)\n{\n    Assert.Fail(e.ToString());\n}\n```\n\n* Example on how to retrieve gpu temperature\n```csharp\ntry\n{\n    var device = IntPtr.Zero;\n    NvGpu.NvmlInitV2();\n    device = NvGpu.NvmlDeviceGetHandleByIndex(0);\n    var temperature = NvGpu.NvmlDeviceGetTemperature(device, NvmlTemperatureSensor.NVML_TEMPERATURE_GPU);\n    if (!(temperature \u003e= 40 \u0026\u0026 temperature \u003c= 80))\n    {\n        Assert.Fail(\"Cant get temperature.\");\n    }\n    NvGpu.NvmlShutdown();\n}\ncatch (Exception e)\n{\n    Assert.Fail(e.ToString());\n}\n```\n\n* The wrapper is in working status. Below we have a list of migrated modules\n- [x] Ititialization and Cleanup\n- [x] System Queries\n- [ ] Device Queries\n- [ ] Unit Queries\n- [ ] Unit Commands\n- [ ] Device Commands\n- [ ] Event Handling Methods\n- [ ] Error Reporting\n\n* Demo Project - There is also a [demo project](Demo/Program.cs), ported from c language, from original nvml api.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbritobr%2Fnvml-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcbritobr%2Fnvml-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbritobr%2Fnvml-csharp/lists"}