#include <stdio.h>
#include <stdlib.h>
#include "CUDAWrapNVML.h"
#include "cuda_runtime.h"
#include <dlfcn.h>
Go to the source code of this file.
Functions | |
void * | wrap_dlopen (const char *filename) |
void * | wrap_dlsym (void *h, const char *sym) |
int | wrap_dlclose (void *h) |
wrap_nvml_handle * | wrap_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 cudaindex, char *namebuf, int bufsize) |
int | wrap_nvml_get_tempC (wrap_nvml_handle *nvmlh, int cudaindex, unsigned int *tempC) |
int | wrap_nvml_get_fanpcnt (wrap_nvml_handle *nvmlh, int cudaindex, unsigned int *fanpcnt) |
int | wrap_nvml_get_power_usage (wrap_nvml_handle *nvmlh, int cudaindex, unsigned int *milliwatts) |
int | wrap_nvml_get_cpu_affinity (wrap_nvml_handle *nvmlh, int cudaindex, unsigned int cpuSetSize, unsigned long *cpuSet) |
int | wrap_nvml_set_cpu_affinity (wrap_nvml_handle *nvmlh, int cudaindex) |
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.
Definition in file CUDAWrapNVML.cu.
|
Definition at line 267 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_gpucount. |
|
Definition at line 50 of file CUDAWrapNVML.cu. Referenced by wrap_nvml_create, and wrap_nvml_destroy. |
|
Definition at line 44 of file CUDAWrapNVML.cu. Referenced by wrap_nvml_create. |
|
Definition at line 47 of file CUDAWrapNVML.cu. Referenced by wrap_nvml_create. |
|
|
|
Definition at line 333 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetCpuAffinity, and WRAPNVML_SUCCESS. |
|
Definition at line 303 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetFanSpeed, wrap_nvmlReturn_t, and WRAPNVML_SUCCESS. |
|
Definition at line 272 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetName, and WRAPNVML_SUCCESS. |
|
Definition at line 262 of file CUDAWrapNVML.cu. References wrap_nvml_handle::nvml_gpucount. |
|
Definition at line 319 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetPowerUsage, and WRAPNVML_SUCCESS. |
|
Definition at line 287 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetTemperature, wrap_nvmlReturn_t, and WRAPNVML_SUCCESS. |
|
Definition at line 348 of file CUDAWrapNVML.cu. References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceSetCpuAffinity, and WRAPNVML_SUCCESS. |