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



##########
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:
       How about moving this to line 595 above and avoid duplication of the 
nested ifs?




-- 
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