46 #include "cuda_runtime_api.h" 66 #define CUDAAPI __attribute__((weak)) 72 #define CUDARTAPI __attribute__((weak)) 82 #define DECLDIR __attribute__((weak)) 106 char* (*nvmlErrorStringPtr)(nvmlReturn_t);
128 static void*
dl1 = NULL;
129 static void*
dl2 = NULL;
130 static void*
dl3 = NULL;
138 #define NVML_MAX_COUNTERS 100 143 typedef struct nvml_control_state {
150 typedef struct nvml_context {
172 unsigned int ret = 0;
174 bad = (*nvmlDeviceGetClockInfoPtr)(dev, which_one, &
ret);
176 if (NVML_SUCCESS != bad) {
178 return (
unsigned long long) - 1;
181 return (
unsigned long long)
ret;
187 nvmlEccErrorCounts_t counts;
190 bad = (*nvmlDeviceGetDetailedEccErrorsPtr)(dev, bits, NVML_VOLATILE_ECC , &counts);
192 if (NVML_SUCCESS != bad) {
194 return (
unsigned long long) - 1;
198 return counts.registerFile;
200 return counts.l1Cache;
202 return counts.l2Cache;
204 return counts.deviceMemory;
208 return (
unsigned long long) - 1;
214 unsigned int ret = 0;
216 bad = (*nvmlDeviceGetFanSpeedPtr)(dev, &
ret);
218 if (NVML_SUCCESS != bad) {
220 return (
unsigned long long) - 1;
222 return (
unsigned long long)
ret;
228 unsigned int ret = 0;
230 bad = (*nvmlDeviceGetClockInfoPtr)(dev, which_one, &
ret);
232 if (NVML_SUCCESS != bad) {
234 return (
unsigned long long) - 1;
236 return (
unsigned long long)
ret;
242 nvmlMemory_t meminfo;
244 bad = (*nvmlDeviceGetMemoryInfoPtr)(dev, &meminfo);
246 if (NVML_SUCCESS != bad) {
248 return (
unsigned long long) - 1;
253 return meminfo.total;
261 return (
unsigned long long) - 1;
267 unsigned int ret = 0;
268 nvmlPstates_t state = NVML_PSTATE_15;
270 bad = (*nvmlDeviceGetPerformanceStatePtr)(dev, &state);
272 if (NVML_SUCCESS != bad) {
274 return (
unsigned long long) - 1;
325 case NVML_PSTATE_UNKNOWN:
329 return (
unsigned long long) - 1;
331 return (
unsigned long long)
ret;
339 bad = (*nvmlDeviceGetPowerUsagePtr)(dev, &power);
341 if (NVML_SUCCESS != bad) {
343 return (
unsigned long long) - 1;
345 return (
unsigned long long) power;
351 unsigned int ret = 0;
353 bad = (*nvmlDeviceGetTemperaturePtr)(dev, NVML_TEMPERATURE_GPU, &
ret);
355 if (NVML_SUCCESS != bad) {
357 return (
unsigned long long) - 1;
359 return (
unsigned long long)
ret;
365 unsigned long long counts = 0;
367 bad = (*nvmlDeviceGetTotalEccErrorsPtr)(dev, bits, NVML_VOLATILE_ECC , &counts);
369 if (NVML_SUCCESS != bad) {
371 return (
unsigned long long) - 1;
382 nvmlUtilization_t util;
384 bad = (*nvmlDeviceGetUtilizationRatesPtr)(dev, &util);
386 if (NVML_SUCCESS != bad) {
388 return (
unsigned long long) - 1;
393 return (
unsigned long long) util.gpu;
395 return (
unsigned long long) util.memory;
400 return (
unsigned long long) - 1;
407 rv = (*nvmlDeviceGetPowerManagementLimitPtr)(dev, &limit);
408 if (NVML_SUCCESS != rv) {
410 return (
unsigned long long) 0;
412 return (
unsigned long long) limit;
426 unsigned int templimit = 0;
431 ret = (*nvmlDeviceGetPowerManagementLimitPtr)(
devices[
i], &templimit);
437 if (
ret != NVML_SUCCESS)
457 *value = (
long long) - 1;
459 (*cudaGetDevicePtr)(&cudaIdx);
470 switch (entry->
type) {
522 if (*value == (
long long)(
unsigned long long) - 1)
540 (*cudaGetDevicePtr)(&cudaIdx);
551 switch (entry->
type) {
553 unsigned int setToPower = (
unsigned int) * value;
586 SUBDBG(
"Enter: ctx: %p\n", ctx);
595 nvmlEnableState_t mode = NVML_FEATURE_DISABLED;
596 nvmlEnableState_t pendingmode = NVML_FEATURE_DISABLED;
602 float ecc_version = 0.0;
606 unsigned int temp = 0;
615 if (NVML_SUCCESS !=
ret) {
616 SUBDBG(
"nvmlDeviceGetHandleByIndex(%d, &devices[%d]) failed.\n",
i,
i);
621 if (NVML_SUCCESS !=
ret) {
622 SUBDBG(
"nvmlDeviceGetName failed \n");
623 strncpy(
name,
"deviceNameUnknown", 17);
628 ret = (*nvmlDeviceGetInforomVersionPtr)(
devices[
i], NVML_INFOROM_ECC, inforomECC, 16);
629 if (NVML_SUCCESS !=
ret) {
632 ecc_version = strtof(inforomECC, NULL);
644 ret = (*nvmlDeviceGetEccModePtr)(
devices[
i], &mode, &pendingmode);
645 if (NVML_SUCCESS ==
ret) {
646 if (NVML_FEATURE_ENABLED == mode) {
647 if (ecc_version >= 2.0) {
651 if (ecc_version >= 1.0) {
657 SUBDBG(
"nvmlDeviceGetEccMode does not appear to be supported. (nvml return code %d)\n",
ret);
687 ret = (*nvmlDeviceGetPowerUsagePtr)(
devices[
i], &temp);
688 if (NVML_SUCCESS ==
ret) {
692 SUBDBG(
"nvmlDeviceGetPowerUsage does not appear to be supported on this card. (nvml return code %d)\n",
ret);
704 unsigned int templimit = 0;
705 ret = (*nvmlDeviceGetPowerManagementLimitPtr)(
devices[
i], &templimit);
706 if (
ret == NVML_SUCCESS && templimit > 0) {
712 SUBDBG(
"nvmlDeviceGetPowerManagementLimit not appear to be supported on this card. (NVML code %d)\n",
ret);
718 unsigned int minLimit = 0, maxLimit = 0;
719 ret = (*nvmlDeviceGetPowerManagementLimitConstraintsPtr)(
devices[
i], &minLimit, &maxLimit);
720 if (
ret == NVML_SUCCESS) {
731 SUBDBG(
"Done nvmlDeviceGetPowerManagementLimitConstraintsPtr\n");
742 SUBDBG(
"Device name is too long %s:device%d",
name,
i);
757 int i, nameLen = 0, j;
768 memset(
names[
i], 0x0, 64);
770 if (NVML_SUCCESS !=
ret) {
771 SUBDBG(
"nvmlDeviceGetName failed \n");
772 strncpy(
name,
"deviceNameUnknown", 17);
776 nameLen = strlen(
name);
779 int retval = snprintf(sanitized_name,
sizeof(
name),
"%s:device_%d",
name,
i);
781 SUBDBG(
"Device name is too long %s:device%d",
name,
i);
784 sanitized_name[
sizeof(
name) - 1] =
'\0';
786 for (j = 0; j < nameLen; j++)
787 if (
' ' == sanitized_name[j])
788 sanitized_name[j] =
'_';
791 sprintf(entry->
name,
"%s:graphics_clock", sanitized_name);
797 sprintf(entry->
name,
"%s:sm_clock", sanitized_name);
803 sprintf(entry->
name,
"%s:memory_clock", sanitized_name);
811 sprintf(entry->
name,
"%s:l1_single_ecc_errors", sanitized_name);
814 .
bits = NVML_SINGLE_BIT_ECC,
820 sprintf(entry->
name,
"%s:l2_single_ecc_errors", sanitized_name);
823 .
bits = NVML_SINGLE_BIT_ECC,
829 sprintf(entry->
name,
"%s:memory_single_ecc_errors", sanitized_name);
832 .
bits = NVML_SINGLE_BIT_ECC,
838 sprintf(entry->
name,
"%s:regfile_single_ecc_errors", sanitized_name);
841 .
bits = NVML_SINGLE_BIT_ECC,
847 sprintf(entry->
name,
"%s:1l_double_ecc_errors", sanitized_name);
850 .
bits = NVML_DOUBLE_BIT_ECC,
856 sprintf(entry->
name,
"%s:l2_double_ecc_errors", sanitized_name);
859 .
bits = NVML_DOUBLE_BIT_ECC,
865 sprintf(entry->
name,
"%s:memory_double_ecc_errors", sanitized_name);
868 .
bits = NVML_DOUBLE_BIT_ECC,
874 sprintf(entry->
name,
"%s:regfile_double_ecc_errors", sanitized_name);
877 .
bits = NVML_DOUBLE_BIT_ECC,
885 sprintf(entry->
name,
"%s:fan_speed", sanitized_name);
892 sprintf(entry->
name,
"%s:graphics_max_clock", sanitized_name);
898 sprintf(entry->
name,
"%s:sm_max_clock", sanitized_name);
904 sprintf(entry->
name,
"%s:memory_max_clock", sanitized_name);
912 sprintf(entry->
name,
"%s:total_memory", sanitized_name);
918 sprintf(entry->
name,
"%s:unallocated_memory", sanitized_name);
924 sprintf(entry->
name,
"%s:allocated_memory", sanitized_name);
925 strncpy(entry->
description,
"Allocated FB memory (in bytes). Note that the driver/GPU always sets aside a small amount of memory for bookkeeping.",
PAPI_MAX_STR_LEN);
932 sprintf(entry->
name,
"%s:pstate", sanitized_name);
939 sprintf(entry->
name,
"%s:power", sanitized_name);
942 strncpy(entry->
description,
"Power usage reading for the device, in miliwatts. This is the power draw (+/-5 watts) for the entire board: GPU, memory, etc.",
PAPI_MAX_STR_LEN);
948 sprintf(entry->
name,
"%s:temperature", sanitized_name);
955 sprintf(entry->
name,
"%s:total_ecc_errors", sanitized_name);
958 .
bits = NVML_SINGLE_BIT_ECC,
963 sprintf(entry->
name,
"%s:total_ecc_errors", sanitized_name);
966 .
bits = NVML_DOUBLE_BIT_ECC,
973 sprintf(entry->
name,
"%s:gpu_utilization", sanitized_name);
974 strncpy(entry->
description,
"Percent of time over the past second during which one or more kernels was executing on the GPU.",
PAPI_MAX_STR_LEN);
979 sprintf(entry->
name,
"%s:memory_utilization", sanitized_name);
980 strncpy(entry->
description,
"Percent of time over the past second during which global (device) memory was being read or written.",
PAPI_MAX_STR_LEN);
987 sprintf(entry->
name,
"%s:power_management_limit", sanitized_name);
990 strncpy(entry->
description,
"Power management limit in milliwatts associated with the device. The power limit defines the upper boundary for the cards power draw. If the cards total power draw reaches this limit the power management algorithm kicks in. This should be writable (with appropriate privileges) on supported Kepler or later (unit milliWatts). ",
PAPI_MAX_STR_LEN);
995 sprintf(entry->
name,
"%s:power_management_limit_constraint_min", sanitized_name);
1003 sprintf(entry->
name,
"%s:power_management_limit_constraint_max", sanitized_name);
1058 unsigned int nvml_count = 0;
1062 SUBDBG(
"Dynamic link of CUDA libraries failed, component will be disabled.\n");
1063 SUBDBG(
"See disable reason in papi_component_avail output for more details.\n");
1068 ret = (*nvmlInitPtr)();
1069 if (NVML_SUCCESS !=
ret) {
1075 cuerr = (*cuInitPtr)(0);
1076 if (cudaSuccess != cuerr) {
1083 ret = (*nvmlDeviceGetCountPtr)(&nvml_count);
1084 if (NVML_SUCCESS !=
ret) {
1090 cuerr = (*cudaGetDeviceCountPtr)(&cuda_count);
1091 if (cudaSuccess != cuerr) {
1098 if ((cuda_count > 0) && (nvml_count != (
unsigned int)cuda_count)) {
1160 dl1 = dlopen(
"libcuda.so", RTLD_NOW | RTLD_GLOBAL);
1166 if (dlerror() != NULL) {
1171 dl2 = dlopen(
"libcudart.so", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
1177 if (dlerror() != NULL) {
1182 if (dlerror() != NULL) {
1187 if (dlerror() != NULL) {
1192 dl3 = dlopen(
"libnvidia-ml.so", RTLD_NOW | RTLD_GLOBAL);
1198 if (dlerror() != NULL) {
1203 if (dlerror() != NULL) {
1208 if (dlerror() != NULL) {
1213 if (dlerror() != NULL) {
1218 if (dlerror() != NULL) {
1223 if (dlerror() != NULL) {
1228 if (dlerror() != NULL) {
1233 if (dlerror() != NULL) {
1238 if (dlerror() != NULL) {
1243 if (dlerror() != NULL) {
1248 if (dlerror() != NULL) {
1253 if (dlerror() != NULL) {
1258 if (dlerror() != NULL) {
1263 if (dlerror() != NULL) {
1268 if (dlerror() != NULL) {
1273 if (dlerror() != NULL) {
1278 if (dlerror() != NULL) {
1283 if (dlerror() != NULL) {
1288 if (dlerror() != NULL) {
1293 if (dlerror() != NULL) {
1298 if (dlerror() != NULL) {
1313 SUBDBG(
"nvml_init_control_state... %p\n", ctl);
1327 SUBDBG(
"Enter: ctl: %p, ctx: %p\n", ctl, ctx);
1338 nvml_ctl->which_counter[
i] = index;
1343 nvml_ctl->num_events =
count;
1350 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1367 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1376 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1379 nvml_ctl->which_counter[
i])))
1390 long long **
events,
int flags)
1392 SUBDBG(
"Enter: ctx: %p, flags: %d\n", ctx, flags);
1400 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1403 nvml_ctl->which_counter[
i])))
1408 *
events = nvml_ctl->counter;
1417 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1428 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1443 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1458 SUBDBG(
"Enter: ctx: %p\n", ctx);
1473 SUBDBG(
"Enter: ctx: %p, code: %d\n", ctx, code);
1497 SUBDBG(
"Enter: cntrl: %p, domain: %d\n", cntrl, domain);
1504 SUBDBG(
" PAPI_DOM_USER \n");
1508 SUBDBG(
" PAPI_DOM_KERNEL \n");
1512 SUBDBG(
" PAPI_DOM_OTHER \n");
1516 SUBDBG(
" PAPI_DOM_ALL \n");
1557 *EventCode = *EventCode + 1;
1579 SUBDBG(
"Entry: EventCode: %#x, name: %s, len: %d\n", EventCode,
name, len);
1618 int index = EventCode;
1643 .short_name =
"nvml",
1645 .description =
"NVML provides the API for monitoring NVIDIA hardware (power usage, temperature, fan speed, etc)",
1646 .support_version =
"n/a",
1647 .kernel_version =
"n/a",
1649 .num_preset_events = 0,
1650 .num_native_events = 0,
1660 .posix1b_timers = 0,
1661 .kernel_profile = 0,
1662 .kernel_multiplex = 0,
1663 .fast_counter_read = 0,
1664 .fast_real_timer = 0,
1665 .fast_virtual_timer = 0,
1667 .attach_must_ptrace = 0,
1697 .cleanup_eventset = NULL,
1699 .allocate_registers = NULL,
1702 .dispatch_timer = NULL,
1703 .get_overflow_address = NULL,
1704 .stop_profiling = NULL,
1705 .set_overflow = NULL,
1706 .set_profile = NULL,
1710 .ntv_name_to_code = NULL,
nvmlReturn_t DECLDIR nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int len)
nvmlReturn_t DECLDIR nvmlDeviceGetDetailedEccErrors(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, nvmlEccErrorCounts_t *)
char disabled_reason[PAPI_MAX_STR_LEN]
void(* _dl_non_dynamic_init)(void)
unsigned long long getPState(nvmlDevice_t dev)
nvmlReturn_t(* nvmlDeviceGetCountPtr)(unsigned int *dest)
int _papi_nvml_ntv_code_to_name(unsigned int EventCode, char *name, int len)
#define FEATURE_NVML_POWER_MANAGEMENT_LIMIT_CONSTRAINT_MIN
nvmlReturn_t(* nvmlDeviceGetNamePtr)(nvmlDevice_t, char *, unsigned int)
static unsigned int * power_management_limit_constraint_min
static unsigned int * power_management_initial_limit
char units[PAPI_MIN_STR_LEN]
static int linkCudaLibraries()
unsigned long long getTotalEccErrors(nvmlDevice_t dev, nvmlEccBitType_t bits)
nvmlReturn_t(* nvmlDeviceGetHandleByIndexPtr)(unsigned int, nvmlDevice_t *)
#define FEATURE_ECC_LOCAL_ERRORS
nvmlReturn_t DECLDIR nvmlDeviceGetTemperature(nvmlDevice_t, nvmlTemperatureSensors_t, unsigned int *)
cudaError_t CUDARTAPI cudaDeviceGetPCIBusId(char *, int, int)
unsigned long long getPowerUsage(nvmlDevice_t dev)
nvmlReturn_t(* nvmlDeviceGetEccModePtr)(nvmlDevice_t, nvmlEnableState_t *, nvmlEnableState_t *)
#define MEMINFO_TOTAL_MEMORY
#define FEATURE_ECC_TOTAL_ERRORS
struct local_ecc ecc_opts
int _papi_nvml_read(hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags)
int _papi_nvml_stop(hwd_context_t *ctx, hwd_control_state_t *ctl)
nvmlReturn_t(* nvmlDeviceGetInforomVersionPtr)(nvmlDevice_t, nvmlInforomObject_t, char *, unsigned int)
#define FEATURE_FAN_SPEED
int _papi_nvml_write(hwd_context_t *ctx, hwd_control_state_t *ctl, long long *events)
static int nvml_hardware_write(long long *value, int which_one)
nvmlReturn_t(* nvmlDeviceGetPciInfoPtr)(nvmlDevice_t, nvmlPciInfo_t *)
unsigned long long getMemoryInfo(nvmlDevice_t dev, int which_one)
char long_descr[PAPI_HUGE_STR_LEN]
nvmlReturn_t(* nvmlDeviceGetPowerManagementLimitConstraintsPtr)(nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit)
nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo(nvmlDevice_t, nvmlPciInfo_t *)
#define NVML_MAX_COUNTERS
PAPI_component_info_t cmp_info
cudaError_t(* cudaDeviceGetPCIBusIdPtr)(char *, int, int)
char name[PAPI_MAX_STR_LEN]
int _papi_nvml_shutdown_component()
static nvml_native_event_entry_t * nvml_native_table
Return codes and api definitions.
nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t, unsigned int *)
papi_vector_t _nvml_vector
cudaError_t CUDARTAPI cudaGetDeviceCount(int *dest)
nvmlReturn_t(* nvmlDeviceGetClockInfoPtr)(nvmlDevice_t, nvmlClockType_t, unsigned int *)
unsigned long long getPowerManagementLimit(nvmlDevice_t dev)
int _papi_nvml_init_thread(hwd_context_t *ctx)
char events[MAX_EVENTS][BUFSIZ]
int _papi_nvml_shutdown_thread(hwd_context_t *ctx)
nvmlReturn_t(* nvmlDeviceGetDetailedEccErrorsPtr)(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, nvmlEccErrorCounts_t *)
int _papi_nvml_ntv_enum_events(unsigned int *EventCode, int modifier)
#define FEATURE_UTILIZATION
#define FEATURE_CLOCK_INFO
nvml_resource_options_t options
nvmlReturn_t(* nvmlDeviceGetPowerManagementLimitPtr)(nvmlDevice_t device, unsigned int *limit)
CUresult CUDAAPI cuInit(unsigned int myInt)
nvmlReturn_t DECLDIR nvmlInit(void)
static nvmlDevice_t * devices
#define FEATURE_MAX_CLOCK
unsigned long long getEccLocalErrors(nvmlDevice_t dev, nvmlEccBitType_t bits, int which_one)
#define MEMORY_UTILIZATION
#define FEATURE_PERF_STATES
nvmlReturn_t DECLDIR nvmlDeviceGetPerformanceState(nvmlDevice_t, nvmlPstates_t *)
nvmlReturn_t(* nvmlDeviceGetTotalEccErrorsPtr)(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, unsigned long long *)
char symbol[PAPI_HUGE_STR_LEN]
int _papi_nvml_start(hwd_context_t *ctx, hwd_control_state_t *ctl)
nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex(unsigned int idx, nvmlDevice_t *dest)
cudaError_t(* cudaGetDeviceCountPtr)(int *)
nvmlReturn_t(* nvmlDeviceGetUtilizationRatesPtr)(nvmlDevice_t, nvmlUtilization_t *)
__attribute__((constructor))
#define FEATURE_NVML_POWER_MANAGEMENT_LIMIT_CONSTRAINT_MAX
static unsigned int * power_management_limit_constraint_max
int _papi_nvml_ntv_code_to_descr(unsigned int EventCode, char *descr, int len)
#define SUBDBG(format, args...)
nvmlReturn_t DECLDIR nvmlDeviceGetInforomVersion(nvmlDevice_t, nvmlInforomObject_t, char *, unsigned int)
char name[PAPI_MAX_STR_LEN]
int _papi_nvml_ntv_code_to_info(unsigned int EventCode, PAPI_event_info_t *info)
int _papi_nvml_update_control_state(hwd_control_state_t *ctl, NativeInfo_t *native, int count, hwd_context_t *ctx)
nvmlReturn_t(* nvmlDeviceGetPowerUsagePtr)(nvmlDevice_t, unsigned int *)
nvmlReturn_t DECLDIR nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int *dest)
nvmlReturn_t DECLDIR nvmlDeviceGetTotalEccErrors(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, unsigned long long *)
nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t, nvmlMemory_t *)
char units[PAPI_MIN_STR_LEN]
nvmlReturn_t DECLDIR nvmlDeviceGetClockInfo(nvmlDevice_t, nvmlClockType_t, unsigned int *)
char description[PAPI_MAX_STR_LEN]
nvmlReturn_t(* nvmlDeviceGetMemoryInfoPtr)(nvmlDevice_t, nvmlMemory_t *)
nvmlReturn_t(* nvmlDeviceGetTemperaturePtr)(nvmlDevice_t, nvmlTemperatureSensors_t, unsigned int *)
nvmlReturn_t(* nvmlShutdownPtr)(void)
CUresult CUDAAPI(* cuInitPtr)(unsigned int)
const char *DECLDIR nvmlErrorString(nvmlReturn_t)
static void nvml_hardware_reset()
nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimit(nvmlDevice_t device, unsigned int *limit)
unsigned long long getClockSpeed(nvmlDevice_t dev, nvmlClockType_t which_one)
nvmlReturn_t DECLDIR nvmlDeviceGetUtilizationRates(nvmlDevice_t, nvmlUtilization_t *)
unsigned long long getTemperature(nvmlDevice_t dev)
static int detectDevices()
nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit(nvmlDevice_t device, unsigned int limit)
unsigned long long getFanSpeed(nvmlDevice_t dev)
#define HAS_FEATURE(features, query)
nvmlReturn_t(* nvmlDeviceSetPowerManagementLimitPtr)(nvmlDevice_t device, unsigned int limit)
int _papi_nvml_set_domain(hwd_control_state_t *cntrl, int domain)
nvmlReturn_t(* nvmlDeviceGetFanSpeedPtr)(nvmlDevice_t, unsigned int *)
char *(* nvmlErrorStringPtr)(nvmlReturn_t)
nvmlReturn_t(* nvmlInitPtr)(void)
#define FEATURE_POWER_MANAGEMENT
unsigned long long getUtilization(nvmlDevice_t dev, int which_one)
#define LOCAL_ECC_REGFILE
int _papi_nvml_ctl(hwd_context_t *ctx, int code, _papi_int_option_t *option)
nvmlReturn_t(* nvmlDeviceGetPerformanceStatePtr)(nvmlDevice_t, nvmlPstates_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetEccMode(nvmlDevice_t, nvmlEnableState_t *, nvmlEnableState_t *)
nvmlReturn_t DECLDIR nvmlShutdown(void)
#define FEATURE_MEMORY_INFO
nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *dest)
static void createNativeEvents()
cudaError_t CUDARTAPI cudaGetDevice(int *dest)
const char * names[NUM_EVENTS]
#define MEMINFO_UNALLOCED
int _papi_nvml_reset(hwd_context_t *ctx, hwd_control_state_t *ctl)
int _papi_nvml_init_control_state(hwd_control_state_t *ctl)
cudaError_t(* cudaGetDevicePtr)(int *)
nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit)
unsigned long long getMaxClockSpeed(nvmlDevice_t dev, nvmlClockType_t which_one)
static int nvml_hardware_read(long long *value, int which_one)
int _papi_nvml_init_component(int cidx)
nvml_control_state_t state