我学会了比nvidia-smi -ac可以用来改变时钟 GPU核心和内存的速率。 nvidia-smi是建立在NVML库的基础上的吗? 自从我检查文档
以来,它在NVML中的等价物是什么http://cyber.sibsutis.ru:82/GPGPU/sdk/CUDA_TOOLKIT/nvml.pdf
但只能看到用于获取时钟速率值的API而不是 设置它们?
由于
答案 0 :(得分:5)
是的,nvidia-smi建立在NVML库上。
根据最新的nvml api文档here(从我之前向您建议的网站链接here)特斯拉K10和K20 GPU支持“设置应用程序时钟”命令(第6页)。我相信Quadro系列的“开普勒”成员也支持它,例如Quadro K5000。
如果你有特斯拉K10,K20或K20X GPU,请在p68上描述设置应用程序时钟命令,为方便起见,我也在这里再现:
7.12.2.2 nvmlReturn_t DECLDIR nvmlDeviceSetApplicationsClocks (nvmlDevice_t device, unsigned int
memClockMHz, unsigned int graphicsClockMHz)
Set clocks that applications will lock to.
Sets the clocks that compute and graphics applications will be running at. e.g. CUDA driver requests these clocks
during context creation which means this property defines clocks at which CUDA applications will be running unless
some overspec event occurs (e.g. over power, over thermal or external HW brake).
Can be used as a setting to request constant performance.
For Tesla ™products, and Quadro ®products from the Kepler family. Requires root/admin permissions.
See nvmlDeviceGetSupportedMemoryClocks and nvmlDeviceGetSupportedGraphicsClocks for details on how to list
available clocks combinations.
After system reboot or driver reload applications clocks go back to their default value.
Parameters:
device The identifier of the target device
memClockMHz Requested memory clock in MHz
graphicsClockMHz Requested graphics clock in MHz
Returns:
• NVML_SUCCESS if new settings were successfully set
• NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized
• NVML_ERROR_INVALID_ARGUMENT if device is invalid or memClockMHz and graphicsClockMHz is
not a valid clock combination
• NVML_ERROR_NO_PERMISSION if the user doesn’t have permission to perform this operation
• NVML_ERROR_NOT_SUPPORTED if the device doesn’t support this feature
• NVML_ERROR_UNKNOWN on any unexpected error