From ddd2f01841bb7137034d9f5efb4d29f4cb9a39aa Mon Sep 17 00:00:00 2001 From: gs-olive <113141689+gs-olive@users.noreply.github.com> Date: Fri, 12 May 2023 22:20:21 -0700 Subject: [PATCH] minor fix: Add torchvision legacy CI parameter --- .circleci/config.yml | 78 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80aa8f2528..7204e13df0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -786,6 +806,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string python-version: @@ -793,6 +815,9 @@ jobs: cxx11-abi: type: boolean default: false + legacy: + type: boolean + default: false machine: image: linux-cuda-11:2023.02.1 resource_class: gpu.nvidia.small @@ -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 >> @@ -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: | @@ -839,6 +872,8 @@ jobs: type: string torch-build-index: type: string + torchvision-build: + type: string trt-version-short: type: string trt-version-long: @@ -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 @@ -877,6 +913,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -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" @@ -907,6 +946,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -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 >> @@ -939,6 +981,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -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 >> @@ -974,6 +1019,8 @@ jobs: parameters: torch-build: type: string + torchvision-build: + type: string torch-build-index: type: string trt-version-long: @@ -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 >> @@ -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" @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >> @@ -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 >>