Skip to content

Update torch-xpu-ops commit pin - #201371

Closed
ezyang wants to merge 1 commit into
gh/ezyang/3626/basefrom
gh/ezyang/3626/head
Closed

ezyang wants to merge 1 commit into
gh/ezyang/3626/basefrom
gh/ezyang/3626/head

Conversation

@ezyang

@ezyang ezyang commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Update third_party/xpu.txt from aae09f5f to 4260c030, the current
intel/torch-xpu-ops main. This picks up intel/torch-xpu-ops#5749, which
includes ATen/Context.h in the three XPU kernels that call
globalContext() without it, so the XPU build keeps working once the
generated per-operator headers stop including ATen/Context.h (next PR
in this stack).

The previous pin, aae09f5f, is 530af151 plus one commit updating the
XCCL c10d op schemas; that change landed on torch-xpu-ops main as
#5587 and is identical apart from formatting at 4260c030. Between
530af151 and 4260c030 there are 59 torch-xpu-ops commits in total.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Oct 19, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

PR Status: Approved 🚀

Please fix all CI failures and trigger merge by commenting "@pytorchbot merge".

✅ AUTOMATED REVIEW - Ready for human review:

This PR moves the third_party/xpu.txt torch-xpu-ops pin from aae09f5f to
4260c030, which brings in intel/torch-xpu-ops# 5749 (ATen/Context.h includes in
three XPU kernels) ahead of # 200676. The review found no issues in the diff.
Recommendation: Approve.

Findings (1):

[info] third_party/xpu.txt:1
Before merging, make sure the XPU CI jobs actually run on this PR and on #
200676. They are the only check on the 59 upstream commits between 530af151 and
4260c030, which were not reviewed. The review also ran offline, so it could not
confirm that 4260c030 is on torch-xpu-ops main and contains # 5749, or that the
XCCL c10d schema change in the old pin aae09f5f matches upstream # 5587 apart
from formatting.

Reviewed commit: 7285617

Review run

🔗 Helpful Links

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

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

❌ 1 Cancelled Job

As of commit 7285617 with merge base bb26c8c (image):

🟡 GREEN LIGHT - PR requires human review:

  • Triviality
    • third_party/xpu.txt pin bump pulls in torch-xpu-ops code that this diff does not show and the checkout does not contain
    • PR body says it covers 59 upstream commits, which I could not read, so the change fits no trivial class
  • Scope
    • The pin decides which XPU kernels are built into OSS XPU wheels, so it can change numerics and behavior for XPU users
    • A human should confirm the upstream range, including the XCCL c10d schema change the body mentions, before it lands

reason: not_trivial
Reviewed commit: 7285617

Inference job

🐛 Report a wrong verdict

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

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

@ezyang
ezyang marked this pull request as ready for review October 19, 2026 01:22
@pytorchbot pytorchbot added the in progress PR is being worked on by the author, until the automated review accepts it label Oct 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review of 7285617: nothing blocking; ready for human review.

This PR moves the third_party/xpu.txt torch-xpu-ops pin from aae09f5f to 4260c030, which brings in intel/torch-xpu-ops# 5749 (ATen/Context.h includes in three XPU kernels) ahead of # 200676. The review found no issues in the diff. Recommendation: Approve.

⚪ 1 non-blocking finding

4260c030d7b1521de31c61332229c9bf242c65a8

Before merging, make sure the XPU CI jobs actually run on this PR and on # 200676. They are the only check on the 59 upstream commits between 530af151 and 4260c030, which were not reviewed. The review also ran offline, so it could not confirm that 4260c030 is on torch-xpu-ops main and contains # 5749, or that the XCCL c10d schema change in the old pin aae09f5f matches upstream # 5587 apart from formatting.

This review is AI-generated and advisory. Each new automated review replaces the previous one.

@pytorch-bot pytorch-bot Bot added ready for review Automated review passed, ready for a final review by a maintainer. and removed in progress PR is being worked on by the author, until the automated review accepts it labels Oct 19, 2026
@EikanWang

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

1 similar comment
@ezyang

ezyang commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

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

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

Copy link
Copy Markdown
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@guangyey

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

ezyang added a commit that referenced this pull request Oct 26, 2026
…landed); fix Windows build: use c10::frac_sqrt_2 instead of M_SQRT1_2 in UnaryOps.cpp

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 26, 2026
Every generated ATen/ops/<op>.h includes ATen/Context.h, but the
generated code in those headers doesn't use anything from it. Since most
of aten/src/ATen/native is built with per-operator headers, this makes
nearly every kernel TU depend on Context.h, which changes often (new
global settings: TF32/precision flags, BLAS/SDPA backend knobs, ...),
and every such change recompiles most of the tree.

Drop the include from the template. Based on a static include-graph scan
of in-tree sources with AT_PER_OPERATOR_HEADERS defined, the number of
translation units that depend on ATen/Context.h drops from about 1520 to
about 1030 of about 2500. ATen/Functions.h and ATen/ATen.h still include
ATen/Context.h, so code using those is unaffected. Out-of-tree code that
includes only ATen/ops/*.h and uses at::globalContext() must now include
ATen/Context.h itself.

UnaryOps.cpp used M_SQRT1_2, which MSVC only defines when
_USE_MATH_DEFINES is set; it was getting that through ATen/Context.h ->
ATen/CPUGeneratorImpl.h -> ATen/core/MT19937RNGEngine.h. Use
c10::frac_sqrt_2<double> from c10/util/MathConstants.h (already
included) instead.

Three torch-xpu-ops kernels called globalContext() without including
ATen/Context.h; intel/torch-xpu-ops#5749
(intel/torch-xpu-ops#5749) fixed them, and
third_party/xpu.txt already points at a torch-xpu-ops commit that
includes it (#201371).

Test plan: regenerated the headers with torchgen, then ran every
non-third-party host C++ TU of a Linux CUDA build (MKLDNN, XNNPACK and
NNPACK off) with -fsyntax-only (1905 TUs) and compiled with nvcc every
CUDA TU that no longer reaches Context.h (64 TUs); all pass. MKLDNN-,
ROCm-, MPS-, XPU- and Windows-only code, and torch-xpu-ops at the
current pin, were checked only by static scans for uses of Context.h
symbols and of M_* math constants without _USE_MATH_DEFINES.

ghstack-source-id: 4166e6f
Pull-Request: #200676
pytorchmergebot pushed a commit that referenced this pull request Oct 27, 2026
Every generated ATen/ops/<op>.h includes ATen/Context.h, but the
generated code in those headers doesn't use anything from it. Since most
of aten/src/ATen/native is built with per-operator headers, this makes
nearly every kernel TU depend on Context.h, which changes often (new
global settings: TF32/precision flags, BLAS/SDPA backend knobs, ...),
and every such change recompiles most of the tree.

Drop the include from the template. Based on a static include-graph scan
of in-tree sources with AT_PER_OPERATOR_HEADERS defined, the number of
translation units that depend on ATen/Context.h drops from about 1520 to
about 1030 of about 2500. ATen/Functions.h and ATen/ATen.h still include
ATen/Context.h, so code using those is unaffected. Out-of-tree code that
includes only ATen/ops/*.h and uses at::globalContext() must now include
ATen/Context.h itself.

UnaryOps.cpp used M_SQRT1_2, which MSVC only defines when
_USE_MATH_DEFINES is set; it was getting that through ATen/Context.h ->
ATen/CPUGeneratorImpl.h -> ATen/core/MT19937RNGEngine.h. Use
c10::frac_sqrt_2<double> from c10/util/MathConstants.h (already
included) instead.

Three torch-xpu-ops kernels called globalContext() without including
ATen/Context.h; intel/torch-xpu-ops#5749
(intel/torch-xpu-ops#5749) fixed them, and
third_party/xpu.txt already points at a torch-xpu-ops commit that
includes it (#201371).

Test plan: regenerated the headers with torchgen, then ran every
non-third-party host C++ TU of a Linux CUDA build (MKLDNN, XNNPACK and
NNPACK off) with -fsyntax-only (1905 TUs) and compiled with nvcc every
CUDA TU that no longer reaches Context.h (64 TUs); all pass. MKLDNN-,
ROCm-, MPS-, XPU- and Windows-only code, and torch-xpu-ops at the
current pin, were checked only by static scans for uses of Context.h
symbols and of M_* math constants without _USE_MATH_DEFINES.

ghstack-source-id: 11c0756
Pull-Request: #200676
pytorchmergebot pushed a commit that referenced this pull request Oct 27, 2026
…0676)

Every generated ATen/ops/<op>.h includes ATen/Context.h, but the
generated code in those headers doesn't use anything from it. Since most
of aten/src/ATen/native is built with per-operator headers, this makes
nearly every kernel TU depend on Context.h, which changes often (new
global settings: TF32/precision flags, BLAS/SDPA backend knobs, ...),
and every such change recompiles most of the tree.

Drop the include from the template. Based on a static include-graph scan
of in-tree sources with AT_PER_OPERATOR_HEADERS defined, the number of
translation units that depend on ATen/Context.h drops from about 1520 to
about 1030 of about 2500. ATen/Functions.h and ATen/ATen.h still include
ATen/Context.h, so code using those is unaffected. Out-of-tree code that
includes only ATen/ops/*.h and uses at::globalContext() must now include
ATen/Context.h itself.

UnaryOps.cpp used M_SQRT1_2, which MSVC only defines when
_USE_MATH_DEFINES is set; it was getting that through ATen/Context.h ->
ATen/CPUGeneratorImpl.h -> ATen/core/MT19937RNGEngine.h. Use
c10::frac_sqrt_2<double> from c10/util/MathConstants.h (already
included) instead.

Three torch-xpu-ops kernels called globalContext() without including
ATen/Context.h; intel/torch-xpu-ops#5749
(intel/torch-xpu-ops#5749) fixed them, and
third_party/xpu.txt already points at a torch-xpu-ops commit that
includes it (#201371).

Test plan: regenerated the headers with torchgen, then ran every
non-third-party host C++ TU of a Linux CUDA build (MKLDNN, XNNPACK and
NNPACK off) with -fsyntax-only (1905 TUs) and compiled with nvcc every
CUDA TU that no longer reaches Context.h (64 TUs); all pass. MKLDNN-,
ROCm-, MPS-, XPU- and Windows-only code, and torch-xpu-ops at the
current pin, were checked only by static scans for uses of Context.h
symbols and of M_* math constants without _USE_MATH_DEFINES.
Pull Request resolved: #200676
Approved by: https://github.com/Skylion007, https://github.com/guangyey
dominikjastrzebskix pushed a commit to dominikjastrzebskix/pytorch that referenced this pull request Nov 5, 2026
…orch#200676)

Every generated ATen/ops/<op>.h includes ATen/Context.h, but the
generated code in those headers doesn't use anything from it. Since most
of aten/src/ATen/native is built with per-operator headers, this makes
nearly every kernel TU depend on Context.h, which changes often (new
global settings: TF32/precision flags, BLAS/SDPA backend knobs, ...),
and every such change recompiles most of the tree.

Drop the include from the template. Based on a static include-graph scan
of in-tree sources with AT_PER_OPERATOR_HEADERS defined, the number of
translation units that depend on ATen/Context.h drops from about 1520 to
about 1030 of about 2500. ATen/Functions.h and ATen/ATen.h still include
ATen/Context.h, so code using those is unaffected. Out-of-tree code that
includes only ATen/ops/*.h and uses at::globalContext() must now include
ATen/Context.h itself.

UnaryOps.cpp used M_SQRT1_2, which MSVC only defines when
_USE_MATH_DEFINES is set; it was getting that through ATen/Context.h ->
ATen/CPUGeneratorImpl.h -> ATen/core/MT19937RNGEngine.h. Use
c10::frac_sqrt_2<double> from c10/util/MathConstants.h (already
included) instead.

Three torch-xpu-ops kernels called globalContext() without including
ATen/Context.h; intel/torch-xpu-ops#5749
(intel/torch-xpu-ops#5749) fixed them, and
third_party/xpu.txt already points at a torch-xpu-ops commit that
includes it (pytorch#201371).

Test plan: regenerated the headers with torchgen, then ran every
non-third-party host C++ TU of a Linux CUDA build (MKLDNN, XNNPACK and
NNPACK off) with -fsyntax-only (1905 TUs) and compiled with nvcc every
CUDA TU that no longer reaches Context.h (64 TUs); all pass. MKLDNN-,
ROCm-, MPS-, XPU- and Windows-only code, and torch-xpu-ops at the
current pin, were checked only by static scans for uses of Context.h
symbols and of M_* math constants without _USE_MATH_DEFINES.
Pull Request resolved: pytorch#200676
Approved by: https://github.com/Skylion007, https://github.com/guangyey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged ready for review Automated review passed, ready for a final review by a maintainer. topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants