Skip to content

ci: move torch-tensorrt to GPU-only test requirements#21575

Merged
bhimrazy merged 2 commits intoLightning-AI:masterfrom
bhimrazy:ci/move-tensorrt-to-gpu
Mar 9, 2026
Merged

ci: move torch-tensorrt to GPU-only test requirements#21575
bhimrazy merged 2 commits intoLightning-AI:masterfrom
bhimrazy:ci/move-tensorrt-to-gpu

Conversation

@bhimrazy
Copy link
Collaborator

@bhimrazy bhimrazy commented Mar 9, 2026

What does this PR do ?

torch-tensorrt is a GPU-only package (requires CUDA) and all its tests are gated behind @RunIf(min_cuda_gpus=1) — they're always skipped on CPU runners.

Installing it in CPU CI provides zero value but blocks PyTorch version upgrades because torch-tensorrt wheels often lag behind new PyTorch releases, causing resolution failures across the entire CPU test matrix.


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

torch-tensorrt is GPU-only (requires CUDA) and all its tests use
`@RunIf(min_cuda_gpus=1)`, so installing it in CPU CI provides no
value while blocking PyTorch version upgrades due to wheel
compatibility lag.
@github-actions github-actions bot added ci Continuous Integration pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Mar 9, 2026
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79%. Comparing base (c05cadb) to head (9a60c60).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (c05cadb) and HEAD (9a60c60). Click for more details.

HEAD has 1019 uploads less than BASE
Flag BASE (c05cadb) HEAD (9a60c60)
python3.10 24 3
cpu 263 33
lightning 119 15
pytest 131 0
python 24 3
lightning_fabric 72 0
python3.12 72 9
python3.11 48 6
python3.13 24 3
python3.12.7 71 9
pytorch2.1 24 6
pytest-full 132 33
pytorch_lightning 72 18
pytorch2.9 12 3
pytorch2.8 24 6
pytorch2.7 12 3
pytorch2.3 12 3
pytorch2.5.1 12 3
pytorch2.6 12 3
pytorch2.2.2 12 3
pytorch2.4.1 12 3
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #21575     +/-   ##
=========================================
- Coverage      87%      79%     -8%     
=========================================
  Files         270      267      -3     
  Lines       24078    24019     -59     
=========================================
- Hits        20869    18953   -1916     
- Misses       3209     5066   +1857     

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

nice !

@bhimrazy bhimrazy merged commit 283ce77 into Lightning-AI:master Mar 9, 2026
91 checks passed
@bhimrazy bhimrazy deleted the ci/move-tensorrt-to-gpu branch March 9, 2026 16:28
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.

2 participants