@ -330,6 +330,16 @@ int wrap_nvml_get_pstate(wrap_nvml_handle *nvmlh, int cudaindex, int *pstate)
@@ -330,6 +330,16 @@ int wrap_nvml_get_pstate(wrap_nvml_handle *nvmlh, int cudaindex, int *pstate)
@ -445,6 +455,15 @@ int nvapi_getpstate(unsigned int devNum, unsigned int *power)
@@ -445,6 +455,15 @@ int nvapi_getpstate(unsigned int devNum, unsigned int *power)
return0;
}
intnvapi_getbusid(unsignedintdevNum,int*busid)
{
if(devNum>=0&&devNum<=8){
(*busid)=device_bus_ids[devNum];
return0;
}
return-1;
}
intwrap_nvapi_init()
{
NvAPI_Statusret=NvAPI_Initialize();
@ -578,6 +597,22 @@ int gpu_pstate(struct cgpu_info *gpu)
@@ -578,6 +597,22 @@ int gpu_pstate(struct cgpu_info *gpu)