From 9296d5218e7122f2ab057b87d450ce1464ceb8db Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Tue, 21 Jun 2016 03:35:57 +0200 Subject: [PATCH] nvml: remove autoboost functions, unsupported not for GTX pascal neither... --- nvml.cpp | 19 ------------------- nvml.h | 5 +---- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/nvml.cpp b/nvml.cpp index c75cd59..09b9a7b 100644 --- a/nvml.cpp +++ b/nvml.cpp @@ -196,19 +196,12 @@ nvml_handle * nvml_create() nvmlh->nvmlDeviceSetCpuAffinity = (nvmlReturn_t (*)(nvmlDevice_t)) wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceSetCpuAffinity"); #endif - /* NVML_ERROR_NOT_SUPPORTED - nvmlh->nvmlDeviceGetAutoBoostedClocksEnabled = (nvmlReturn_t (*)(nvmlDevice_t, nvmlEnableState_t *isEnabled, nvmlEnableState_t *defaultIsEnabled)) - wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceGetAutoBoostedClocksEnabled"); - nvmlh->nvmlDeviceSetAutoBoostedClocksEnabled = (nvmlReturn_t (*)(nvmlDevice_t, nvmlEnableState_t enabled)) - wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceSetAutoBoostedClocksEnabled"); */ // v346 nvmlh->nvmlDeviceGetPcieThroughput = (nvmlReturn_t (*)(nvmlDevice_t, nvmlPcieUtilCounter_t, unsigned int *value)) wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceGetPcieThroughput"); // v36x (API 8 / Pascal) nvmlh->nvmlDeviceGetClock = (nvmlReturn_t (*)(nvmlDevice_t, nvmlClockType_t clockType, nvmlClockId_t clockId, unsigned int *clockMHz)) wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceGetClock"); - nvmlh->nvmlDeviceGetMaxCustomerBoostClock = (nvmlReturn_t (*)(nvmlDevice_t, nvmlClockType_t clockType, unsigned int *clockMHz)) - wrap_dlsym(nvmlh->nvml_dll, "nvmlDeviceGetMaxCustomerBoostClock"); if (nvmlh->nvmlInit == NULL || nvmlh->nvmlShutdown == NULL || @@ -573,18 +566,6 @@ void nvml_print_device_info(int dev_id) if (rc == NVML_SUCCESS) { fprintf(stderr, LSTDEV_PFX "CURRENT MEM %4u GPU %4u MHz\n", mem_clk, gpu_clk); } - // NVML_ERROR_NOT_SUPPORTED on Maxwell (361.62) - hnvml->nvmlDeviceGetClock(hnvml->devs[n], NVML_CLOCK_GRAPHICS, NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, &gpu_clk); - rc = hnvml->nvmlDeviceGetClock(hnvml->devs[n], NVML_CLOCK_MEM, NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, &mem_clk); - if (rc == NVML_SUCCESS) { - fprintf(stderr, LSTDEV_PFX "BOOSTED MEM %4u GPU %4u MHz\n", mem_clk, gpu_clk); - } - // NVML_ERROR_NOT_SUPPORTED on Maxwell (361.62) - hnvml->nvmlDeviceGetMaxCustomerBoostClock(hnvml->devs[n], NVML_CLOCK_GRAPHICS, &gpu_clk); - rc = hnvml->nvmlDeviceGetMaxCustomerBoostClock(hnvml->devs[n], NVML_CLOCK_MEM, &mem_clk); - if (rc == NVML_SUCCESS) { - fprintf(stderr, LSTDEV_PFX "MXBOOST MEM %4u GPU %4u MHz\n", mem_clk, gpu_clk); - } } } diff --git a/nvml.h b/nvml.h index 2603603..a132bc1 100644 --- a/nvml.h +++ b/nvml.h @@ -41,7 +41,7 @@ enum nvmlEnableState_t { enum nvmlRestrictedAPI_t { NVML_RESTRICTED_API_SET_APPLICATION_CLOCKS = 0, - NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS = 1, + NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS = 1, // not for GTX cards NVML_RESTRICTED_API_COUNT = 2 }; @@ -165,13 +165,10 @@ typedef struct { nvmlReturn_t (*nvmlDeviceGetCpuAffinity)(nvmlDevice_t, unsigned int cpuSetSize, unsigned long* cpuSet); nvmlReturn_t (*nvmlDeviceSetCpuAffinity)(nvmlDevice_t); #endif - nvmlReturn_t (*nvmlDeviceGetAutoBoostedClocksEnabled)(nvmlDevice_t, nvmlEnableState_t *isEnabled, nvmlEnableState_t *defaultIsEnabled); - nvmlReturn_t (*nvmlDeviceSetAutoBoostedClocksEnabled)(nvmlDevice_t, nvmlEnableState_t enabled); // v346 nvmlReturn_t (*nvmlDeviceGetPcieThroughput)(nvmlDevice_t, nvmlPcieUtilCounter_t, unsigned int *value); // v36x (API 8) nvmlReturn_t (*nvmlDeviceGetClock)(nvmlDevice_t, nvmlClockType_t clockType, nvmlClockId_t clockId, unsigned int *clockMHz); - nvmlReturn_t (*nvmlDeviceGetMaxCustomerBoostClock)(nvmlDevice_t, nvmlClockType_t clockType, unsigned int *clockMHz); #ifdef __linux__ nvmlReturn_t (*nvmlSystemGetTopologyGpuSet)(unsigned int cpuNumber, unsigned int *count, nvmlDevice_t *deviceArray); nvmlReturn_t (*nvmlDeviceGetTopologyNearestGpus)(nvmlDevice_t, nvmlGpuTopologyLevel_t level, unsigned int *count, nvmlDevice_t *deviceArray);