NVML Header File Missing

好久不见. 提交于 2019-12-23 22:21:32

问题


I am trying to execute some CUDA code which happens to have some NVML library functions like nvmlSystemGetDriverVersion. But, when I try to compile the code it says nvml.h not found. How should I install NVML on my system since nvml.h does not seem to be present on it?


回答1:


A google search of "nvidia nvml" returns this as the first link. This page contains links for the API documentation.

On that page, if you click on the Tesla Deployment Kit link, you can then find the download links appropriate for your OS (windows or linux) and CUDA version (cuda 5.0 or cuda 4.2)

The Tesla Deployment kit contains the header file you mention (nvml.h) as well as some libraries you will probably need to link against, in order to use the NVML functions.

There are sample build projects including makefiles in the Tesla Deployment Kit which should answer any questions about how to compile and link using assets from the kit.

EDIT: there is an example project in .../tdk_3.xxxx/nvml/example There is a sample makefile in that example project directory. If you inspect that makefile, you'll see that to link in the nvml library your compile command will need to include something like:

-L/path/to/nvml/lib64/ -lnvidia-ml


来源:https://stackoverflow.com/questions/16326306/nvml-header-file-missing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!