fixed hardware monitor for amd/nv (one problem that is still there since last commit: dynamic loading of libnvidia-ml)
This commit is contained in:
@@ -90,7 +90,7 @@ void log_out (FILE *fp, const char *fmt, ...);
|
||||
void log_info (const char *fmt, ...);
|
||||
void log_error (const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
typedef uint32_t uint; // we should rename to u32, sooner or later, for consistency
|
||||
typedef uint64_t u64;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef int bool;
|
||||
|
||||
#include <adl_sdk.h>
|
||||
|
||||
//typedef int HM_ADAPTER;
|
||||
typedef int HM_ADAPTER_AMD;
|
||||
|
||||
#ifdef _POSIX
|
||||
void *GetProcAddress (void *pLibrary, const char *name);
|
||||
|
||||
@@ -8,6 +8,4 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
typedef int HM_ADAPTER;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#include <nvapi.h>
|
||||
|
||||
//typedef NvPhysicalGpuHandle HM_ADAPTER;
|
||||
typedef NvPhysicalGpuHandle HM_ADAPTER_NV;
|
||||
|
||||
int hc_NvAPI_EnumPhysicalGPUs (NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount);
|
||||
int hc_NvAPI_GPU_GetThermalSettings (NvPhysicalGpuHandle hPhysicalGpu, NvU32 sensorIndex, NV_GPU_THERMAL_SETTINGS *pThermalSettings);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <nvml.h>
|
||||
|
||||
//typedef nvmlDevice_t HM_ADAPTER;
|
||||
typedef nvmlDevice_t HM_ADAPTER_NV;
|
||||
|
||||
nvmlReturn_t hc_NVML_nvmlInit (void);
|
||||
nvmlReturn_t hc_NVML_nvmlShutdown (void);
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#define SMI_OK 0
|
||||
#define SMI_NOBIN 1
|
||||
|
||||
typedef int HM_ADAPTER;
|
||||
|
||||
int hc_nvidia_smi (int dev, int *temperature, int *gpu);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2009,34 +2009,32 @@ void logfile_append (const char *fmt, ...);
|
||||
void fsync (int fd);
|
||||
#endif
|
||||
|
||||
/*
|
||||
int hm_get_adapter_index (HM_ADAPTER nvGPUHandle[DEVICES_MAX]);
|
||||
int hm_get_adapter_index_nv (HM_ADAPTER_NV nvGPUHandle[DEVICES_MAX]);
|
||||
|
||||
int get_adapters_num (HM_LIB hm_dll, int *iNumberAdapters);
|
||||
int get_adapters_num_amd (HM_LIB hm_dll, int *iNumberAdapters);
|
||||
|
||||
int hm_get_device_num (HM_LIB hm_dll, HM_ADAPTER hm_adapter_index, int *hm_device_num);
|
||||
int hm_get_device_num (HM_LIB hm_dll, HM_ADAPTER_AMD hm_adapter_index, int *hm_device_num);
|
||||
|
||||
// void hm_get_opencl_busid_devid (hm_attrs_t *hm_device, uint opencl_num_devices, cl_device_id *devices);
|
||||
|
||||
int hm_get_adapter_index (hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
|
||||
int hm_get_adapter_index_amd (hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
|
||||
|
||||
LPAdapterInfo hm_get_adapter_info (HM_LIB hm_dll, int iNumberAdapters);
|
||||
LPAdapterInfo hm_get_adapter_info_amd (HM_LIB hm_dll, int iNumberAdapters);
|
||||
|
||||
uint32_t *hm_get_list_valid_adl_adapters (int iNumberAdapters, int *num_adl_adapters, LPAdapterInfo lpAdapterInfo);
|
||||
|
||||
int hm_get_overdrive_version (HM_LIB hm_dll, hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
|
||||
int hm_check_fanspeed_control (HM_LIB hm_dll, hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
|
||||
|
||||
void hm_close (HM_LIB hm_dll);
|
||||
void hm_close_amd (HM_LIB hm_dll);
|
||||
|
||||
HM_LIB hm_init ();
|
||||
HM_LIB hm_init_amd ();
|
||||
|
||||
int hm_get_temperature_with_device_id (const uint device_id);
|
||||
int hm_get_fanspeed_with_device_id (const uint device_id);
|
||||
int hm_get_utilization_with_device_id (const uint device_id);
|
||||
|
||||
int hm_set_fanspeed_with_device_id (const uint device_id, const int fanspeed);
|
||||
*/
|
||||
int hm_set_fanspeed_with_device_id_amd (const uint device_id, const int fanspeed);
|
||||
|
||||
void myabort ();
|
||||
void myquit ();
|
||||
|
||||
@@ -957,7 +957,10 @@ typedef struct __hc_device_param hc_device_param_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// HM_ADAPTER adapter_index;
|
||||
union {
|
||||
HM_ADAPTER_AMD amd;
|
||||
HM_ADAPTER_NV nv;
|
||||
} adapter_index;
|
||||
|
||||
int od_version;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user