0

我了解到 nvidia-smi -ac 可用于更改 GPU 内核和内存的时钟频率。nvidia-smi 是基于 NVML 库构建的吗?自从我检查了文档以来,它在 NVML 中的等价物是什么

http://cyber.sibsutis.ru:82/GPGPU/sdk/CUDA_TOOLKIT/nvml.pdf

但只能看到用于获取时钟速率值而不是设置它们的 API?

谢谢

4

1 回答 1

6

是的,nvidia-smi 是基于 NVML 库构建的。

根据此处提供的最新 nvml api 文档(链接自我之前向您建议的站点,Tesla K10 和 K20 GPU(第 6 页)支持“设置应用程序时钟”命令。我相信它也支持 Quadro 家族的“Kepler”成员,例如 Quadro K5000。

如果您有 Tesla 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
于 2013-05-03T21:28:15.773 回答