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

 ##########
 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:
   @ChaiBapchya Thank you!
   
   After reading CMP0074 again,
   > [...] now searches prefixes specified by the `<PackageName>_ROOT` CMake 
variable and the `<PackageName>_ROOT` environment variable. Package roots are 
maintained as a stack so nested calls to all find_* commands inside find 
modules and config packages also search the roots as prefixes.
   
   seems to imply that it's not necessary to list `NCCL_ROOT` as part of 
`find_path` and `find_library`, but rather it's done automatically. Do you 
understand it in the same way?
   Also 
https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure 
(paragraph "The set of installation prefixes is constructed using the following 
steps [...]") suggests this.
   
   If so,  `set(NCCL_ROOT $ENV{NCCL_ROOT} CACHE PATH "Folder contains NVIDIA 
NCCL")` would be superfluous. Also it seems none of the other Find modules 
check the `X_LIB_DIR` and `X_LIB_DIR` env variables.

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