Skip to content

ci: add pytorch 2.11 to cpu tests#21679

Open
bhimrazy wants to merge 7 commits intoLightning-AI:masterfrom
bhimrazy:add-pytorch-2.11-cpu
Open

ci: add pytorch 2.11 to cpu tests#21679
bhimrazy wants to merge 7 commits intoLightning-AI:masterfrom
bhimrazy:add-pytorch-2.11-cpu

Conversation

@bhimrazy
Copy link
Copy Markdown
Collaborator

@bhimrazy bhimrazy commented Apr 20, 2026

What does this PR do?

Adds PyTorch 2.11 to the CPU test matrices for fabric and pytorch packages.

Additionally, this PR addresses a few compatibility changes necessary for PyTorch 2.11:

  • Updates onnx-ir version requirement (>= 0.1.16) to satisfy PyTorch 2.11's ONNX dynamo exporter.
  • Updates test_torch_autocast_cache_behavior_with_no_grad to account for an upstream fix in PyTorch 2.11 (PR #165068) which correctly prevents the autocast cache from erroneously retaining the no_grad state.
  • Skips the xfail marker for makeDeviceForHostname(): unsupported gloo device on Windows for PyTorch >= 2.11, as this issue has been resolved upstream.
Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--21679.org.readthedocs.build/en/21679/

@github-actions github-actions Bot added the ci Continuous Integration label Apr 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (0e20e15) to head (182a472).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21679   +/-   ##
=======================================
  Coverage      87%      87%           
=======================================
  Files         270      270           
  Lines       23973    23974    +1     
=======================================
+ Hits        20748    20749    +1     
  Misses       3225     3225           

- Bump `onnx-ir < 0.3.0` to support PyTorch 2.11 schemas
- Update AMP test to expect `grad_fn` since PyTorch 2.11 fixed the autocast cache bug (pytorch/pytorch#165068)
@github-actions github-actions Bot added pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Apr 20, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 7, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (78bf021) to head (de485ca).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21679   +/-   ##
=======================================
  Coverage      87%      87%           
=======================================
  Files         270      270           
  Lines       23973    23974    +1     
=======================================
+ Hits        20748    20749    +1     
  Misses       3225     3225           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration dependencies Pull requests that update a dependency file pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants