#include <common.h>
-#include <nvml.h>
+/**
+ * Declarations from nvml.h
+ */
+
+typedef struct nvmlDevice_st* nvmlDevice_t;
+
+typedef struct nvmlPciInfo_st {
+ char busId[16];
+ unsigned int domain;
+ unsigned int bus;
+ unsigned int device;
+ unsigned int pciDeviceId;
+ unsigned int pciSubSystemId;
+} nvmlPciInfo_t;
+
+typedef struct nvmlUtilization_st {
+ unsigned int gpu; // GPU kernel execution last second, percent
+ unsigned int memory; // GPU memory read/write last second, percent
+} nvmlUtilization_t;
+
+typedef enum nvmlTemperatureSensors_enum {
+ NVML_TEMPERATURE_GPU = 0 // Temperature sensor for the GPU die
+} nvmlTemperatureSensors_t;
+
+typedef enum nvmlReturn_enum {
+ NVML_SUCCESS = 0, // The operation was successful
+ NVML_ERROR_UNINITIALIZED = 1, // NVML was not first initialized with nvmlInit()
+ NVML_ERROR_INVALID_ARGUMENT = 2, // A supplied argument is invalid
+ NVML_ERROR_NOT_SUPPORTED = 3, // The requested operation is not available on target device
+ NVML_ERROR_NO_PERMISSION = 4, // The current user does not have permission for operation
+ NVML_ERROR_ALREADY_INITIALIZED = 5, // Deprecated: Multiple initializations are now allowed through ref counting
+ NVML_ERROR_NOT_FOUND = 6, // A query to find an object was unsuccessful
+ NVML_ERROR_INSUFFICIENT_SIZE = 7, // An input argument is not large enough
+ NVML_ERROR_INSUFFICIENT_POWER = 8, // A device's external power cables are not properly attached
+ NVML_ERROR_DRIVER_NOT_LOADED = 9, // NVIDIA driver is not loaded
+ NVML_ERROR_TIMEOUT = 10, // User provided timeout passed
+ NVML_ERROR_UNKNOWN = 999 // An internal driver error occurred
+} nvmlReturn_t;
+
+/*
+ * End of declarations from nvml.h
+ **/
typedef nvmlDevice_t HM_ADAPTER_NV;