Skip to content

fix: Add torchvision legacy CI parameter #1918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,26 @@ commands:
mkdir -p /tmp/dist/builds
cp dist/* /tmp/dist/builds

build-py-legacy:
description: "Build the torch-tensorrt python legacy release (pre-cxx11-abi)"
parameters:
platform:
type: string
default: "x86_64"
steps:
- run:
name: Build torch-tensorrt python legacy release (pre-cxx11-abi)
command: |
export CUDA_HOME=/usr/local/cuda-11.8/
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
cd py
python3 -m pip install wheel setuptools
python3 -m pip install pybind11==2.6.2
python3 setup.py bdist_wheel --legacy
python3 setup.py install --legacy
mkdir -p /tmp/dist/builds
cp dist/* /tmp/dist/builds

build-py-cxx11-abi:
description: "Build the torch-tensorrt python release (cxx11-abi)"
parameters:
Expand Down Expand Up @@ -786,13 +806,18 @@ jobs:
parameters:
torch-build:
type: string
torchvision-build:
type: string
torch-build-index:
type: string
python-version:
type: string
cxx11-abi:
type: boolean
default: false
legacy:
type: boolean
default: false
machine:
image: linux-cuda-11:2023.02.1
resource_class: gpu.nvidia.small
Expand All @@ -809,6 +834,7 @@ jobs:
bazel-platform: "x86_64"
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- when:
condition: << parameters.cxx11-abi >>
Expand All @@ -817,7 +843,14 @@ jobs:
- unless:
condition: << parameters.cxx11-abi >>
steps:
- build-py
- when:
condition: << parameters.legacy >>
steps:
- build-py-legacy
- unless:
condition: << parameters.legacy >>
steps:
- build-py
- run:
name: Move to build dir
command: |
Expand All @@ -839,6 +872,8 @@ jobs:
type: string
torch-build-index:
type: string
torchvision-build:
type: string
trt-version-short:
type: string
trt-version-long:
Expand All @@ -864,6 +899,7 @@ jobs:
trt-version-long: << parameters.trt-version-long >>
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- attach_workspace:
at: /tmp/dist
Expand All @@ -877,6 +913,8 @@ jobs:
parameters:
torch-build:
type: string
torchvision-build:
type: string
torch-build-index:
type: string
trt-version-long:
Expand All @@ -896,6 +934,7 @@ jobs:
at: /tmp/dist
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- run:
name: "Install torch-tensorrt"
Expand All @@ -907,6 +946,8 @@ jobs:
parameters:
torch-build:
type: string
torchvision-build:
type: string
torch-build-index:
type: string
trt-version-long:
Expand All @@ -924,6 +965,7 @@ jobs:
at: /tmp/dist/
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- create-py-env:
trt-version-long: << parameters.trt-version-long >>
Expand All @@ -939,6 +981,8 @@ jobs:
parameters:
torch-build:
type: string
torchvision-build:
type: string
torch-build-index:
type: string
trt-version-long:
Expand All @@ -956,6 +1000,7 @@ jobs:
at: /tmp/dist/
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- create-py-env:
trt-version-long: << parameters.trt-version-long >>
Expand All @@ -974,6 +1019,8 @@ jobs:
parameters:
torch-build:
type: string
torchvision-build:
type: string
torch-build-index:
type: string
trt-version-long:
Expand All @@ -991,6 +1038,7 @@ jobs:
at: /tmp/dist/
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torchvision-build: << parameters.torchvision-build >>
torch-build-index: << parameters.torch-build-index >>
- create-py-env:
trt-version-long: << parameters.trt-version-long >>
Expand Down Expand Up @@ -1303,15 +1351,24 @@ parameters:
torch-build:
type: string
default: "2.1.0.dev20230419+cu118"
torchvision-build:
type: string
default: "0.16.0.dev20230419+cu118"
torch-build-index:
type: string
default: "https://download.pytorch.org/whl/nightly/cu118"
torch-build-legacy:
type: string
default: "1.13.1+cu117"
torchvision-build-legacy:
type: string
default: "0.14.1+cu117"
torch-build-index-legacy:
type: string
default: "https://download.pytorch.org/whl/cu117"
enable-legacy:
type: boolean
default: true
cudnn-version:
type: string
default: "8.8.0.121"
Expand Down Expand Up @@ -1367,11 +1424,13 @@ workflows:
- build-x86_64-linux:
name: build-x86_64-linux
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
python-version: << pipeline.parameters.python-version >>

- test-core-cpp-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-short: << pipeline.parameters.trt-version-short >>
trt-version-long: << pipeline.parameters.trt-version-long >>
Expand All @@ -1382,6 +1441,7 @@ workflows:

- test-py-ts-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1390,6 +1450,7 @@ workflows:

- test-py-fx-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1398,6 +1459,7 @@ workflows:

- test-py-dynamo-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1407,12 +1469,15 @@ workflows:
- build-x86_64-linux:
name: build-x86_64-linux-legacy
torch-build: << pipeline.parameters.torch-build-legacy >>
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
python-version: << pipeline.parameters.python-version >>
legacy: << pipeline.parameters.enable-legacy >>

- test-core-cpp-x86_64-linux:
name: test-core-cpp-x86_64-linux-legacy
torch-build: << pipeline.parameters.torch-build-legacy >>
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
trt-version-short: << pipeline.parameters.trt-version-short >>
trt-version-long: << pipeline.parameters.trt-version-long >>
Expand All @@ -1424,6 +1489,7 @@ workflows:
- test-py-ts-x86_64-linux:
name: test-py-ts-x86_64-linux-legacy
torch-build: << pipeline.parameters.torch-build-legacy >>
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1432,6 +1498,7 @@ workflows:

- test-py-fx-x86_64-linux-no-aten:
torch-build: << pipeline.parameters.torch-build-legacy >>
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1454,6 +1521,7 @@ workflows:

- test-core-cpp-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-short: << pipeline.parameters.trt-version-short >>
trt-version-long: << pipeline.parameters.trt-version-long >>
Expand All @@ -1464,6 +1532,7 @@ workflows:

- test-py-ts-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1472,6 +1541,7 @@ workflows:

- test-py-fx-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1480,6 +1550,7 @@ workflows:

- test-py-dynamo-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1490,11 +1561,13 @@ workflows:
jobs:
- build-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
python-version: << pipeline.parameters.python-version >>

- test-core-cpp-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-short: << pipeline.parameters.trt-version-short >>
trt-version-long: << pipeline.parameters.trt-version-long >>
Expand All @@ -1505,6 +1578,7 @@ workflows:

- test-py-ts-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1513,6 +1587,7 @@ workflows:

- test-py-fx-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand All @@ -1521,6 +1596,7 @@ workflows:

- test-py-dynamo-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torchvision-build: << pipeline.parameters.torchvision-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
python-version: << pipeline.parameters.python-version >>
Expand Down