Skip to content

Commit 283ce77

Browse files
authored
ci: move torch-tensorrt to GPU-only test requirements (#21575)
* ci: move torch-tensorrt dependency to GPU-only requirements 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. * ci: add GPU-specific test requirements to setup
1 parent c05cadb commit 283ce77

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

.github/workflows/ci-tests-pytorch.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ jobs:
131131
run: |
132132
uv pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" \
133133
--upgrade \
134-
--find-links="${TORCH_URL}" \
135-
--find-links="https://download.pytorch.org/whl/torch-tensorrt"
134+
--find-links="${TORCH_URL}"
136135
# ensure pkg_resources is available for older python versions & packages like onnxruntime that require it
137136
uv pip install "setuptools<80.10.3"
138137
uv pip list

.lightning/workflows/pytorch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ run: |
123123
extra=$(python -c "print({'lightning': 'pytorch-'}.get('${PACKAGE_NAME}', ''))")
124124
125125
# Use find-links to prefer CUDA-specific packages from PyTorch index
126-
uv pip install -e ".[${extra}dev]" --upgrade \
126+
uv pip install -e ".[${extra}dev,${extra}test_gpu]" --upgrade \
127127
--find-links="https://download.pytorch.org/whl/${UV_TORCH_BACKEND}" \
128128
--find-links="https://download.pytorch.org/whl/${UV_TORCH_BACKEND}/torch-tensorrt"
129129
uv pip list

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ setup: update
1515
uv pip install -r requirements.txt \
1616
-r requirements/pytorch/base.txt \
1717
-r requirements/pytorch/test.txt \
18+
-r requirements/pytorch/test_gpu.txt \
1819
-r requirements/pytorch/extra.txt \
1920
-r requirements/pytorch/strategies.txt \
2021
-r requirements/fabric/base.txt \

requirements/pytorch/test.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ uvicorn # for `ServableModuleValidator` # not setting version as re-defined in
2323

2424
tensorboard >=2.11, <2.21.0 # for `TensorBoardLogger`
2525

26-
torch-tensorrt; platform_system != "Darwin" and python_version >= "3.12"
2726
huggingface-hub

requirements/pytorch/test_gpu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
torch-tensorrt; platform_system != "Darwin" and python_version >= "3.12"

0 commit comments

Comments
 (0)