Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Add support to AArch64 wheel #93

Merged
merged 3 commits into from Sep 26, 2020

Conversation

odidev
Copy link
Contributor

@odidev odidev commented Aug 13, 2020

fixes #11170

Added job to build AArch64 wheel

@odidev odidev force-pushed the scipy-wheel-support-aarch64 branch from 1264884 to e446ac4 Compare August 13, 2020 15:11
Copy link
Collaborator

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

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

The single test failure on other platforms is not related, but is probably the reason why the second stage (the actual ARM tests) does not get run.

.travis.yml Outdated
@@ -28,6 +28,24 @@ jobs:
# Exclude the default Python 3.5 build
- python: 3.5
include:
- stage: Build and test wheel
os: linux
arch: arm64
Copy link
Collaborator

Choose a reason for hiding this comment

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

@janaknat mentioned in #92 that arm64-graviton2 may produce faster builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stages run sequentially and if any of the stage is failing, the remaining stages will not run.

Copy link
Contributor Author

@odidev odidev Aug 14, 2020

Choose a reason for hiding this comment

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

I can see the scipy-wheel builds are running on travis-ci.org and arm64-graviton2 is available only on travis-ci.com. Please have a look at the discussion here. Using arm64-graviton2 will require scipy-wheel builds to migrate on travis-ci.com. Also, the method/configuration to use arm64-graviton2 is not officially declared.

Choose a reason for hiding this comment

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

Travis.com offers free usage to public/OSS repositories, and the migration should be simple as long as this project does not have any weird dependencies. Its highly recommended to move sooner rather than later as .com is the only platform that will offer arm64 builds on graviton2 instances.

@tylerjereddy
Copy link
Collaborator

close/reopen to pull in latest master after scipy/scipy#12765

config.sh Outdated
local testmode="full"
else
local testmode="fast"
fi
# Check bundled license file
python ../check_installed_package.py
# Run tests
python ../run_scipy_tests.py $testmode -- -n2 -rfEX
python ../run_scipy_tests.py $testmode -- -n8 -rfEX
Copy link
Collaborator

Choose a reason for hiding this comment

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

I tried restarting the single travis CI matrix entry failure which is this:

worker 'gw5' crashed while running 'signal/tests/test_signaltools.py::TestConvolve2d::test_large_array'

This makes me wonder if this -n8 multi-core test setting is being applied to all jobs and not just the ARM64 job? If so, we'd probably want to revert that--I think regular Travis for x86_64 tends to provide ~2 cores? Maybe that's part of the reason for that strange crash?

Copy link
Collaborator

Choose a reason for hiding this comment

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

To clarify, can we just bump up the number of cores used for ARM only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now bumping up the number of cores used for ARM only.

@odidev odidev force-pushed the scipy-wheel-support-aarch64 branch from bf330d6 to bb7e3e9 Compare August 27, 2020 11:32
@odidev
Copy link
Contributor Author

odidev commented Aug 27, 2020

PR is hitting issue: "No output has been received in the last 10m0s" however it was passing before. I think it's better to migrate on travis-ci.com to use arm64-graviton2 to speedup Arm64 build/test.
@tylerjereddy, @rgommers can you please re-trigger the only job in "Test wheel" stage?

@janaknat
Copy link
Contributor

@odidev @tylerjereddy The build and test with arm64-graviton2 log: https://travis-ci.com/github/janaknat/scipy-wheels/builds/181513477 . Takes around 35 min for build+test. But this is with '-n 8' for the tests.

@tylerjereddy
Copy link
Collaborator

I restarted the job that timed out; not sure on the travis-ci.com migration yet

@odidev
Copy link
Contributor Author

odidev commented Sep 1, 2020

This PR is blocked with build/test timeout and only the migration on the travis-ci.com can resolve this blocker. May I know the plan for migration to the travis-ci.com?

@tylerjereddy
Copy link
Collaborator

IIRC bumping to the new travis website might involve the entire organization ("MacPython"). I don't have a sense for how hard that would be to coordinate or how disruptive it might be. cc @mattip @charris @rgommers @matthew-brett

@mattip
Copy link
Contributor

mattip commented Sep 1, 2020

🤷 Can we start a new org, add all the admins, and migrate projects one at a time?

@geoffreyblake
Copy link

geoffreyblake commented Sep 1, 2020

Hi @tylerjereddy , would there be issues migrating repos one at a time (increased limits, special settings)? I know that the PSF, PyCA, and PyPA had some interesting settings in Travis-ci.org, but with some help from Travis they made the migration in a couple hours and everything is working smoothly: See pyca/cryptography#5292

At least from the Travis-ci documentation, migrating a single repo looks rather painless: https://docs.travis-ci.com/user/migrate/open-source-repository-migration

@tylerjereddy
Copy link
Collaborator

@geoffreyblake If we did decide to do that, would I have sufficient permissions to initiate it as a "collaborator?"

@geoffreyblake
Copy link

@tylerjereddy , I am not sure. I would suspect you need to have higher privileges to connect Travis-CI.com to the repository. We need the attention of someone with such privileges to chime in here. To get the attention of Travis folks, for help, you can reach out to #embassy channel on Slack.

@mustafa-travisci and @michal-at-travisci are two github users that can definitely help with explaining who needs to help with the migration.

@mattip
Copy link
Contributor

mattip commented Sep 5, 2020

I tried signing up for travis-ci.com, but it wants read-write access to all my repos, public and private. Not gonna do that, sorry. So I would like to add my "robot" multibuilder user (that I created to build docker wheels for multibuild) to the MacPython org, and link all their (multibuilder's) repos instead. Does that seem reasonable? Ping @matthew-brett to weigh in on alternatives.

@mattip
Copy link
Contributor

mattip commented Sep 5, 2020

I could start by just adding multibuilder to this repo

@tylerjereddy
Copy link
Collaborator

Yeah, if Matthew Brett or Ralf or someone else has an opinion that might be helpful. I'm perhaps a little nervous about changes to the wheels repo just because it can drain a lot of time to move things around, and sometimes we don't really realize the full extent of issues until it becomes release crunch time.

@rgommers
Copy link
Contributor

rgommers commented Sep 8, 2020

I could start by just adding multibuilder to this repo

Looks like this doesn't help much; you have your own personal bot, but how do the rest of us log in to travis-ci.com? I just tried and it indeed wants write access to everything, including code (unlike what the TravisCI docs say).

@mattip
Copy link
Contributor

mattip commented Sep 8, 2020

As far as I can tell, anyone can see the build jobs, like here, but only the travis ci owner can restart a build or a job. I don't think travis.com has an "organization" concept. I think that is also true for the current travis.org situation as well?

@geoffreyblake
Copy link

In an effort to help, I pinged a contact I have at Travis-CI and was sent this PR to their own documentation: travis-ci/docs-travis-ci-com#2886

Hopefully this aids in clarifying some how to do the migration?

@janaknat
Copy link
Contributor

Travis-CI Graviton2 General Availability blog post: https://blog.travis-ci.com/2020-09-11-arm-on-aws

@mattip
Copy link
Contributor

mattip commented Sep 14, 2020

@geoffreyblake @janaknat do you have a solution to the problem of logging in to travis-ci.com without giving read-write permissions to all your github repos? Until there is a way to restart builds without giving such wide permissions, it will be hard to recommend travis-ci.com as a viable CI platform.

@tylerjereddy
Copy link
Collaborator

Not sure if the drone.io CI service is any better, but I believe OpenBLAS was using them for ARM.

@mattip
Copy link
Contributor

mattip commented Sep 24, 2020

OK, thanks @tylerjereddy. It was more of a question of "should I" rather than "can I", but I guess you approve of the approach. I will migrate the build to travis-ci.com under the multibuilder user.

@mattip
Copy link
Contributor

mattip commented Sep 24, 2020

For some reason https://travis-ci.com/dashboard is not showing this repo for the multibuilder user, even though I made that user a "maintainer" of this repo. I opened a support ticket with travis-ci.com and am waiting for a reply.

@tylerjereddy
Copy link
Collaborator

Thanks Matti, I imagine a few things will break but sounds like we need to do it eventually anyway.

@multibuilder
Copy link
Collaborator

The answer is that travis-ci.com requires the organization not the repo, so the user must have some status in the organization (hopefully less than admin), and they pointed me to this guide for migrating https://docs.travis-ci.com/user/migrate/open-source-repository-migration#the-migration-steps. I just am putting it up here, I haven't read it yet. I have enough permissions to do what needs to be done, I will try to work through this over the next while.

@mattip
Copy link
Contributor

mattip commented Sep 24, 2020

The integration should be live. Close/reopen, let's see if it triggers

@mattip mattip closed this Sep 24, 2020
@mattip mattip reopened this Sep 24, 2020
@mattip
Copy link
Contributor

mattip commented Sep 24, 2020

Can anyone else see the pipeline running on travis-ci.com https://travis-ci.com/github/MacPython/scipy-wheels/builds/186521682? As @mattip I can see it with no control options, as @multibuilder I can cancel/trigger builds, set up cron jobs, add secrets, ...

@janaknat
Copy link
Contributor

@mattip I can see the pipeline running on travis-ci.com

@charris
Copy link
Contributor

charris commented Sep 24, 2020

I can see it, and after logging into travis-ci, I can see the controls.

@tylerjereddy
Copy link
Collaborator

I can see it, and after logging into travis-ci, I can see the controls.

Same here--looks like I can do restarts and add secret variables, which are probably the main things.

@multibuilder
Copy link
Collaborator

@odidev tests are running on travis-ci.com but stalling on ARM64. Did you really want to test with 8 parallel threads?

@tylerjereddy
Copy link
Collaborator

I think they were hoping to switch to the new graviton hardware on travis-ci.com, unless that happens without even making a yml change

@janaknat
Copy link
Contributor

@tylerjereddy I can post a PR with the Graviton yml change.

@mattip
Copy link
Contributor

mattip commented Sep 24, 2020

@janaknat you could either comment here what needs to change or make a PR against https://github.com/odidev/scipy-wheels/tree/scipy-wheel-support-aarch64 (the source branch of this PR)

@janaknat
Copy link
Contributor

@mattip I've created a PR against @odidev 's source branch.

PR: odidev#1

Add config to build wheels using Graviton2
@mattip
Copy link
Contributor

mattip commented Sep 26, 2020

whoohoo, it's green

@rgommers
Copy link
Contributor

This is awesome, thanks everyone! I just read the thread and the Graviton2 blog post, all looks like really good news. I haven't followed all the technical details over the past two weeks here, so if anyone else (@tylerjereddy ?) who paid better attention wants to hit the green button now, please do!

@tylerjereddy
Copy link
Collaborator

Yeah, looks good, merging, thanks all!

Once there's a "prototype" ARM wheel available from the anaconda upload site it should empower more downstream projects to test with ARM64 workflows in their CI (no time lost building NumPy/SciPy from source in pip-based workflow).

@janaknat
Copy link
Contributor

@tylerjereddy Is there a timeline for when the aarch64 wheels will be available from PyPI?

@tylerjereddy
Copy link
Collaborator

@janaknat Technically our next major release is ~December; I believe the consensus was not to try backporting the new wheel arch for 1.5.x series (there's a thread in the main SciPy repo about this) because it can cause strange issues in some toolchains when the full complement of support wheel archs changes..

Note that the wheel is currently only building for one version of Python, so we'll likely need to expand that to 3.7, 3.8, and 3.9 (when stable release) for it to be part of the release. In the interim, I've already started using the temporary wheel artifact produced by the work in dowstream ARM64 CI like here: MDAnalysis/mdanalysis#2956

@janaknat
Copy link
Contributor

@tylerjereddy I can add the changes for the other python versions. Is there way to have the aarch64 wheels released sooner? A number of other packages depend on scipy.

@mattip
Copy link
Contributor

mattip commented Sep 29, 2020

One thing CFFI discovered is that PyPI and pip accepts a version number in a <major>.<minor>.<patch>-<build-number> format, like for their 1.14.3 release. pip will look for the last <build-number> number (if any) so you can layer a new release on top of an older one. You can even just rename the wheel adding a consecutive <build-number>, at least according to this stack overflow answer

Edit: PEP 427 calls it a build tag

@janaknat
Copy link
Contributor

@tylerjereddy Any suggestions?

@tylerjereddy
Copy link
Collaborator

@janaknat I think it will take some convincing that we really don't have an issue to worry about--see this discussion: scipy/scipy#11170 (comment)

@tylerjereddy
Copy link
Collaborator

Also, keep in mind it generates a fair bit of work for me since the backport of all the ARM64 shims is pretty much guaranteed to run into some problems on the older feature branch (in both the main AND the wheels repo feature branches).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use manylinux2014 to get aarch64/ppc64le support
10 participants