Zha0q1 commented on a change in pull request #20146:
URL: https://github.com/apache/incubator-mxnet/pull/20146#discussion_r611928255



##########
File path: CMakeLists.txt
##########
@@ -980,4 +980,11 @@ if(BUILD_CYTHON_MODULES)
 endif()
 
 # https://github.com/apache/incubator-mxnet/issues/20145
-target_compile_definitions(mxnet PRIVATE NVML_NO_UNVERSIONED_FUNC_DEFS)
+if(UNIX)
+    if(USE_NVML)
+      find_package(NVML)
+      if(NVML_FOUND)
+         target_compile_definitions(mxnet PRIVATE 
NVML_NO_UNVERSIONED_FUNC_DEFS)

Review comment:
       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.
   
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to