Skip to content

[CD] Port XPU manywheel build to the Python pipeline - #182942

Closed
chuanqi129 wants to merge 1 commit into
pytorch:mainfrom
chuanqi129:chuanqiw/port-xpu-manylinux-python-pipeline
Closed

chuanqi129 wants to merge 1 commit into
pytorch:mainfrom
chuanqi129:chuanqiw/port-xpu-manylinux-python-pipeline

Conversation

@chuanqi129

@chuanqi129 chuanqi129 commented May 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Port the XPU manylinux build from the legacy bash scripts (build_xpu.sh + build_common.sh) to the Python pipeline (build_env_setup.py + build_install_deps.py + build_wheel.py + repair_wheel.py), following the same pattern as #182409 (CUDA/CPU) and #182696 (ROCm).

  • Add XPU_BUILD_ENV and source_oneapi_env() to build_env_setup.py to source Intel oneAPI environment and set build flags
  • Always build small wheel for XPU, following the same practice as CUDA
  • Add XPU RPATH handling in repair_wheel.py (following CUDA pattern — runtime libs from pypi packages)
  • XPU wheels are now retagged to manylinux_2_28_x86_64
  • Delete build_xpu.sh

cpu-s390x continues to flow through build_common.sh unchanged.

cc @atalman

@pytorch-bot

pytorch-bot Bot commented May 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 12 Unclassified Failures

As of commit 7a81bfb with merge base b656629 (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

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

@pytorch-bot

pytorch-bot Bot commented May 8, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

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

@chuanqi129
chuanqi129 force-pushed the chuanqiw/port-xpu-manylinux-python-pipeline branch from 46e1a61 to cce2e91 Compare May 8, 2026 10:09
@chuanqi129 chuanqi129 added the ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR label May 8, 2026
@chuanqi129
chuanqi129 force-pushed the chuanqiw/port-xpu-manylinux-python-pipeline branch 3 times, most recently from 543d349 to 7e0f71d Compare May 11, 2026 02:25
@chuanqi129

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase -b main

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

Reroute GPU_ARCH_TYPE=xpu through the same set_desired_python ->
build_env_setup -> build_install_deps -> build_wheel -> repair_wheel
chain that x86/aarch64 CUDA and CPU already use, and delete the
standalone build_xpu.sh.

build_env_setup.py:
  Add XPU_BUILD_ENV with the original build_xpu.sh flags
  (USE_STATIC_MKL, USE_ONEMKL, USE_XCCL, USE_MPI=0, etc.) and a
  source_oneapi_env() helper that sources the five Intel oneAPI
  vars.sh scripts by capturing the resulting environment from a
  bash subprocess.

repair_wheel.py:
  Add an XPU branch that sets RPATHs to the Intel pypi runtime
  packages (following the same pattern as CUDA). XPU wheels are
  now retagged to manylinux_2_28_x86_64.

build.sh:
  Move the xpu case into the new pipeline alongside cuda/cpu;
  drop the bash build_xpu.sh fallback.

cpu-s390x continues to flow through build_common.sh unchanged.

Authored with Claude.
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased chuanqiw/port-xpu-manylinux-python-pipeline onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout chuanqiw/port-xpu-manylinux-python-pipeline && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the chuanqiw/port-xpu-manylinux-python-pipeline branch from 7dd1671 to 7a81bfb Compare May 11, 2026 06:42
@chuanqi129
chuanqi129 marked this pull request as ready for review May 11, 2026 09:50
@chuanqi129
chuanqi129 requested a review from a team as a code owner May 11, 2026 09:50
@chuanqi129
chuanqi129 requested review from atalman and huydhn May 11, 2026 09:50
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 11, 2026

@atalman atalman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm thank you

@chuanqi129

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 11, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

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

Details for Dev Infra team Raised by workflow job

@atalman atalman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@atalman

atalman commented May 11, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot merge -f "all looks good"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit to ayushsatyam146/pytorch that referenced this pull request May 12, 2026
## Summary

Port the XPU manylinux build from the legacy bash scripts (`build_xpu.sh` + `build_common.sh`) to the Python pipeline (`build_env_setup.py` + `build_install_deps.py` + `build_wheel.py` + `repair_wheel.py`), following the same pattern as pytorch#182409 (CUDA/CPU) and pytorch#182696 (ROCm).

- Add `XPU_BUILD_ENV` and `source_oneapi_env()` to `build_env_setup.py` to source Intel oneAPI environment and set build flags
- Always build small wheel for XPU, following the same practice as CUDA
- Add XPU RPATH handling in `repair_wheel.py` (following CUDA pattern — runtime libs from pypi packages)
- XPU wheels are now retagged to `manylinux_2_28_x86_64`
- Delete `build_xpu.sh`

cpu-s390x continues to flow through `build_common.sh` unchanged.

Pull Request resolved: pytorch#182942
Approved by: https://github.com/atalman
Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
## Summary

Port the XPU manylinux build from the legacy bash scripts (`build_xpu.sh` + `build_common.sh`) to the Python pipeline (`build_env_setup.py` + `build_install_deps.py` + `build_wheel.py` + `repair_wheel.py`), following the same pattern as pytorch#182409 (CUDA/CPU) and pytorch#182696 (ROCm).

- Add `XPU_BUILD_ENV` and `source_oneapi_env()` to `build_env_setup.py` to source Intel oneAPI environment and set build flags
- Always build small wheel for XPU, following the same practice as CUDA
- Add XPU RPATH handling in `repair_wheel.py` (following CUDA pattern — runtime libs from pypi packages)
- XPU wheels are now retagged to `manylinux_2_28_x86_64`
- Delete `build_xpu.sh`

cpu-s390x continues to flow through `build_common.sh` unchanged.

Pull Request resolved: pytorch#182942
Approved by: https://github.com/atalman
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
## Summary

Port the XPU manylinux build from the legacy bash scripts (`build_xpu.sh` + `build_common.sh`) to the Python pipeline (`build_env_setup.py` + `build_install_deps.py` + `build_wheel.py` + `repair_wheel.py`), following the same pattern as pytorch#182409 (CUDA/CPU) and pytorch#182696 (ROCm).

- Add `XPU_BUILD_ENV` and `source_oneapi_env()` to `build_env_setup.py` to source Intel oneAPI environment and set build flags
- Always build small wheel for XPU, following the same practice as CUDA
- Add XPU RPATH handling in `repair_wheel.py` (following CUDA pattern — runtime libs from pypi packages)
- XPU wheels are now retagged to `manylinux_2_28_x86_64`
- Delete `build_xpu.sh`

cpu-s390x continues to flow through `build_common.sh` unchanged.

Pull Request resolved: pytorch#182942
Approved by: https://github.com/atalman
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
## Summary

Port the XPU manylinux build from the legacy bash scripts (`build_xpu.sh` + `build_common.sh`) to the Python pipeline (`build_env_setup.py` + `build_install_deps.py` + `build_wheel.py` + `repair_wheel.py`), following the same pattern as pytorch#182409 (CUDA/CPU) and pytorch#182696 (ROCm).

- Add `XPU_BUILD_ENV` and `source_oneapi_env()` to `build_env_setup.py` to source Intel oneAPI environment and set build flags
- Always build small wheel for XPU, following the same practice as CUDA
- Add XPU RPATH handling in `repair_wheel.py` (following CUDA pattern — runtime libs from pypi packages)
- XPU wheels are now retagged to `manylinux_2_28_x86_64`
- Delete `build_xpu.sh`

cpu-s390x continues to flow through `build_common.sh` unchanged.

Pull Request resolved: pytorch#182942
Approved by: https://github.com/atalman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants