Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

[v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build#20318

Merged
Zha0q1 merged 7 commits intoapache:v1.xfrom
mseth10:aarch64-build
Jun 1, 2021
Merged

[v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build#20318
Zha0q1 merged 7 commits intoapache:v1.xfrom
mseth10:aarch64-build

Conversation

@mseth10
Copy link
Contributor

@mseth10 mseth10 commented May 27, 2021

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

  • Add LSE support to glibc with the package libc6-lse.
  • Use build flag -march=armv8-a+crc+crypto instead of -march=armv8 earlier to get the benefit of crc and crypto extension.
  • Install gcc-8 (gcc-8.4) as openblas build fails with gcc-8.5 and so using gcc-8.4 to build it.

@mxnet-bot
Copy link

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.

@mseth10 mseth10 added the pr-awaiting-testing PR is reviewed and waiting CI build and test label May 27, 2021
@mseth10 mseth10 requested review from leezu and removed request for aaronmarkham and marcoabreu May 27, 2021 21:27
Copy link
Contributor

@Zha0q1 Zha0q1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mseth10 mseth10 added pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 27, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 27, 2021
@mseth10
Copy link
Contributor Author

mseth10 commented May 28, 2021

@mxnet-bot run ci [centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 28, 2021
@mseth10
Copy link
Contributor Author

mseth10 commented May 28, 2021

@mxnet-bot run ci [unix-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-gpu]

@mseth10 mseth10 removed the pr-work-in-progress PR is still work in progress label May 28, 2021
@mseth10 mseth10 added the pr-awaiting-testing PR is reviewed and waiting CI build and test label May 28, 2021
Comment on lines 39 to 40
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried updating openblas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@leezu leezu May 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mseth10 mseth10 added pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 28, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test and removed pr-work-in-progress PR is still work in progress labels May 28, 2021
@mseth10 mseth10 added pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress labels May 28, 2021
@Zha0q1 Zha0q1 merged commit 14d8a9e into apache:v1.x Jun 1, 2021
@Zha0q1
Copy link
Contributor

Zha0q1 commented Jun 1, 2021

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

waytrue17 pushed a commit to waytrue17/incubator-mxnet that referenced this pull request Jun 4, 2021
* use gcc-8.5 instead of gcc-10 with outline-atomics flag

* debug openblas

* fix apt install

* use gcc-7 for openblas

* use gcc-8.4 for openblas

* update openblas

* remove gcc-8 as no longer required
waytrue17 pushed a commit to waytrue17/incubator-mxnet that referenced this pull request Jun 4, 2021
* use gcc-8.5 instead of gcc-10 with outline-atomics flag

* debug openblas

* fix apt install

* use gcc-7 for openblas

* use gcc-8.4 for openblas

* update openblas

* remove gcc-8 as no longer required
mseth10 added a commit that referenced this pull request Jun 5, 2021
…20333)

* [v1.x] [CD] Add Aarch64 to cd (#20288)

* add initial cd changes for aarch64

* skip failing aarch64 tests

* skip failing aarch64 tests

* add cd wheel support

* add aarch64 node to cd pypi

* fix dockerfile for aarch64

* fix dockerfile for aarch64

* refer github issue for failing tests

* update pypi package name

* add requirements file for aarch64 for cd docker

* [v1.x] Enable MKLDNN + APL Integration in CD (#20294)

* initial

* Update python_images.sh

* Update python_images.sh

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update AARCH64_CPU_ADDITIONAL.md

* Update pip.md

* Update pip.md

* [v1.x] use gcc-8.5 instead of gcc-10 for aarch64 build (#20318)

* use gcc-8.5 instead of gcc-10 with outline-atomics flag

* debug openblas

* fix apt install

* use gcc-7 for openblas

* use gcc-8.4 for openblas

* update openblas

* remove gcc-8 as no longer required

* [v1.x] Update openblas version to 0.3.15 (#20328)

* update apl version

Co-authored-by: Manu Seth <22492939+mseth10@users.noreply.github.com>
Co-authored-by: Zhaoqi Zhu <zhaoqizhu96@gmail.com>
Co-authored-by: Wei Chu <weichu@amazon.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-awaiting-review PR is waiting for code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants