Skip to content

Conversation

Chizkiyahu
Copy link
Contributor

Summary

Fixes #13044

Release notes: build

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 4, 2025
@Chizkiyahu
Copy link
Contributor Author

@pytorchbot label "release notes: build"

@pytorch-bot pytorch-bot bot added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Sep 4, 2025
Copy link

pytorch-bot bot commented Sep 4, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/13946

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Cancelled Job, 37 Pending, 3 Unrelated Failures

As of commit da0b1c6 with merge base 1ea9feb (image):

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@atalman atalman changed the title Add GitHub Actions workflow for building Aarch64 Linux wheels Add GitHub Actions workflow for building CPU Aarch64 Linux wheels Sep 4, 2025
@mergennachin
Copy link
Contributor

Thanks @Chizkiyahu for your initiative to enable linux aarch64

Looks like one of the dependencies (https://github.com/meta-pytorch/tokenizers/) is not able to run on linux aarch64

Is it something you can take a look at? And add test there too?

https://github.com/meta-pytorch/tokenizers/tree/main/.github/workflows

@Chizkiyahu
Copy link
Contributor Author

@mergennachin
Thanks for you time and help
I build tokenizers on local and it works
I open PR meta-pytorch/tokenizers#125
please approve the workflow run

@Chizkiyahu Chizkiyahu force-pushed the linux_arm_build branch 2 times, most recently from ef32c6e to bdbf309 Compare September 5, 2025 10:28
@Chizkiyahu
Copy link
Contributor Author

@mergennachin
thanks for the help

I found the problem
is missing some include bdbf309

please approve awaiting workflows

@Chizkiyahu
Copy link
Contributor Author

@mergennachin
thanks for the help
is look like that the problem is that the arm runners don't have libatomic install
libatomic is needed for build tokenizers

there is multiple options - what is the right way to do it

  1. to build in docker
  2. to ask pytorch/test-infra/ to install it
  3. add sudo dnf install -y libatomic to the pre-build script ?

or another way ?

@mergennachin
Copy link
Contributor

mergennachin commented Sep 7, 2025

Thanks @Chizkiyahu for following through and debugging the issue.

Asking pytorch/test-infra is probably the long term solution, but let's just do directly in the pre-build script
Something like this:

  # In .ci/scripts/wheel/pre_build_script.sh
  if [[ "$(uname -m)" == "aarch64" ]]; then
      sudo dnf install -y libatomic
  fi

@Chizkiyahu
Copy link
Contributor Author

@mergennachin thanks
please approve the workflow

@mergennachin
Copy link
Contributor

@Chizkiyahu I have been trying a bunch of things to make the tokenizer work without much luck. Also, sorry to pollute your PR, i was meaning to upstream to a separate branch to experiment, but it ended up merging to your branch...

Not sure what to do right now. I'm a bit occupied right now, so probably won't spend much time for the next couple of days, on this. But if you have ideas, let me know. I will keep approving the CI runs.

@Chizkiyahu
Copy link
Contributor Author

@Chizkiyahu I have been trying a bunch of things to make the tokenizer work without much luck. Also, sorry to pollute your PR, i was meaning to upstream to a separate branch to experiment, but it ended up merging to your branch...

Not sure what to do right now. I'm a bit occupied right now, so probably won't spend much time for the next couple of days, on this. But if you have ideas, let me know. I will keep approving the CI runs.

thanks a lot
I am still working on that
big thanks for the CI approving

@Chizkiyahu
Copy link
Contributor Author

Update

  1. I found a build problem with Google’s sentencepiece on the CI ARM machine. I wasn’t able to reproduce it on my local machine, so I cannot open an issue to sentencepiece.
    The problem is resolved by this patch, which fixes the linking error.
    I updated .ci/scripts/wheel/pre_build_script.sh to apply this patch.

  2. Apple’s coremltools does not support aarch64 Missing Linux AArch64 wheels on PyPi apple/coremltools#1254 and fails at runtime. I’ve updated the tests to exclude it accordingly.

@Chizkiyahu
Copy link
Contributor Author

@mergennachin
please approve ci run

@Chizkiyahu
Copy link
Contributor Author

@mergennachin
the new commit c3b842f that Add torchcodec as temporary dependency
brake the aarch64 build because torchcodec don't have aarch64 support see pytorch/torchcodec#569

when I try to build the torchcodec for aarch64 I have 2 problem

  1. in build i needs ffmpg files in s3 for the file https://github.com/pytorch/torchcodec/blob/main/src/torchcodec/_core/fetch_and_expose_non_gpl_ffmpeg_libs.cmake
  2. when i use I_CONFIRM_THIS_IS_NOT_A_LICENSE_VIOLATION some tests fails

@Chizkiyahu
Copy link
Contributor Author

update I open PR for torchcodec
pytorch/torchcodec#895

mergennachin added a commit that referenced this pull request Sep 11, 2025
Summary:

torchcodec is used when only torchaudio users use torch.save and torch.load. It is an optional requirement.

Only moshi test uses torch.save and torch.load, and we should make this to install across the board.

Currently, it is blocking linux aarch64 wheel building (#13946) because during smoke testing it is trying to install torchcodec on linux aarch64 machine and it is failing
@NicolasHug
Copy link
Member

Hi folks, Nicolas from TorchCodec here

Sorry, I don't think we'll be able to prioritize landing pytorch/torchcodec#895 for now. My understanding is that you have a dependency on TorchAudio, which meant you had to take a dependency on TorchCodec because TorchAudio now relies on TorchCodec for the load() and save() utils.

To unblock you for the coming release, I would recommend the following paths:

  • you shouldn't need torchcodec to build an executorch wheel. If your are running some tests when building the wheel, maybe you can deactivate those that rely on torchaudio.load or torchaudio.save?
  • use conda-forge to install torchcodec. There is aarch64 support for torchcodec on conda-forge: https://anaconda.org/conda-forge/torchcodec

@mergennachin
Copy link
Contributor

@NicolasHug @Chizkiyahu this should unblock #14211

mergennachin added a commit that referenced this pull request Sep 11, 2025
Summary:

torchcodec is used when only torchaudio users use torch.save and
torch.load. It is an optional requirement.

Only moshi test uses torch.save and torch.load, and we shouldn't make
this to install across the board.

Currently, it is blocking linux aarch64 wheel building
(#13946) because during smoke
testing it is trying to install torchcodec on linux aarch64 machine and
it is failing
@Chizkiyahu
Copy link
Contributor Author

@mergennachin
thanks you
please approve CI

@Chizkiyahu Chizkiyahu marked this pull request as ready for review September 11, 2025 18:09
@mergennachin mergennachin merged commit 0cac45b into pytorch:main Sep 11, 2025
310 of 316 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/binaries CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish pypi wheel for linux aarch64
3 participants