From 7c1a742a3d35716430678bf00e3fcfaf9a2d6742 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Thu, 25 Aug 2022 14:21:59 -0700 Subject: [PATCH 01/22] chore: Adding NGC build path --- .circleci/config.yml | 125 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14f4a8ee20..44d7163b8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -282,6 +282,40 @@ commands: mkdir -p /tmp/dist/builds cp dist/* /tmp/dist/builds + build-py-ngc: + description: "Build the torch-tensorrt python release for NGC PyTorch (cxx11-abi)" + parameters: + release: + type: bool + default: false + steps: + - run: + name: Build torch-tensorrt python release (pre-cxx11-abi) + command: | + mv toolchains/docker/WORKSPACE.ngc WORKSPACE + cd py + python3 -m pip install wheel setuptools + python3 -m pip install pybind11==2.6.2 + - when: + condition: << parameters.release >> + steps: + - run: + name: Build torch-tensorrt debug build for NGC + command: | + python3 setup.py bdist_wheel --use-cxx11-abi + - unless: + condition: << parameters.release >> + steps: + - run: + name: Build torch-tensorrt release build for NGC + command: | + python3 setup.py bdist_wheel --use-cxx11-abi --release + - run: + name: Collect builds + command: | + mkdir -p /tmp/dist/builds + cp dist/* /tmp/dist/builds + build-cmake: description: "Build the torch-tensorrt using CMake" parameters: @@ -881,6 +915,71 @@ jobs: path: /tmp/dist/cmake destination: x86_64-cmake + build-x86_64-pyt-ngc: + parameters: + torch-build: + type: string + torch-build-index: + type: string + cxx11-abi: + type: boolean + default: false + machine: + image: nvcr.io/nvidia/pytorch:22.07-py3 + resource_class: xlarge + steps: + - checkout + - install-bazel: + bazel-version: << pipeline.parameters.bazel-version >> + bazel-platform: "x86_64" + - build-py-ngc: + release: false + - run: + name: Move to NGC dir + command: | + mkdir -p /tmp/dist/ngc + cp -r /tmp/dist/builds/* /tmp/dist/ngc + - persist_to_workspace: + root: /tmp/dist + paths: + - ngc + - store_artifacts: + path: /tmp/dist/ngc + destination: x86_64-pyt-ngc + + package-x86_64-ngc: + parameters: + enabled: + type: boolean + default: false + machine: + image: nvcr.io/nvidia/pytorch:22.07-py3 + resource_class: xlarge + steps: + - when: + condition: << parameters.enabled >> + steps: + - checkout + - install-bazel: + bazel-version: << pipeline.parameters.bazel-version >> + bazel-platform: "x86_64" + - build-py-ngc: + release: true + - run: + name: Collect packages + command: | + mkdir -p /tmp/dist/ngc + cp -r ~/project/py/dist/* /tmp/dist/ngc + - store_artifacts: + path: /tmp/dist/ngc + destination: x86_64-ngc-pkgs + - unless: + condition: << parameters.enabled >> + steps: + - run: + name: Skipped packaging + command: echo -e "Packaging stage not enabled" + parameters: bazel-version: type: string @@ -923,10 +1022,10 @@ parameters: # Jetson platform config torch-jetson-build: type: string - default: "torch-1.13.0a0+340c4120.nv22.06-cp38-cp38-linux_aarch64.whl" + default: "torch-1.13.0a0+340c4120.nv22.07-cp38-cp38-linux_aarch64.whl" jetpack-version: type: string - default: "50" + default: "502" cudnn-jetson-version: type: string default: "8.3.2" @@ -941,6 +1040,10 @@ parameters: type: boolean default: false + enable-ngc-packaging: + type: boolean + default: false + # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: @@ -1028,10 +1131,6 @@ workflows: release: when: << pipeline.parameters.enable-packaging >> jobs: - - build-aarch64-pyt-jetson: - torch-build: << pipeline.parameters.torch-jetson-build >> - jetpack-version: << pipeline.parameters.jetpack-version >> - python-version: 3.8.10 - build-x86_64-pyt-release: torch-build: << pipeline.parameters.torch-release-build >> @@ -1077,6 +1176,20 @@ workflows: - test-py-ts-x86_64-pyt-release - test-py-fx-x86_64-pyt-release + ngc-release: + when: << pipeline.parameters.enable-ngc-packaging >> + jobs: + - build-aarch64-pyt-jetson: + torch-build: << pipeline.parameters.torch-jetson-build >> + jetpack-version: << pipeline.parameters.jetpack-version >> + python-version: 3.8.10 + + - build-x86_64-pyt-ngc + + - package-x86_64-ngc: + requires: + - build-x86_64-pyt-ngc + - package-jetson: name: package-release-aarch64-jetson enabled: << pipeline.parameters.enable-packaging >> From 1fbe3e7175264e3ac3a0d6e8473650d5b8a5e9fd Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:24:51 -0700 Subject: [PATCH 02/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44d7163b8b..047899aec2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -286,7 +286,7 @@ commands: description: "Build the torch-tensorrt python release for NGC PyTorch (cxx11-abi)" parameters: release: - type: bool + type: boolean default: false steps: - run: From 2fca8f5520440bff386cffea3d92ac7b6c38db46 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:27:51 -0700 Subject: [PATCH 03/22] Updated config.yml --- .circleci/config.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 047899aec2..c792389a0c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -916,16 +916,8 @@ jobs: destination: x86_64-cmake build-x86_64-pyt-ngc: - parameters: - torch-build: - type: string - torch-build-index: - type: string - cxx11-abi: - type: boolean - default: false machine: - image: nvcr.io/nvidia/pytorch:22.07-py3 + image: << pipeline.parameters.torch-ngc-base-container >> resource_class: xlarge steps: - checkout @@ -953,7 +945,7 @@ jobs: type: boolean default: false machine: - image: nvcr.io/nvidia/pytorch:22.07-py3 + image: << pipeline.parameters.torch-ngc-base-container >> resource_class: xlarge steps: - when: @@ -1036,6 +1028,10 @@ parameters: type: string default: "8.4.1.5" + torch-ngc-base-image: + type: string + default: "nvcr.io/ngc/pytorch:22.07-py3" + enable-packaging: type: boolean default: false From 2b34701765d84852b5f753671254db9607b65383 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:28:50 -0700 Subject: [PATCH 04/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c792389a0c..e52353e67d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -917,7 +917,7 @@ jobs: build-x86_64-pyt-ngc: machine: - image: << pipeline.parameters.torch-ngc-base-container >> + image: << pipeline.parameters.torch-ngc-base-image >> resource_class: xlarge steps: - checkout @@ -945,7 +945,7 @@ jobs: type: boolean default: false machine: - image: << pipeline.parameters.torch-ngc-base-container >> + image: << pipeline.parameters.torch-ngc-base-image >> resource_class: xlarge steps: - when: From d9f0bebdf4aeb58c8bb0791bd552316c4293ebc0 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:29:57 -0700 Subject: [PATCH 05/22] Updated config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e52353e67d..09b2b12939 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -922,8 +922,8 @@ jobs: steps: - checkout - install-bazel: - bazel-version: << pipeline.parameters.bazel-version >> - bazel-platform: "x86_64" + version: << pipeline.parameters.bazel-version >> + platform: "x86_64" - build-py-ngc: release: false - run: @@ -953,8 +953,8 @@ jobs: steps: - checkout - install-bazel: - bazel-version: << pipeline.parameters.bazel-version >> - bazel-platform: "x86_64" + version: << pipeline.parameters.bazel-version >> + platform: "x86_64" - build-py-ngc: release: true - run: From 3799d4acd718e0dd401e609d3ecdac50d0ad07b4 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:54:54 -0700 Subject: [PATCH 06/22] Update config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09b2b12939..668bbb862a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -916,8 +916,8 @@ jobs: destination: x86_64-cmake build-x86_64-pyt-ngc: - machine: - image: << pipeline.parameters.torch-ngc-base-image >> + docker: + - image: << pipeline.parameters.torch-ngc-base-image >> resource_class: xlarge steps: - checkout @@ -944,8 +944,8 @@ jobs: enabled: type: boolean default: false - machine: - image: << pipeline.parameters.torch-ngc-base-image >> + docker: + - image: << pipeline.parameters.torch-ngc-base-image >> resource_class: xlarge steps: - when: From aad788594a5a00857b83269a35042ca0ca2faf56 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:08:45 -0700 Subject: [PATCH 07/22] Updated config.yml --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 668bbb862a..e0ba6f4b1f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -918,6 +918,9 @@ jobs: build-x86_64-pyt-ngc: docker: - image: << pipeline.parameters.torch-ngc-base-image >> + auth: + username: $oauthtoken + password: $NGC_TOKEN resource_class: xlarge steps: - checkout @@ -946,6 +949,9 @@ jobs: default: false docker: - image: << pipeline.parameters.torch-ngc-base-image >> + auth: + username: $oauthtoken + password: $NGC_TOKEN resource_class: xlarge steps: - when: From bc619992dd99c808d8bd59f8f7d53cae24887eb7 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:12:14 -0700 Subject: [PATCH 08/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e0ba6f4b1f..7d9dc0fb73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -919,7 +919,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $oauthtoken + username: $NGC_USER password: $NGC_TOKEN resource_class: xlarge steps: @@ -950,7 +950,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $oauthtoken + username: $NGC_USER password: $NGC_TOKEN resource_class: xlarge steps: From 79d16f13d3d886c20ac56e7418d7b6bb7f293771 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:19:38 -0700 Subject: [PATCH 09/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d9dc0fb73..e5cdbd0366 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -919,7 +919,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $NGC_USER + username: "$oauthtoken" password: $NGC_TOKEN resource_class: xlarge steps: @@ -950,7 +950,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $NGC_USER + username: "$oauthtoken" password: $NGC_TOKEN resource_class: xlarge steps: From 29d92fbcab6ef9e988cd2ac5a715ec8406587cac Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:44:30 -0700 Subject: [PATCH 10/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e5cdbd0366..0139c69ba9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -919,7 +919,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: "$oauthtoken" + username: $NGC_TOKEN password: $NGC_TOKEN resource_class: xlarge steps: @@ -950,7 +950,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: "$oauthtoken" + username: $NGC_TOKEN password: $NGC_TOKEN resource_class: xlarge steps: From f89f1c6df0abf23c07d4ae023a95e925ea8634d2 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 15:47:40 -0700 Subject: [PATCH 11/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0139c69ba9..9471b60d0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -919,7 +919,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $NGC_TOKEN + username: '$oauthtoken' password: $NGC_TOKEN resource_class: xlarge steps: @@ -950,7 +950,7 @@ jobs: docker: - image: << pipeline.parameters.torch-ngc-base-image >> auth: - username: $NGC_TOKEN + username: '$oauthtoken' password: $NGC_TOKEN resource_class: xlarge steps: From b8202b9fcc7b73e55af382f0fbbe14a81d0cef10 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:34:33 -0700 Subject: [PATCH 12/22] Updated config.yml --- .circleci/config.yml | 62 ++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9471b60d0f..c1ed6a7091 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -288,28 +288,42 @@ commands: release: type: boolean default: false + torch-base-img: + type: string + default: nvcr.io/nvidia/pytorch:latest steps: - run: - name: Build torch-tensorrt python release (pre-cxx11-abi) + name: Log into docker command: | - mv toolchains/docker/WORKSPACE.ngc WORKSPACE - cd py - python3 -m pip install wheel setuptools - python3 -m pip install pybind11==2.6.2 + docker login --username "$oauthtoken" --password $NGC_TOKEN + - run: + name: Pull image + command: | + docker pull << parameters.torch-base-img >> + - run: + name: Create container + command: | + docker run -it -d --name ngc_build_container -v /home/circleci/project:/workspace -w /workspace << parameters.torch-base-img >> + - run: + name: Install build deps + command: | + docker exec ngc_build_container bash -c "wget -q https://github.com/bazelbuild/bazel/releases/download/$(cat /workspace/.bazelversion)/bazel-$(cat /workspace/.bazelversion)-linux-x86_64 -O /usr/bin/bazel && chmod a+x /usr/bin/bazel" + docker exec ngc_build_container bash -c "mv /workspace/toolchains/docker/WORKSPACE.ngc /workspace/WORKSPACE" + docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2" - when: condition: << parameters.release >> steps: - run: name: Build torch-tensorrt debug build for NGC command: | - python3 setup.py bdist_wheel --use-cxx11-abi + docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi" - unless: condition: << parameters.release >> steps: - run: name: Build torch-tensorrt release build for NGC command: | - python3 setup.py bdist_wheel --use-cxx11-abi --release + docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release" - run: name: Collect builds command: | @@ -916,19 +930,17 @@ jobs: destination: x86_64-cmake build-x86_64-pyt-ngc: - docker: - - image: << pipeline.parameters.torch-ngc-base-image >> - auth: - username: '$oauthtoken' - password: $NGC_TOKEN + parameters: + torch-base-image: + type: string + machine: + image: ubuntu-2004-cuda-11.4:202110-01 resource_class: xlarge steps: - checkout - - install-bazel: - version: << pipeline.parameters.bazel-version >> - platform: "x86_64" - build-py-ngc: release: false + torch-base-image: << parameters.torch-base-image >> - run: name: Move to NGC dir command: | @@ -947,22 +959,19 @@ jobs: enabled: type: boolean default: false - docker: - - image: << pipeline.parameters.torch-ngc-base-image >> - auth: - username: '$oauthtoken' - password: $NGC_TOKEN + torch-base-image: + type: string + machine: + image: ubuntu-2004-cuda-11.4:202110-01 resource_class: xlarge steps: - when: condition: << parameters.enabled >> steps: - checkout - - install-bazel: - version: << pipeline.parameters.bazel-version >> - platform: "x86_64" - build-py-ngc: release: true + torch-base-image: << parameters.torch-base-image >> - run: name: Collect packages command: | @@ -1186,15 +1195,18 @@ workflows: jetpack-version: << pipeline.parameters.jetpack-version >> python-version: 3.8.10 - - build-x86_64-pyt-ngc + - build-x86_64-pyt-ngc: + torch-base-img: << pipeline.parameters.torch-ngc-base-image >> - package-x86_64-ngc: + torch-base-img: << pipeline.parameters.torch-ngc-base-image >> + enabled: << pipeline.parameters.enable-ngc-packaging >> requires: - build-x86_64-pyt-ngc - package-jetson: name: package-release-aarch64-jetson - enabled: << pipeline.parameters.enable-packaging >> + enabled: << pipeline.parameters.enable-ngc-packaging >> torch-build: << pipeline.parameters.torch-jetson-build >> jetpack-version: << pipeline.parameters.jetpack-version >> python-version: 3.8.10 From 32b39d060c65191ac7682f12f5871a4dc6b23bfc Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:51:10 -0700 Subject: [PATCH 13/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c1ed6a7091..4988a76111 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1196,10 +1196,10 @@ workflows: python-version: 3.8.10 - build-x86_64-pyt-ngc: - torch-base-img: << pipeline.parameters.torch-ngc-base-image >> + torch-base-image: << pipeline.parameters.torch-ngc-base-image >> - package-x86_64-ngc: - torch-base-img: << pipeline.parameters.torch-ngc-base-image >> + torch-base-image: << pipeline.parameters.torch-ngc-base-image >> enabled: << pipeline.parameters.enable-ngc-packaging >> requires: - build-x86_64-pyt-ngc From 904c6697f48fb5ca6f2cc68d335a73d2f7203efe Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:51:57 -0700 Subject: [PATCH 14/22] Updated config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4988a76111..86f8690efa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -288,7 +288,7 @@ commands: release: type: boolean default: false - torch-base-img: + torch-base-image: type: string default: nvcr.io/nvidia/pytorch:latest steps: @@ -303,7 +303,7 @@ commands: - run: name: Create container command: | - docker run -it -d --name ngc_build_container -v /home/circleci/project:/workspace -w /workspace << parameters.torch-base-img >> + docker run -it -d --name ngc_build_container -v /home/circleci/project:/workspace -w /workspace << parameters.torch-base-image >> - run: name: Install build deps command: | From 7ed1844bd55126dc14aa58e53ff47d5221f9c044 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:52:45 -0700 Subject: [PATCH 15/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86f8690efa..562e685a90 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -299,7 +299,7 @@ commands: - run: name: Pull image command: | - docker pull << parameters.torch-base-img >> + docker pull << parameters.torch-base-image >> - run: name: Create container command: | From 38811e236c63c40b423e46e48f5ecf3bc68c093e Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 17:28:26 -0700 Subject: [PATCH 16/22] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 562e685a90..e9e846803a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -295,7 +295,7 @@ commands: - run: name: Log into docker command: | - docker login --username "$oauthtoken" --password $NGC_TOKEN + docker login --username="\$oauthtoken" --password=$NGC_TOKEN nvcr.io - run: name: Pull image command: | From d308a04f650a9b88962e4a09cca6e1b4a5434902 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:22:34 -0700 Subject: [PATCH 17/22] Updated config.yml --- .circleci/config.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e9e846803a..8b53637208 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -303,32 +303,33 @@ commands: - run: name: Create container command: | - docker run -it -d --name ngc_build_container -v /home/circleci/project:/workspace -w /workspace << parameters.torch-base-image >> + docker run -it -d --name ngc_build_container -v /home/circleci/project:/workspace -e BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)" -w /workspace << parameters.torch-base-image >> - run: name: Install build deps command: | - docker exec ngc_build_container bash -c "wget -q https://github.com/bazelbuild/bazel/releases/download/$(cat /workspace/.bazelversion)/bazel-$(cat /workspace/.bazelversion)-linux-x86_64 -O /usr/bin/bazel && chmod a+x /usr/bin/bazel" - docker exec ngc_build_container bash -c "mv /workspace/toolchains/docker/WORKSPACE.ngc /workspace/WORKSPACE" + docker exec ngc_build_container bash -c "wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-x86_64 -O /usr/bin/bazel && chmod a+x /usr/bin/bazel" + docker exec ngc_build_container bash -c "mv /workspace/docker/WORKSPACE.ngc /workspace/WORKSPACE" docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2" + docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace" - when: condition: << parameters.release >> steps: - run: - name: Build torch-tensorrt debug build for NGC + name: Build torch-tensorrt release build for NGC command: | - docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi" + docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release" - unless: condition: << parameters.release >> steps: - run: - name: Build torch-tensorrt release build for NGC + name: Build torch-tensorrt debug build for NGC command: | - docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release" + docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi" - run: name: Collect builds command: | mkdir -p /tmp/dist/builds - cp dist/* /tmp/dist/builds + cp /home/circleci/project/py/dist/* /tmp/dist/builds build-cmake: description: "Build the torch-tensorrt using CMake" @@ -1045,7 +1046,7 @@ parameters: torch-ngc-base-image: type: string - default: "nvcr.io/ngc/pytorch:22.07-py3" + default: "nvcr.io/nvidia/pytorch:22.07-py3" enable-packaging: type: boolean From f00976b0df3f8112ce7a2099edd81f567eeb8636 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:31:23 -0700 Subject: [PATCH 18/22] Updated config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b53637208..fdd8462a57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -307,6 +307,7 @@ commands: - run: name: Install build deps command: | + export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)" docker exec ngc_build_container bash -c "wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-x86_64 -O /usr/bin/bazel && chmod a+x /usr/bin/bazel" docker exec ngc_build_container bash -c "mv /workspace/docker/WORKSPACE.ngc /workspace/WORKSPACE" docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2" From f9e1851cc5203d8fbb5fd907840f6d9a78358d71 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:49:06 -0700 Subject: [PATCH 19/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fdd8462a57..f0e1c8bc64 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1031,7 +1031,7 @@ parameters: # Jetson platform config torch-jetson-build: type: string - default: "torch-1.13.0a0+340c4120.nv22.07-cp38-cp38-linux_aarch64.whl" + default: "torch-1.13.0a0+08820cb0.nv22.07-cp38-cp38-linux_aarch64.whl" jetpack-version: type: string default: "502" From e5d2daf440e2b06aca300c18f2c1ad34532c1285 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Sun, 28 Aug 2022 16:57:07 -0700 Subject: [PATCH 20/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0e1c8bc64..5c3ebbfaf6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -879,7 +879,7 @@ jobs: TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") - pip3 install -r ~/project/py/requirements.txt + python3 -m pip install pybind==2.6.2 TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])") cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-aarch64-linux-jp<< parameters.jetpack-version >>.tar.gz - run: From c071536c4482009ff1f1bcc0e0fa3f6ce819ab1f Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Sun, 28 Aug 2022 19:58:45 -0700 Subject: [PATCH 21/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c3ebbfaf6..d6f81a5610 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -879,7 +879,7 @@ jobs: TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") - python3 -m pip install pybind==2.6.2 + python3 -m pip install pybind11=2.6.2 TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])") cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-aarch64-linux-jp<< parameters.jetpack-version >>.tar.gz - run: From 56ced5dd0e4128456a832116dd4d80205229ec05 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Sun, 28 Aug 2022 20:45:23 -0700 Subject: [PATCH 22/22] Updated config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6f81a5610..16cc6c9441 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -879,7 +879,7 @@ jobs: TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") - python3 -m pip install pybind11=2.6.2 + python3 -m pip install pybind11==2.6.2 TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])") cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-aarch64-linux-jp<< parameters.jetpack-version >>.tar.gz - run: