ChaiBapchya commented on a change in pull request #17297: Fix NCCL Cmake 
autodetect issue
URL: https://github.com/apache/incubator-mxnet/pull/17297#discussion_r369890499
 
 

 ##########
 File path: cmake/Modules/FindNCCL.cmake
 ##########
 @@ -31,7 +31,13 @@
 # install NCCL in the same location as the CUDA toolkit.
 # See https://github.com/caffe2/caffe2/issues/1601
 
-set(NCCL_ROOT_DIR "" CACHE PATH "Folder contains NVIDIA NCCL")
+set(NCCL_ROOT $ENV{NCCL_ROOT} CACHE PATH "Folder contains NVIDIA NCCL")
 
 Review comment:
   @leezu Setting empty string to a cache variable does serve a purpose 
(declaring a variable so as to check if it is set or not in future)
   So if NCCL_ROOT_DIR is not already set then it assigns a default value to it 
(right now since we have deleted this line, if variable is not set via command 
line, it won't exist -> hence can't use it in this file)
   
   Conclusion - we should have that line of empty string as default value for a 
cache variable.
   
   What do you think?
   
   
https://stackoverflow.com/questions/59867283/whats-the-point-of-using-empty-string-to-set-cache-variable-in-cmake/59868538#59868538

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to