Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -979,3 +979,12 @@ if(BUILD_CYTHON_MODULES)
endif()
endif()

# https://github.com/apache/incubator-mxnet/issues/20145
if(UNIX)
if(USE_NVML)
find_package(NVML)
if(NVML_FOUND)
target_compile_definitions(mxnet PRIVATE NVML_NO_UNVERSIONED_FUNC_DEFS)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

endif()
endif()
endif()