Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/compat/nvml/nvml.h # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / compat / nvml / nvml.h` 86 lines · 3475 bytes Raw Blame History 1 /* GENERATED by omega-bridge cabi-1 from src/toc.om SHA256 `218214ab7dcc6658eed338bdd6347e2e26c23a34be259e601bef0689abf86821`; source SHA256 `d61c7ebf5f327f6a27baa0c42a4d29c1169b1852b7d74ffda23e74fbe96192cc`. */ 2 #ifndef OMBR_NVML_H 3 #define OMBR_NVML_H 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 #ifndef NVML_NO_UNVERSIONED_FUNC_DEFS 8 #define nvmlInit nvmlInit_v2 9 #define nvmlDeviceGetCount nvmlDeviceGetCount_v2 10 #define nvmlDeviceGetHandleByIndex nvmlDeviceGetHandleByIndex_v2 11 #define nvmlDeviceGetComputeRunningProcesses nvmlDeviceGetComputeRunningProcesses_v3 12 #endif 13 #define NVML_VALUE_NOT_AVAILABLE (-1) 14 #define NVML_DEVICE_UUID_BUFFER_SIZE 80 15 #define NVML_DEVICE_UUID_V2_BUFFER_SIZE 96 16 #define NVML_DEVICE_NAME_BUFFER_SIZE 64 17 #define NVML_DEVICE_NAME_V2_BUFFER_SIZE 96 18 typedef enum nvmlReturn_enum { 19 NVML_SUCCESS = 0, 20 NVML_ERROR_UNINITIALIZED = 1, 21 NVML_ERROR_INVALID_ARGUMENT = 2, 22 NVML_ERROR_NOT_SUPPORTED = 3, 23 NVML_ERROR_NO_PERMISSION = 4, 24 NVML_ERROR_ALREADY_INITIALIZED = 5, 25 NVML_ERROR_NOT_FOUND = 6, 26 NVML_ERROR_INSUFFICIENT_SIZE = 7, 27 NVML_ERROR_INSUFFICIENT_POWER = 8, 28 NVML_ERROR_DRIVER_NOT_LOADED = 9, 29 NVML_ERROR_TIMEOUT = 10, 30 NVML_ERROR_IRQ_ISSUE = 11, 31 NVML_ERROR_LIBRARY_NOT_FOUND = 12, 32 NVML_ERROR_FUNCTION_NOT_FOUND = 13, 33 NVML_ERROR_CORRUPTED_INFOROM = 14, 34 NVML_ERROR_GPU_IS_LOST = 15, 35 NVML_ERROR_RESET_REQUIRED = 16, 36 NVML_ERROR_OPERATING_SYSTEM = 17, 37 NVML_ERROR_LIB_RM_VERSION_MISMATCH = 18, 38 NVML_ERROR_IN_USE = 19, 39 NVML_ERROR_MEMORY = 20, 40 NVML_ERROR_NO_DATA = 21, 41 NVML_ERROR_VGPU_ECC_NOT_SUPPORTED = 22, 42 NVML_ERROR_INSUFFICIENT_RESOURCES = 23, 43 NVML_ERROR_FREQ_NOT_SUPPORTED = 24, 44 NVML_ERROR_ARGUMENT_VERSION_MISMATCH = 25, 45 NVML_ERROR_DEPRECATED = 26, 46 NVML_ERROR_NOT_READY = 27, 47 NVML_ERROR_GPU_NOT_FOUND = 28, 48 NVML_ERROR_INVALID_STATE = 29, 49 NVML_ERROR_RESET_TYPE_NOT_SUPPORTED = 30, 50 NVML_ERROR_UNKNOWN = 999 51 } nvmlReturn_t; 52 typedef enum nvmlTemperatureSensors_enum { 53 NVML_TEMPERATURE_GPU = 0, 54 NVML_TEMPERATURE_COUNT = 1 55 } nvmlTemperatureSensors_t; 56 typedef struct nvmlDevice_st *nvmlDevice_t; 57 typedef struct nvmlUtilization_st { 58 unsigned int gpu; 59 unsigned int memory; 60 } nvmlUtilization_t; 61 typedef struct nvmlMemory_st { 62 unsigned long long total; 63 unsigned long long free; 64 unsigned long long used; 65 } nvmlMemory_t; 66 typedef struct nvmlProcessInfo_v2_st { 67 unsigned int pid; 68 unsigned long long usedGpuMemory; 69 unsigned int gpuInstanceId; 70 unsigned int computeInstanceId; 71 } nvmlProcessInfo_v2_t, nvmlProcessInfo_t; 72 nvmlReturn_t nvmlInit_v2(void); 73 nvmlReturn_t nvmlShutdown(void); 74 const char *nvmlErrorString(nvmlReturn_t result); 75 nvmlReturn_t nvmlDeviceGetCount_v2(unsigned int *deviceCount); 76 nvmlReturn_t nvmlDeviceGetHandleByIndex_v2(unsigned int index, nvmlDevice_t *device); 77 nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length); 78 nvmlReturn_t nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length); 79 nvmlReturn_t nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp); 80 nvmlReturn_t nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t *memory); 81 nvmlReturn_t nvmlDeviceGetUtilizationRates(nvmlDevice_t device, nvmlUtilization_t *utilization); 82 nvmlReturn_t nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_v2_t *infos); 83 #ifdef __cplusplus 84 } 85 #endif 86 #endif