Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add loongarch64 platform support #183

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

wojiushixiaobai
Copy link
Contributor

  • I updated the version in pyproject.toml and made sure it matches git describe --tags --abbrev=8 in OpenBLAS at the OPENBLAS_COMMIT

@wojiushixiaobai
Copy link
Contributor Author

# https://github.com/loong64/buildwheel/actions/runs/12577757574/job/35055581474
python3.11 -m scipy_openblas32
OpenBLAS using 'OpenBLAS 0.3.28 DYNAMIC_ARCH NO_AFFINITY loongson3r5 MAX_THREADS=64'

# https://github.com/loong64/buildwheel/actions/runs/12577757574/job/35055581563
python3.11 -m scipy_openblas64
OpenBLAS using 'OpenBLAS 0.3.28  USE64BITINT DYNAMIC_ARCH NO_AFFINITY loongson3r5 MAX_THREADS=64'

@mattip
Copy link
Collaborator

mattip commented Jan 3, 2025

~I don't understand the relevance of your comment about loong64/buildwheel/actions

Does PyPI support uploading loongarch wheels? ~

Ahh, I see. There is a private registry of loongarch packages at https://gitlab.com/loong64/pypi/-/packages/.

@mattip
Copy link
Collaborator

mattip commented Jan 3, 2025

I am not sure how this will work. It will upload packages to https://anaconda.org/scientific-python-nightly-wheels, then how will users be able to download them? I think it would be worth putting some effort into getting this platform recognized, as discussed in https://discuss.python.org/t/pypi-supports-loongarchs-wheel-what-should-we-do/26253 before moving further forward.

@wojiushixiaobai
Copy link
Contributor Author

wojiushixiaobai commented Jan 3, 2025

Thank you for your reply.
All I want to do is to make cipy_openblas compile on loongarch64. In the short term, we will upload it to a separate pypi repository for management.
I mean "unofficial builds" so that no code patches are needed for every update.

@mattip
Copy link
Collaborator

mattip commented Jan 3, 2025

All I want to do is to make scipy_openblas compile on loongarch64.

In order to test the code you added, you will need to enable a loongarch64 job. You can add it like the aarch64 ones which also run in a qemu docker

- os: ubuntu-latest
PLAT: aarch64
INTERFACE64: '0'
MB_ML_VER: '2014'
- os: ubuntu-latest
PLAT: aarch64
INTERFACE64: '1'
MB_ML_VER: '2014'
- os: ubuntu-latest
PLAT: aarch64
INTERFACE64: '0'
MB_ML_LIBC: musllinux
MB_ML_VER: _1_1

@wojiushixiaobai
Copy link
Contributor Author

Alright, I have added loongarch64 builds to GitHub Actions,

However, this will add additional build overhead. My initial thought was to have the loong64 organization handle the builds and hosting.

@rgommers
Copy link
Collaborator

rgommers commented Jan 4, 2025

However, this will add additional build overhead. My initial thought was to have the loong64 organization handle the builds and hosting.

That seemed quite reasonable to me, and less work than adding CI here. But happy with merging this either way, @mattip is the main maintainer here so whatever he thinks is best.

@mattip
Copy link
Collaborator

mattip commented Jan 5, 2025

I see two choices: either we accept changes for loongarch64 in build_steps.sh, test run those changes here, and provide wheels on anaconda.org, or the loongarch64 organization manages them on their side. We are very unlikely to break the small patch with future changes.

Truthfully, I would be happy if the loongarch64 organization put effort toward integrating with the "regular" infrastructure with a PEP to add that architecture to packaging and PyPI and manylinux.

@wojiushixiaobai
Copy link
Contributor Author

Thanks to the two administrators for their answers. Is it ok if we just add support for the loongarch64 architecture?
The build work is still done by the loong64 organization.

@mattip mattip merged commit 85d1b1d into MacPython:main Jan 6, 2025
@mattip
Copy link
Collaborator

mattip commented Jan 6, 2025

Let's go with this for now.

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

Successfully merging this pull request may close these issues.

3 participants