Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnicely/nvml_examples
Examples showing how to utilize the NVML library for GPU monitoring
https://github.com/mnicely/nvml_examples
cublas cuda nvidia nvml
Last synced: 4 months ago
JSON representation
Examples showing how to utilize the NVML library for GPU monitoring
- Host: GitHub
- URL: https://github.com/mnicely/nvml_examples
- Owner: mnicely
- License: bsd-3-clause
- Created: 2019-05-09T22:57:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-31T20:18:02.000Z (over 2 years ago)
- Last Synced: 2023-09-20T01:03:58.329Z (over 1 year ago)
- Topics: cublas, cuda, nvidia, nvml
- Language: C++
- Size: 256 KB
- Stars: 16
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nvml_example
Example showing how to utilize NVML library for GPU monitoring with high sampling rate.This example utilizing the NVML Library and C++11 mutlithreading to provide GPU monitoring with a high sampling rate. Normally, one would pipe nvidia-smi to a file, but this can cause excessive I/O usage.
Also provided is a Matlab script used to plot the data.
### Prerequisites
Example requires Tesla card because some calls are not supported on Geforce family.### Built With
This example utilizes the following toolsets:
* cuBLAS
* Thrust
* C++11 multithreading
* NVIDIA Management Library (NVML)### Deployment
Include header class```#include nvmlClass.h```
Create object of nvmlClass
```nvmlClass nvml( dev, filename );```
Create thread to run in parallel, gathering data
```std::thread threadStart( &nvmlClass::getStats, &nvml );```
Create thread to kill getStats function
```std::thread threadKill( &nvmlClass::killThread, &nvml );```
Join all threads
```threadStart.join( );```
```threadKill.join( );```