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 2021/05/27 21:24:36 UTC

[GitHub] [incubator-mxnet] mseth10 opened a new pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

mseth10 opened a new pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318


   ## Description ##
   In order to get the advantage of LSE support while supporting all AArch64 platforms, we used gcc-10 on u18 base docker image as it supports the build flag `-moutline-atomics`. But using gcc-10 also creates a dependency of generated MXNet wheel on GLIBCXX_3.4.26, and so we need to upgrade libstdc++6 package on u18 to get the wheel working. On u20, the wheel works fine.
   
   2 weeks ago gcc-8.5 was launched that added support for the build flag `-moutline-atomics`. Since there is no ubuntu/canonical package for gcc-8.5, I tried building it from source and it works, with the advantage over gcc-10 that we dont need to upgrade libstdc++6 on u18.
   
   ### Changes ###
   - [x] Add LSE support to glibc with the package `libc6-lse`.
   - [x] Use build flag `-march=armv8-a+crc+crypto` instead of `-march=armv8` earlier to get the benefit of crc and crypto extension.
   - [x] Install gcc-8 (gcc-8.4) as openblas build fails with gcc-8.5 and so using gcc-8.4 to build it.
   


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



[GitHub] [incubator-mxnet] Zha0q1 merged pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
Zha0q1 merged pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318


   


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-850026667


   Jenkins CI successfully triggered : [unix-gpu]


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



[GitHub] [incubator-mxnet] leezu commented on a change in pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#discussion_r641074088



##########
File path: tools/dependencies/openblas.sh
##########
@@ -33,7 +33,12 @@ if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||
     cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
 
     # Adding NO_DYNAMIC=1 flag causes make install to fail
-    CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    if [[ ! $ARCH == 'aarch64' ]]; then
+        CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    else
+        # openblas build fails with gcc-8.5, hence using gcc-8.4 explicitly
+        CXX="g++-8 -fPIC" CC="gcc-8 -fPIC" FC="gfortran-8" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1

Review comment:
       Have you tried updating openblas?




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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-850022624


    @mxnet-bot run ci [centos-gpu]


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-850022654


   Jenkins CI successfully triggered : [centos-gpu]


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



[GitHub] [incubator-mxnet] leezu commented on a change in pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#discussion_r641649899



##########
File path: tools/dependencies/openblas.sh
##########
@@ -33,7 +33,12 @@ if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||
     cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
 
     # Adding NO_DYNAMIC=1 flag causes make install to fail
-    CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    if [[ ! $ARCH == 'aarch64' ]]; then
+        CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    else
+        # openblas build fails with gcc-8.5, hence using gcc-8.4 explicitly
+        CXX="g++-8 -fPIC" CC="gcc-8 -fPIC" FC="gfortran-8" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1

Review comment:
       Great! Would you consider v0.3.15? I see there are a couple of ARM-specific fixes in between of v0.3.10 and v0.3.15 including "Fixed segmentation faults in DYNAMIC_ARCH builds" which would affect us as we use DYNAMIC_ARCH=1 




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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-849952256


   Hey @mseth10 , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [website, centos-gpu, centos-cpu, windows-gpu, miscellaneous, unix-gpu, windows-cpu, sanity, unix-cpu, edge, clang]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


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



[GitHub] [incubator-mxnet] mseth10 commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mseth10 commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-850026649


   @mxnet-bot run ci [unix-gpu]


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



[GitHub] [incubator-mxnet] leezu commented on a change in pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#discussion_r641649899



##########
File path: tools/dependencies/openblas.sh
##########
@@ -33,7 +33,12 @@ if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||
     cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
 
     # Adding NO_DYNAMIC=1 flag causes make install to fail
-    CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    if [[ ! $ARCH == 'aarch64' ]]; then
+        CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    else
+        # openblas build fails with gcc-8.5, hence using gcc-8.4 explicitly
+        CXX="g++-8 -fPIC" CC="gcc-8 -fPIC" FC="gfortran-8" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1

Review comment:
       Great! Would you consider v0.3.15? I see there are a couple of arm fixes in between of v0.3.10 and v0.3.15 including "Fixed segmentation faults in DYNAMIC_ARCH builds" which would affect us as we use DYNAMIC_ARCH=1 




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



[GitHub] [incubator-mxnet] Zha0q1 commented on pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#issuecomment-851753073


   Merging this pr for now so I can base the APL changes to this commit. We can update openblas in another pr


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



[GitHub] [incubator-mxnet] mseth10 commented on a change in pull request #20318: [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build

Posted by GitBox <gi...@apache.org>.
mseth10 commented on a change in pull request #20318:
URL: https://github.com/apache/incubator-mxnet/pull/20318#discussion_r641315692



##########
File path: tools/dependencies/openblas.sh
##########
@@ -33,7 +33,12 @@ if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||
     cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
 
     # Adding NO_DYNAMIC=1 flag causes make install to fail
-    CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    if [[ ! $ARCH == 'aarch64' ]]; then
+        CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
+    else
+        # openblas build fails with gcc-8.5, hence using gcc-8.4 explicitly
+        CXX="g++-8 -fPIC" CC="gcc-8 -fPIC" FC="gfortran-8" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1

Review comment:
       Tried OpenBLAS v0.3.10 (same version as master) and it works with gcc-8.5 , updated it. Thanks for the suggestion.




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