You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/21 17:41:27 UTC

[GitHub] [incubator-mxnet] leezu opened a new pull request #17396: refactor: handle mshadow as cmake target

leezu opened a new pull request #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396
 
 
   ## Description ##
   Refactor to localize mshadow related configuration in `3rdparty/mshadow` and expose everything as a cmake target. Previously mshadow was configured with global variables and configuration was placed all around the mxnet cmake file.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [X] Changes are complete (i.e. I finished coding on this PR)
   - [X] All changes have test coverage:
   - Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
   - Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
   - Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
   - [X] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments are documented. 
   - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
   - Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [X] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [X] cmake: handle mshadow as target
   

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584502676
 
 
   Okay, sorry for missing that. I was wondering how does mshadow cmake handling the BLAS build flags like MSHADOW_USE_MKL and how the MKL library statically linked like the logic in mshadow.mk. But seems it another problem now.

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-585026234
 
 
   @TaoLv we can change the behavior, if you recommend to do so. Would you recommend that? 

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584826888
 
 
   > Okay, sorry for missing that. I was wondering how does mshadow cmake handling the BLAS build flags like MSHADOW_USE_MKL and how the MKL library statically linked like the logic in mshadow.mk. But seems it another problem now.
   
   No worries. The `cmake/ChooseBlas.cmake` will be replaced by https://cmake.org/cmake/help/latest/module/FindBLAS.html and https://cmake.org/cmake/help/latest/module/FindLAPACK.html in the future. The build flags like `MSHADOW_USE_MKL` are a separate problem. Do you have any change in mind for them @TaoLv?

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-581190186
 
 
   Ping @yajiedesign @szha

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-581725488
 
 
   Ping @yajiedesign @szha

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584473786
 
 
   There is cmake/ChooseBlas.cmake file. What do you mean? 

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584981511
 
 
   No, I didn't. So at least the default behavior is different from makefile.

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584975088
 
 
   @TaoLv did you try running with `cmake -DMKL_USE_STATIC_LIBS=1 [...]`.
   
   See
   
   https://github.com/apache/incubator-mxnet/blob/7895f93e67dc3e9da360f7a9c667e3c0f1e76c0f/cmake/Modules/FindMKL.cmake#L18-L35

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584970461
 
 
   @leezu, I tried to build mxnet from source code with cmake and found that `libmkl_rt.so` is linked. Previously in makefile, we support both statically and dynamically linking, and statically linking by default.

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] yajiedesign commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
yajiedesign commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584464914
 
 
   LGTM

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-583767813
 
 
   I'll merge this based on lazy consensus in 72 hours.

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584466037
 
 
   Sorry, why there is no BLAS/MKL related instructions in the cmake file? They exist in the Makefile of mshadow. See, https://github.com/apache/incubator-mxnet/blob/master/3rdparty/mshadow/make/mshadow.mk#L74.

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu merged pull request #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu merged pull request #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu edited a comment on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-584826888
 
 
   > Okay, sorry for missing that. I was wondering how does mshadow cmake handling the BLAS build flags like MSHADOW_USE_MKL and how the MKL library statically linked like the logic in mshadow.mk. But seems it another problem now.
   
   No worries. The `cmake/ChooseBlas.cmake` can be refactored based on https://cmake.org/cmake/help/latest/module/FindBLAS.html and https://cmake.org/cmake/help/latest/module/FindLAPACK.html in the future. The build flags like `MSHADOW_USE_MKL` are a separate problem. Do you have any change in mind for them @TaoLv?

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


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #17396: refactor: handle mshadow as cmake target

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #17396: refactor: handle mshadow as cmake target
URL: https://github.com/apache/incubator-mxnet/pull/17396#issuecomment-585530538
 
 
   Personally I will recommend static linking just as the default behavior of makefile. :)

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


With regards,
Apache Git Services