mirror of
https://github.com/Lightning-AI/pytorch-lightning.git
synced 2026-10-12 02:06:43 +00:00
* ci: bump torch ceiling to <2.14.0 now that torch-tensorrt 2.13 is out Follow-up to #21851, which capped torch at <2.13.0 because torch-tensorrt had no stable build past it yet. torch-tensorrt 2.13.0 (released 2026-07-28) now requires torch>=2.13.0,<2.14.0, so the cap can move up. * test: skip TS-frontend torch-tensorrt cases when the build lacks it CI on torch-tensorrt 2.13 failed: ValueError: Requested using the TS frontend but the TS frontend is not available in this build of Torch-TensorRT The TorchScript frontend has been deprecated since torch-tensorrt 2.6 and is no longer bundled in some prebuilt wheels (e.g. 2.13+), independent of the torch version. The existing torch==2.9 skip only covered a different failure mode (a crash), so add a runtime check against torch_tensorrt.ENABLED_FEATURES.torchscript_frontend and skip ir="ts" cases whenever the installed build doesn't have it. * test: report accurate skip reason for missing TorchScript frontend Corrects the previous commit's rationale. The TorchScript frontend is not removed in torch-tensorrt 2.13 -- the PyPI wheel still ships libtorchtrt.so and the release notes even include TS bug fixes. What changed is packaging: the 2.13.0+cu130 wheel on download.pytorch.org is pure Python (608 KB, zero .so files), while 2.12.1+cu130 bundled libtorchtrt.so. GPU CI installs from that index via --find-links, so it gets a build without the frontend. Feature detection via ENABLED_FEATURES.torchscript_frontend stays (it is the portable check -- has_torchscript_frontend() only exists in newer releases), but the two skip conditions are now separate marks so the report names the one that actually applies instead of a misleading combined message. * test: ignore torch 2.13 all_gather_into_tensor deprecation from DeepSpeed The call comes from DeepSpeed's ZeRO-3 checkpointing; the API appears nowhere in Lightning's source or tests, so there is nothing to migrate on our side. * ci: resolve torch-tensorrt from PyPI to keep the TorchScript frontend The 2.13.0+cu130 wheel on download.pytorch.org is pure Python (608 KB, zero .so files); 2.12.1+cu130 bundled libtorchtrt.so. Since a local version sorts above the plain release, the find-links entry always won and the TorchScript frontend went missing. PyPI's 2.13.0 ships the libraries and is likewise a CUDA 13 build. * test: widen the DeepSpeed collective filter to the module torch 2.13 renamed the `*_tensor` collectives to `*_single`, and DeepSpeed's backend calls both `all_gather_into_tensor` and `reduce_scatter_tensor` from deepspeed/comm/torch.py, so filtering one message at a time is whack-a-mole. Filter on the module instead, matching the existing ddp_comm_hooks entry. Bumping DeepSpeed would not help: 0.19.4 still binds torch.distributed.reduce_scatter_tensor via hasattr and has no migration to the new names. * test: ignore the exact torch 2.13 collective deprecation messages The earlier module-based filter (`deepspeed.comm.torch`) never matched: `typing_extensions.deprecated()` uses stacklevel=2, which attributes the warning to whoever called the deprecated function, and every collective is wrapped by torch's own `c10d_logger`, so that's always the immediate caller - not DeepSpeed. A module filter scoped to `torch.distributed.c10d_logger` would work but also swallow any *other* collective deprecation raised through that same wrapper, which is broader than intended. Match the two known messages instead, same as the other entries in this list. Verified locally against torch 2.13 (CPU-only) with a fake DeepSpeed-shaped caller.