Skip to main content

Package Description

Total Downloads
465
465
Published
Sep 17, 2024
2y ago

Get Started

dotnet add package NvmlLib --version 0.0.1
ProductVersions
.NET Standard
netstandard2.0

README

The nvidia monitoring library wrapper written in c#. Please, read the documentation for better understand what is nvml.

  • Example on how to get running processes list
try
{
    NvGpu.NvmlInitV2();
    var device = IntPtr.Zero;
    device = NvGpu.NvmlDeviceGetHandleByIndex(0);
    var (list, count) = NvGpu.NvmlDeviceGetComputeRunningProcesses(device);
    NvGpu.NvmlShutdown();
}
catch (Exception e)
{
    Assert.Fail(e.ToString());
}
  • Example on how to retrieve gpu temperature
try
{
    var device = IntPtr.Zero;
    NvGpu.NvmlInitV2();
    device = NvGpu.NvmlDeviceGetHandleByIndex(0);
    var temperature = NvGpu.NvmlDeviceGetTemperature(device, NvmlTemperatureSensor.NVML_TEMPERATURE_GPU);
    if (!(temperature >= 40 && temperature <= 80))
    {
        Assert.Fail("Cant get temperature.");
    }
    NvGpu.NvmlShutdown();
}
catch (Exception e)
{
    Assert.Fail(e.ToString());
}
  • The wrapper is in working status. Below we have a list of migrated modules
  • Ititialization and Cleanup
  • System Queries
  • Device Queries
  • Unit Queries
  • Unit Commands
  • Device Commands
  • Event Handling Methods
  • Error Reporting
  • Demo Project - There is also a demo project, ported from c language, from original nvml api.

Downloads by Version

Not enough data for chart

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.