Skip to content

[DON'T MERGE] dummy comment change for XPU build test - #195438

Closed
xuhancn wants to merge 1 commit into
mainfrom
donmerge/dummy-comment-patch
Closed

xuhancn wants to merge 1 commit into
mainfrom
donmerge/dummy-comment-patch

Conversation

@xuhancn

@xuhancn xuhancn commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Dummy PR to test XPU CI builds. Not for merge.

Only adds a trivial comment to torch/init.py.

cc @xuhancn

This is a dummy PR to test XPU CI builds. Only adds a comment
to torch/__init__.py about XPU support.

Test: N/A (dummy PR)
@pytorch-bot

pytorch-bot Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 2 Unclassified Failures

As of commit e139342 with merge base 4f0443d (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.

@xuhancn xuhancn added ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks topic: not user facing topic category labels Aug 31, 2026
@xuhancn xuhancn added ciflow/binaries Trigger all binary build and upload jobs on the PR ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR labels Sep 3, 2026
pytorchmergebot pushed a commit that referenced this pull request Sep 16, 2026
Take over #188136.

Builds all Linux XPU manywheel variants in one job, reusing ABI-independent C++/SYCL artifacts across Python versions while rebuilding Python-bound artifacts per interpreter.

## Before vs after

Comparing the eight XPU matrix builds from [#195438 run 33729050328](https://github.com/pytorch/pytorch/actions/runs/33729050328) with the unified build from [this PR, run 34123506914](https://github.com/pytorch/pytorch/actions/runs/34123506914):

### Linux XPU build runner-minutes

| Before (per-Python matrix, 8 jobs) | After (1 unified job) | Delta |
|---|---:|---:|
| 8 x ~78m = **623m** ([matrix jobs](https://github.com/pytorch/pytorch/actions/runs/33729050328)) | **139m** ([unified job](https://github.com/pytorch/pytorch/actions/runs/34123506914/job/101746866663)) | **-78%** |

This saves approximately **484 runner-minutes per XPU manywheel build**.

### Per-Python build breakdown

- First Python (cp310): **~74m** from a clean build.
- Following seven Pythons (cp311 through cp315t): **~7m each** on average.
- The unified job produced all eight XPU wheel artifacts successfully.

The first build establishes the shared XPU backend. Subsequent interpreters reuse the SYCL kernel objects and device link, rebuilding only Python-ABI-bound components.

### Fix for SYCL reuse

The earlier PATH-only tool pin did not prevent scikit-build-core from selecting the importable CMake/Ninja packages in each Python environment. The final implementation explicitly sets `CMAKE_EXECUTABLE` and passes the shared Ninja path through `CMAKE_ARGS`, keeping CMake's generated SYCL depfile commands stable across the loop.

Local Python 3.10 then Python 3.11 XPU builds confirmed **zero SYCL object recompilations** and **zero XPU device relinks** on the second build.

> AI-assisted drafting; CI measurements and implementation reviewed by the PR author.

Pull Request resolved: #195699
Approved by: https://github.com/chuanqi129, https://github.com/atalman

Co-authored-by: Copilot <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Sep 16, 2026
Enable the SYCL launcher path for XPU builds.

Highlights:
- `CMakeLists.txt` includes `SYCL` in the `USE_CCACHE` launcher loop, so `CMAKE_SYCL_COMPILER_LAUNCHER` is set through the same top-level CMake logic as the other compiler launchers.
- The downstream support in [`intel/torch-xpu-ops#5154`](intel/torch-xpu-ops#5154) has merged as commit `8cad22eb640c5df28b7592f0d559a80ea7b09252`.
- This PR intentionally does not update `third_party/xpu.txt`. The current PyTorch pin, `c513b6ad85ffe36858bfbf39fb1103d19cecd8e2`, predates the downstream support, so per-TU SYCL launcher coverage becomes active after a normal torch-xpu-ops pin update reaches `8cad22eb640c5df28b7592f0d559a80ea7b09252` or newer.
- The launcher wiring is shared by Linux and Windows XPU builds.

Performance:

| Platform | Without SYCL sccache | With SYCL sccache | Improvement |
|---|---:|---:|---:|
| Linux XPU | 25 min | 20 min | 20% |
| Windows XPU | 1 hr 40 min | 1 hr 33 min | 7% |

The measurements compare the [baseline PR](#195438) with [this PR](#195436), using a torch-xpu-ops revision containing the downstream support. See the [source results and CI links](intel/torch-xpu-ops#5154 (comment)).

Test Plan:
- Local Linux XPU build with the downstream support; `torch_xpu_ops` with ccache `depend_mode` rebuilds 376/376 objects through the cache.
- Linux and Windows XPU CI measurements linked above.
- `lintrunner -a CMakeLists.txt`
- `git diff --check -- CMakeLists.txt`

> AI-assisted update: The downstream dependency note, conflict resolution, performance clarification, and verification commands above were drafted with an AI coding assistant and reviewed by the PR author.

Pull Request resolved: #195436
Approved by: https://github.com/gujinghui, https://github.com/chuanqi129, https://github.com/atalman
@xuhancn xuhancn closed this Sep 16, 2026
@github-actions
github-actions Bot deleted the donmerge/dummy-comment-patch branch November 12, 2026 01:49
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/binaries Trigger all binary build and upload jobs on the PR ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks open source topic: not user facing topic category

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants