Skip to content

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Sep 26, 2025

Our current nightly/release wheel package is done following https://github.com/pytorch/test-infra/wiki/Using-Nova-Reusable-Build-Workflows

As described by https://github.com/pytorch/test-infra/blob/5398e1a00c39939f43251f29031c37e6d0c84647/.github/workflows/build_wheels_linux.yml#L4, The docker image infra team used to release nightly/release package is from https://github.com/pypa/manylinux, and it's currently using https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux_2_28-almalinux-8-based. It means the glibc version is 2.28 and GCC is 14.

The issue is that, QNN .so files are not compatible with 2.28. The minimum version is 2.34 (I tried 2.29 the first time when it failed and asked for 2.29, but it still fails).

In this PR, instead of checking glibc and failed directly when minimum version isn't matched, we will download the glibc 2.34 to /tmp. A different strategy compared with glibc++ is that, we don't load them, because the python process itself start with the system glibc 2.28. We need to re-execute the process with the new glibc

Copy link

pytorch-bot bot commented Sep 26, 2025

🔗 Helpful Links

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

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

❌ 4 New Failures, 2 Cancelled Jobs, 7 Pending, 1 Unrelated Failure

As of commit ec21edd with merge base 68b2d3c (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

@cccclai cccclai marked this pull request as draft September 26, 2025 20:17
@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 26, 2025
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@cccclai cccclai marked this pull request as ready for review September 30, 2025 18:27
@cccclai cccclai requested a review from kimishpatel September 30, 2025 18:27
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this in D83586551.

Comment on lines 199 to 200
RPM_PATH = pathlib.Path("/tmp/glibc.rpm")
WORKDIR = pathlib.Path("/tmp/glibc-extracted")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use tmpdir pacakge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this code currently applies to both when building the wheel package and user install the wheel package. If we use tmpdir package, it will affect the user's side. The path will be different every time users run this code and they need to do the process again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait what do you mean? Even when users do pip install setup.py, storing in this temp artifact is only for the during of pip insta.... Is that right?

Copy link
Contributor Author

@cccclai cccclai Sep 30, 2025

Choose a reason for hiding this comment

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

users do pip install setup.py

Do you mean user install or use wheel package? Like do you mean 1) pip install executorch_xx.whl or 2) building the wheel packages (python setup bdist)?

Comment on lines +79 to +83
elif is_linux_x86():
# On Linux/Unix, prefer $XDG_CACHE_HOME, fallback to ~/.cache
base = pathlib.Path(
os.environ.get("XDG_CACHE_HOME", pathlib.Path.home() / ".cache")
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I liked this

Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

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

Thanks Chen for the changes. Looks good

@cccclai cccclai merged commit 19be2a3 into main Oct 1, 2025
146 of 154 checks passed
@cccclai cccclai deleted the night_wheel_qnn branch October 1, 2025 19:43
@cccclai
Copy link
Contributor Author

cccclai commented Oct 1, 2025

@pytorchbot cherry-pick --onto release/1.0 -c critical

pytorchbot pushed a commit that referenced this pull request Oct 1, 2025
Our current nightly/release wheel package is done following
https://github.com/pytorch/test-infra/wiki/Using-Nova-Reusable-Build-Workflows

As described by
https://github.com/pytorch/test-infra/blob/5398e1a00c39939f43251f29031c37e6d0c84647/.github/workflows/build_wheels_linux.yml#L4,
The docker image infra team used to release nightly/release package is
from https://github.com/pypa/manylinux, and it's currently using
https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux_2_28-almalinux-8-based.
It means the glibc version is 2.28 and GCC is 14.

The issue is that, QNN .so files are not compatible with 2.28. The
minimum version is 2.34 (I tried 2.29 the first time when it failed and
asked for 2.29, but it still fails).

In this PR, instead of checking glibc and failed directly when minimum
version isn't matched, we will download the glibc 2.34 to /tmp. A
different strategy compared with glibc++ is that, we don't load them,
because the python process itself start with the system glibc 2.28. We
need to re-execute the process with the new glibc

(cherry picked from commit 19be2a3)
@pytorchbot
Copy link
Collaborator

Cherry picking #14633

The cherry pick PR is at #14734 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants