Skip to content

[xpu][fix] Include kernel_compile_result.h in aoti xpu.h header - #187137

Closed
guangyey wants to merge 6 commits into
gh/guangyey/362/basefrom
gh/guangyey/362/head
Closed

guangyey wants to merge 6 commits into
gh/guangyey/362/basefrom
gh/guangyey/362/head

Conversation

@guangyey

@guangyey guangyey commented Jun 12, 2026 •

Copy link
Copy Markdown
Collaborator

@pytorch-bot

pytorch-bot Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 3 Unrelated Failures, 1 Unclassified Failure

As of commit 0038c5a with merge base 2637e3b (image):

NEW FAILURE - The following job has failed:

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

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following job 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.

@guangyey
guangyey requested a review from desertfire June 12, 2026 02:45
@guangyey guangyey added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 12, 2026
@guangyey
guangyey requested a review from jansel June 12, 2026 02:47
guangyey added a commit that referenced this pull request Jun 12, 2026
guangyey added a commit that referenced this pull request Jun 12, 2026
guangyey added a commit that referenced this pull request Jun 12, 2026
guangyey added 3 commits June 12, 2026 10:00
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
guangyey added a commit that referenced this pull request Jun 12, 2026
@skipIfRocm # RoCM does not support the config block size in test suite.
@skipIfXpu(
msg="SYCL work-item index overflow issue when block sizes are used in this test."
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We plan to address this in a separate PR, as it is not something that can be fixed in the short term. A proper solution will require changes in both PyTorch and Triton, so we'd prefer to handle it as a dedicated follow-up effort.

guangyey added 2 commits June 12, 2026 16:29
[ghstack-poisoned]
[ghstack-poisoned]
guangyey added a commit that referenced this pull request Jun 13, 2026
[ghstack-poisoned]
@jansel

jansel commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

@claude explain those CI failures, are they related to this PR?

@claude

claude Bot commented Jun 13, 2026 •

Copy link
Copy Markdown

Claude finished @jansel's task in 1m 34s —— View job


CI failure analysis

  • Reviewed PR diff
  • Inspected each reported failure
  • Determined relation to this PR

TL;DR: None of the failures are caused by this PR. This PR only adds a #include to torch/csrc/inductor/aoti_include/xpu.h and adds a @skipIfXpu decorator to one test — neither can affect the failing jobs below.


1. xpu / linux-noble-xpu-n-py3.10 / test (default, 2, 12) — Unclassified (timeout)

This job timed out after 360 minutes (##[error]The action 'Test' has timed out after 360 minutes.). Walking the log, the last test to start was test_multiprocessing at 10:13:21, and the shard never progressed past it before the 6-hour wall-clock limit killed the job:

Running test_multiprocessing 1/1 ... [2026-06-13 10:13:21]
...
##[error]The action 'Test' has timed out after 360 minutes.

test_multiprocessing hanging is a known infra/flake issue and is entirely unrelated to an AOTI header include or an autotune-test skip. DrCI couldn't classify it only because the workflow didn't run on the merge base, so it had no baseline to compare against. Not related to this PR.

2. trunk / macos-py3-arm64 / test (mps) — test_BatchNorm_empty_mps_float32

An MPS (Apple Metal) BatchNorm test. This PR touches nothing in the MPS backend or BatchNorm. Not related to this PR.

3. Inductor test-osdc failures — tf_efficientnet_b0, shufflenet_v2_x1_0, mobilenetv2_100

DrCI already classified these as FLAKY / BROKEN TRUNK (the mobilenetv2_100 failure reproduces on the merge base 2637e3b). These are TIMM/torchbench model accuracy flakes on trunk, not introduced here. Not related to this PR.


Conclusion

All failures are either pre-existing trunk flakiness (MPS BatchNorm, inductor model benchmarks) or an unrelated infra timeout (test_multiprocessing hang in the XPU shard). The actual XPU test shards relevant to this change passed — note that shard 2/12 even completed the inductor/test_aot_inductor and inductor/test_max_autotune suites successfully before getting stuck on test_multiprocessing much later.

Recommendation: rebase onto viable/strict to clear the broken-trunk inductor failure, and re-run the timed-out XPU shard (the test_multiprocessing hang is flaky and typically passes on retry).

pytorchmergebot pushed a commit that referenced this pull request Jun 16, 2026
pytorchmergebot pushed a commit that referenced this pull request Jun 16, 2026
# Motivation
This PR reverts #182630 to fix #187277

Root cause is `ext_oneapi_wait_and_throw` will introduce SYCL Graph to sync an invalid queue.

# Additional Context

This needs to be cherry-picked to the release branch.

Why isn't it captured on CI?
This issue is only found on BMG (Xe2), and the current CI is on Data Center GPU (Xe).
Pull Request resolved: #187306
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233, #187137, #187232
pytorchmergebot pushed a commit that referenced this pull request Jun 16, 2026
…187314)

# Motivation
When #184737 generalize `test_multiprocess.py`, it helps enable `TestMultiprocessingDeviceType` test on XPU. However, XPU doesn't support this test suite because lack of IPC support currently. So we would like to skip this test case and restore XPU CI to green.

Fixes #186585

Code originates from #186793
Co-authored-by: @xuhancn
Pull Request resolved: #187314
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233, #187137, #187232, #187306
@guangyey

Copy link
Copy Markdown
Collaborator Author

@pytorchbot cherry-pick --onto release/2.13 -c critical --fixes aoti dual-wrapper tests

@pytorch-bot

pytorch-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: unrecognized arguments: dual-wrapper tests

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@guangyey

Copy link
Copy Markdown
Collaborator Author

@pytorchbot cherry-pick --onto release/2.13 -c critical "--fixes aoti dual-wrapper tests"

@guangyey

Copy link
Copy Markdown
Collaborator Author

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

@pytorch-bot

pytorch-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: unrecognized arguments: --fixes aoti dual-wrapper tests

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@pytorchbot

Copy link
Copy Markdown
Collaborator

Cherry picking #187137

The cherry pick PR is at #187417 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

atalman pushed a commit that referenced this pull request Jun 16, 2026
…187416)

Skip TestMultiprocessingDeviceType on XPU due to lack of IPC support (#187314)

# Motivation
When #184737 generalize `test_multiprocess.py`, it helps enable `TestMultiprocessingDeviceType` test on XPU. However, XPU doesn't support this test suite because lack of IPC support currently. So we would like to skip this test case and restore XPU CI to green.

Fixes #186585

Code originates from #186793
Co-authored-by: @xuhancn
Pull Request resolved: #187314
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233, #187137, #187232, #187306

(cherry picked from commit 4f26a57)

Co-authored-by: Yu, Guangye <[email protected]>
atalman pushed a commit that referenced this pull request Jun 16, 2026
)

[xpu][fix] Include kernel_compile_result.h in aoti xpu.h header (#187137)

# Motivation
#184735 introduces AOTI lazy autotuning with the dual-wrapper mechanism, which uncovered some new XPU test failures in CI.

# Additonal Context
Fix #187124
Fix #187123
Fix #187035
Fix #187035
Fix #187036
Fix #187125
Fix #187121

This needs to be cherry-picked to the release branch.

Pull Request resolved: #187137
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233

(cherry picked from commit 6ec77b0)

Co-authored-by: Yu, Guangye <[email protected]>
atalman pushed a commit that referenced this pull request Jun 16, 2026
…o driver (#187422)

Handle pyzes import failures gracefully on machines without level zero driver (#187232)

# Motivation
Previously, we didn't handle pyzes import failures gracefully on machines without level zero driver.
Without this PR:
<img width="510" height="436" alt="image" src="https://github.com/user-attachments/assets/5c6db7ff-ee8d-4ebe-9177-db2ff80916c1" />

With this PR:
<img width="530" height="179" alt="image" src="https://github.com/user-attachments/assets/9239ac61-3722-42d7-8411-68f61abd2e0a" />

# Additional Context
<img width="1004" height="36" alt="image" src="https://github.com/user-attachments/assets/0035d2c6-2e49-4570-97de-3a4b48ae0575" />

This needs to be cherry-picked to the release branch.

Pull Request resolved: #187232
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233, #187137

(cherry picked from commit fd79a5f)

Co-authored-by: Yu, Guangye <[email protected]>
atalman pushed a commit that referenced this pull request Jun 22, 2026
Revert XPU device-wide synchronization (#187306)

# Motivation
This PR reverts #182630 to fix #187277

Root cause is `ext_oneapi_wait_and_throw` will introduce SYCL Graph to sync an invalid queue.

# Additional Context

This needs to be cherry-picked to the release branch.

Why isn't it captured on CI?
This issue is only found on BMG (Xe2), and the current CI is on Data Center GPU (Xe).
Pull Request resolved: #187306
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: #181233, #187137, #187232

(cherry picked from commit 421abac)

Co-authored-by: Yu, Guangye <[email protected]>
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…rch#187137)

# Motivation
pytorch#184735 introduces AOTI lazy autotuning with the dual-wrapper mechanism, which uncovered some new XPU test failures in CI.

# Additonal Context
Fix pytorch#187124
Fix pytorch#187123
Fix pytorch#187035
Fix pytorch#187035
Fix pytorch#187036
Fix pytorch#187125
Fix pytorch#187121

This needs to be cherry-picked to the release branch.

Pull Request resolved: pytorch#187137
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
# Motivation
This PR reverts pytorch#182630 to fix pytorch#187277

Root cause is `ext_oneapi_wait_and_throw` will introduce SYCL Graph to sync an invalid queue.

# Additional Context

This needs to be cherry-picked to the release branch.

Why isn't it captured on CI?
This issue is only found on BMG (Xe2), and the current CI is on Data Center GPU (Xe).
Pull Request resolved: pytorch#187306
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233, pytorch#187137, pytorch#187232
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…ytorch#187314)

# Motivation
When pytorch#184737 generalize `test_multiprocess.py`, it helps enable `TestMultiprocessingDeviceType` test on XPU. However, XPU doesn't support this test suite because lack of IPC support currently. So we would like to skip this test case and restore XPU CI to green.

Fixes pytorch#186585

Code originates from pytorch#186793
Co-authored-by: @xuhancn
Pull Request resolved: pytorch#187314
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233, pytorch#187137, pytorch#187232, pytorch#187306
@github-actions
github-actions Bot deleted the gh/guangyey/362/head branch July 19, 2026 02:23
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…rch#187137)

# Motivation
pytorch#184735 introduces AOTI lazy autotuning with the dual-wrapper mechanism, which uncovered some new XPU test failures in CI.

# Additonal Context
Fix pytorch#187124
Fix pytorch#187123
Fix pytorch#187035
Fix pytorch#187035
Fix pytorch#187036
Fix pytorch#187125
Fix pytorch#187121

This needs to be cherry-picked to the release branch.

Pull Request resolved: pytorch#187137
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
# Motivation
This PR reverts pytorch#182630 to fix pytorch#187277

Root cause is `ext_oneapi_wait_and_throw` will introduce SYCL Graph to sync an invalid queue.

# Additional Context

This needs to be cherry-picked to the release branch.

Why isn't it captured on CI?
This issue is only found on BMG (Xe2), and the current CI is on Data Center GPU (Xe).
Pull Request resolved: pytorch#187306
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233, pytorch#187137, pytorch#187232
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…ytorch#187314)

# Motivation
When pytorch#184737 generalize `test_multiprocess.py`, it helps enable `TestMultiprocessingDeviceType` test on XPU. However, XPU doesn't support this test suite because lack of IPC support currently. So we would like to skip this test case and restore XPU CI to green.

Fixes pytorch#186585

Code originates from pytorch#186793
Co-authored-by: @xuhancn
Pull Request resolved: pytorch#187314
Approved by: https://github.com/EikanWang, https://github.com/atalman
ghstack dependencies: pytorch#181233, pytorch#187137, pytorch#187232, pytorch#187306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants