Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CUDAWrapNVML.h File Reference

Runtime loader and wrapper for the NVIDIA NVML GPU management library. More...

Go to the source code of this file.

Compounds

struct  wrap_nvml_handle
struct  wrap_nvmlPciInfo_t

Typedefs

typedef enum wrap_nvmlReturn_enum wrap_nvmlReturn_t
typedef void * wrap_nvmlDevice_t

Enumerations

enum  wrap_nvmlReturn_enum { WRAPNVML_SUCCESS = 0 }

Functions

wrap_nvml_handlewrap_nvml_create ()
int wrap_nvml_destroy (wrap_nvml_handle *nvmlh)
int wrap_nvml_get_gpucount (wrap_nvml_handle *nvmlh, int *gpucount)
int wrap_cuda_get_gpucount (wrap_nvml_handle *nvmlh, int *gpucount)
int wrap_nvml_get_gpu_name (wrap_nvml_handle *nvmlh, int gpuindex, char *namebuf, int bufsize)
int wrap_nvml_get_tempC (wrap_nvml_handle *nvmlh, int gpuindex, unsigned int *tempC)
int wrap_nvml_get_fanpcnt (wrap_nvml_handle *nvmlh, int gpuindex, unsigned int *fanpcnt)
int wrap_nvml_get_power_usage (wrap_nvml_handle *nvmlh, int gpuindex, unsigned int *milliwatts)
int wrap_nvml_get_cpu_affinity (wrap_nvml_handle *nvmlh, int gpuindex, unsigned int cpuSetSize, unsigned long *cpuSet)
int wrap_nvml_set_cpu_affinity (wrap_nvml_handle *nvmlh, int gpuindex)


Detailed Description

Runtime loader and wrapper for the NVIDIA NVML GPU management library.

A trivial little dlopen()-based wrapper library for the NVIDIA NVML library, to allow runtime discovery of NVML on an arbitrary system. This is all very hackish and simple-minded, but it serves my immediate needs in the short term until NVIDIA provides a static NVML wrapper library themselves, hopefully in CUDA 6.5 or maybe sometime shortly after.

Revision:
1.5
Date:
2020/02/26 19:26:47

Author:
John E. Stone - john.stone@gmail.com \copyright This trivial code is made available under the "new" 3-clause BSD license, and/or any of the GPL licenses you prefer. Feel free to use the code and modify as you see fit.

Definition in file CUDAWrapNVML.h.


Typedef Documentation

typedef void* wrap_nvmlDevice_t
 

Definition at line 34 of file CUDAWrapNVML.h.

Referenced by wrap_nvml_create.

typedef enum wrap_nvmlReturn_enum wrap_nvmlReturn_t
 

Referenced by wrap_nvml_create, wrap_nvml_get_fanpcnt, and wrap_nvml_get_tempC.


Enumeration Type Documentation

enum wrap_nvmlReturn_enum
 

Enumeration values:
WRAPNVML_SUCCESS 

Definition at line 30 of file CUDAWrapNVML.h.


Function Documentation

int wrap_cuda_get_gpucount wrap_nvml_handle   nvmlh,
int *    gpucount
 

Definition at line 267 of file CUDAWrapNVML.cu.

wrap_nvml_handle* wrap_nvml_create  
 

Definition at line 59 of file CUDAWrapNVML.cu.

int wrap_nvml_destroy wrap_nvml_handle   nvmlh
 

Definition at line 235 of file CUDAWrapNVML.cu.

Referenced by CUDAAccel::~CUDAAccel.

int wrap_nvml_get_cpu_affinity wrap_nvml_handle   nvmlh,
int    gpuindex,
unsigned int    cpuSetSize,
unsigned long *    cpuSet
 

Definition at line 333 of file CUDAWrapNVML.cu.

int wrap_nvml_get_fanpcnt wrap_nvml_handle   nvmlh,
int    gpuindex,
unsigned int *    fanpcnt
 

Definition at line 303 of file CUDAWrapNVML.cu.

int wrap_nvml_get_gpu_name wrap_nvml_handle   nvmlh,
int    gpuindex,
char *    namebuf,
int    bufsize
 

Definition at line 272 of file CUDAWrapNVML.cu.

int wrap_nvml_get_gpucount wrap_nvml_handle   nvmlh,
int *    gpucount
 

Definition at line 262 of file CUDAWrapNVML.cu.

int wrap_nvml_get_power_usage wrap_nvml_handle   nvmlh,
int    gpuindex,
unsigned int *    milliwatts
 

Definition at line 319 of file CUDAWrapNVML.cu.

int wrap_nvml_get_tempC wrap_nvml_handle   nvmlh,
int    gpuindex,
unsigned int *    tempC
 

Definition at line 287 of file CUDAWrapNVML.cu.

int wrap_nvml_set_cpu_affinity wrap_nvml_handle   nvmlh,
int    gpuindex
 

Definition at line 348 of file CUDAWrapNVML.cu.


Generated on Fri Nov 8 02:45:59 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002