-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Define NVML_NO_UNVERSIONED_FUNC_DEFS #20146
Conversation
Hey @Zha0q1 , Thanks for submitting the PR
CI supported jobs: [centos-cpu, clang, website, centos-gpu, unix-gpu, miscellaneous, unix-cpu, sanity, edge, windows-cpu, windows-gpu] Note: |
@mxnet-bot run ci [all] |
Jenkins CI successfully triggered : [windows-gpu, unix-cpu, website, edge, sanity, unix-gpu, centos-gpu, centos-cpu, clang, miscellaneous, windows-cpu] |
@mxnet-bot run ci [all] |
Jenkins CI successfully triggered : [edge, windows-cpu, miscellaneous, unix-gpu, windows-gpu, website, sanity, unix-cpu, centos-gpu, clang, centos-cpu] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
if(USE_NVML) | ||
find_package(NVML) | ||
if(NVML_FOUND) | ||
target_compile_definitions(mxnet PRIVATE NVML_NO_UNVERSIONED_FUNC_DEFS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving this to line 595 above and avoid duplication of the nested ifs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add this compile def after https://github.com/apache/incubator-mxnet/blob/2cd1b4666d4e6d5df20bc139012061ef0d2e1a37/CMakeLists.txt#L656-L660. In fact I tried what you suggested and got into this error
[2021-04-08T23:00:06.226Z] CMake Error at CMakeLists.txt:600 (target_compile_definitions):
[2021-04-08T23:00:06.226Z] Cannot specify compile definitions for target "mxnet" which is not built by
[2021-04-08T23:00:06.226Z] this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. So you can consider add it after line 660, or move 656-660 to an earlier location in the file. It's not necessary to do it now.
fixes #20145