|
PAPI
5.0.1.0
|
00001 #ifndef __LINUX_NVML_H__ 00002 #define __LINUX_NVML_H__ 00003 00004 #include "nvml.h" 00005 00006 #define FEATURE_CLOCK_INFO 1 00007 #define FEATURE_ECC_LOCAL_ERRORS 2 00008 #define FEATURE_FAN_SPEED 4 00009 #define FEATURE_MAX_CLOCK 8 00010 #define FEATURE_MEMORY_INFO 16 00011 #define FEATURE_PERF_STATES 32 00012 #define FEATURE_POWER 64 00013 #define FEATURE_TEMP 128 00014 #define FEATURE_ECC_TOTAL_ERRORS 256 00015 #define FEATURE_UTILIZATION 512 00016 00017 #define HAS_FEATURE( features, query ) ( features & query ) 00018 00019 #define MEMINFO_TOTAL_MEMORY 0 00020 #define MEMINFO_UNALLOCED 1 00021 #define MEMINFO_ALLOCED 2 00022 00023 #define LOCAL_ECC_REGFILE 0 00024 #define LOCAL_ECC_L1 1 00025 #define LOCAL_ECC_L2 2 00026 #define LOCAL_ECC_MEM 3 00027 00028 #define GPU_UTILIZATION 0 00029 #define MEMORY_UTILIZATION 1 00030 00031 /* we lookup which card we are on at read time; this is a place holder */ 00032 typedef int nvml_register_t; 00033 00034 struct local_ecc { 00035 nvmlEccBitType_t bits; 00036 int which_one; 00037 }; 00038 00039 typedef union { 00040 nvmlClockType_t clock; /* used in get[Max]ClockSpeed */ 00041 struct local_ecc ecc_opts; /* local ecc errors, total ecc errors */ 00042 int which_one; /* memory_info , utilization*/ 00043 } nvml_resource_options_t; 00044 00045 typedef struct nvml_native_event_entry 00046 { 00047 nvml_resource_options_t options; 00048 char name[PAPI_MAX_STR_LEN]; 00049 char description[PAPI_MAX_STR_LEN]; 00050 int type; 00051 } nvml_native_event_entry_t; 00052 00053 #endif