https://github.com/jcbritobr/pasnvml
Nvml( nvidia monitoring library) wrapper for object pascal.
https://github.com/jcbritobr/pasnvml
freepascal lazarus-ide nvidia-gpu nvidia-smi nvml pascal-language
Last synced: 4 months ago
JSON representation
Nvml( nvidia monitoring library) wrapper for object pascal.
- Host: GitHub
- URL: https://github.com/jcbritobr/pasnvml
- Owner: jcbritobr
- License: mit
- Created: 2021-03-21T16:40:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T17:05:45.000Z (over 4 years ago)
- Last Synced: 2025-04-06T19:55:59.441Z (6 months ago)
- Topics: freepascal, lazarus-ide, nvidia-gpu, nvidia-smi, nvml, pascal-language
- Language: Pascal
- Homepage:
- Size: 10.5 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 
### The nvidia monitoring library object pascal wrapper. Please, read the [documentation](https://docs.nvidia.com/deploy/nvml-api/nvml-api-reference.html#nvml-api-reference) for better understand what is nvml.
* Example on how to get nvidia driver version
```pascal
var
version: Ansistring;
begin
try
NvInitV2;
version := NvSystemGetDriverVersion;
if Length(version) = 0 then
begin
raise ENvSystemException.Create('Something may fail acquiring driver version. Length is zero');
end;
NvShutDown;
except
on E: ENvSystemException do
begin
NvShutDown;
Fail(e.Message);
end;
end;
```* Example on how to retrieve gpu temperature
```pascal
var
device: NvHandle;
temp: Cardinal;
begin
try
NvInitV2;
device := NvDeviceGetHandleByIndexV2(0);
temp := NvDeviceGetTemperature(device, nvTemperatureGpu);
NvShutDown;
except
On E: ENvSystemException do
begin
NvShutDown;
Fail(e.Message);
end;
end;```
* The wrapper is in working status. Below we have a list of migrated modules
- [x] Ititialization and Cleanup
- [x] System Queries
- [ ] Device Queries
- [ ] Unit Queries
- [ ] Unit Commands
- [ ] Device Commands
- [ ] Event Handling Methods
- [ ] Error Reporting* Demo Project - There is also a [demo project(Monitor)](monitor/monitor.pas) that shows how to use nvml api.
