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

add linux/aarch64 support. #326

Merged
merged 4 commits into from
Nov 30, 2023
Merged

add linux/aarch64 support. #326

merged 4 commits into from
Nov 30, 2023

Conversation

dskkato
Copy link
Contributor

@dskkato dskkato commented Nov 29, 2023

This PR adds configurations to create binary files for arm64 architecture, which are necessary for platforms like Raspberry Pi. The build process takes approximately 30-40 minutes due to the use of QEMU. Currently, I am testing the functionality using Raspberry Pi 4 and wgpu-py, and so far, it seems that the library loading is successful.

You can use the artifacts in the CD from the following link. Feel free to use it for testing as needed.

https://github.com/dskkato/wgpu-native/releases/tag/v0.18.1.3

ss_raspi

Verified environments:

dskkato@raspberrypi:~ $ uname -m
aarch64
dskkato@raspberrypi:~ $ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Related to #142

- use cache for linux
Copy link
Collaborator

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

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

Nice, Thanks!

.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Outdated Show resolved Hide resolved
.github/workflows/cd.yml Outdated Show resolved Hide resolved
@almarklein
Copy link
Collaborator

Very nice! In #148 I did an earlier attempt using armv7-unknown-linux-gnueabihf as a compilation target. Do you know anything about what this difference means in practice? IIRC Raspberry Pi 3 required arm7, perhaps version 4 does not?

@dskkato
Copy link
Contributor Author

dskkato commented Nov 29, 2023

@almarklein

I did an earlier attempt using armv7-unknown-linux-gnueabihf as a compilation target. Do you know anything about what this difference means in practice? IIRC Raspberry Pi 3 required arm7, perhaps version 4 does not?

Basically, "armv7" is for Raspberry Pi OS (32-bit), while "aarch64" is for Raspberry Pi OS (64-bit). The 64-bit OS for Raspberry Pi has been available for about two years and can be used with Raspberry Pi 3B models and newer.

https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/

Since it is built for the aarch64 architecture, it may not run on 32-bit OS environments on the same hardware. I've added information about my verification results to the PR description.

I also attempted cross-compiling for armv7, but I decided to skip it this time because the latest manylinux only supports aarch64 (manylinux2014_armv7l seems to be the last one). While it is possible to build for armv7 by downloaing compilers from somewhere (ARM, linaro, ...) for cross-compile, the generalizability of the build results is quite uncertain in that case.

@dskkato dskkato changed the title add linux/arm64 support. add linux/aarch6464 support. Nov 29, 2023
@dskkato dskkato changed the title add linux/aarch6464 support. add linux/aarch64 support. Nov 29, 2023
@rajveermalviya rajveermalviya merged commit fcc480b into gfx-rs:trunk Nov 30, 2023
16 checks passed
@almarklein
Copy link
Collaborator

Thanks a lot!

@dskkato
Copy link
Contributor Author

dskkato commented Dec 1, 2023

Could we please have a release of the version after this patch was merged? I'd like to use it for validation in the Raspberry Pi environment.

@dskkato dskkato deleted the cd branch December 3, 2023 13:49
@almarklein
Copy link
Collaborator

Could we please have a release of the version after this patch was merged?

I think we can backport this to the v0.18 branch and tag v0.18.1.3, what do you think @rajveermalviya ?

@almarklein almarklein mentioned this pull request Dec 4, 2023
2 tasks
rajveermalviya pushed a commit to rajveermalviya/wgpu-native that referenced this pull request Dec 5, 2023
rajveermalviya added a commit that referenced this pull request Dec 5, 2023
@rajveermalviya
Copy link
Collaborator

Created release tag: v0.18.1.2...v0.18.1.3

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