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

 ##########
 File path: cmake/Modules/FindNCCL.cmake
 ##########
 @@ -33,6 +33,23 @@
 
 set(NCCL_ROOT_DIR "" CACHE PATH "Folder contains NVIDIA NCCL")
 
+# first check in the /usr/local/cuda before other paths
 
 Review comment:
   Quoting from https://cmake.org/cmake/help/latest/command/find_path.html
   
   > This command is used to find a directory containing the named file. A 
cache entry named by `<VAR>` is created to store the result of this command. If 
the file in a directory is found the result is stored in the variable and the 
search will not be repeated unless the variable is cleared. If nothing is 
found, the result will be `<VAR>-NOTFOUND`, and the search will be attempted 
again the next time find_path is invoked with the same variable.
   
   Thus if there is some `nccl.h` at `/usr/local/cuda` but the user specifies 
`NCCL_ROOT_DIR=/home/ubuntu/myversionofnccl`, the `/usr/local/cuda` is wrongly 
used? Or do I misunderstand the doc? 
   
   Btw, as per https://cmake.org/cmake/help/latest/policy/CMP0074.html 
`NCCL_ROOT_DIR` should probably be called `NCCL_ROOT` (or `NCCL_ROOT` should be 
added in addition to `NCCL_ROOT_DIR`).

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


With regards,
Apache Git Services

Reply via email to