Skip to content

Commit 6db9ffb

Browse files
committed
chore: Rebase with master
Signed-off-by: Dheeraj Peri <[email protected]>
2 parents 34366b3 + 8498287 commit 6db9ffb

File tree

946 files changed

+318673
-1844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

946 files changed

+318673
-1844
lines changed

.circleci/config.yml

Lines changed: 144 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,56 @@ commands:
282282
mkdir -p /tmp/dist/builds
283283
cp dist/* /tmp/dist/builds
284284
285+
build-py-ngc:
286+
description: "Build the torch-tensorrt python release for NGC PyTorch (cxx11-abi)"
287+
parameters:
288+
release:
289+
type: boolean
290+
default: false
291+
torch-base-image:
292+
type: string
293+
default: nvcr.io/nvidia/pytorch:latest
294+
steps:
295+
- run:
296+
name: Log into docker
297+
command: |
298+
docker login --username="\$oauthtoken" --password=$NGC_TOKEN nvcr.io
299+
- run:
300+
name: Pull image
301+
command: |
302+
docker pull << parameters.torch-base-image >>
303+
- run:
304+
name: Create container
305+
command: |
306+
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 >>
307+
- run:
308+
name: Install build deps
309+
command: |
310+
export BAZEL_VERSION="$(cat /home/circleci/project/.bazelversion)"
311+
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"
312+
docker exec ngc_build_container bash -c "mv /workspace/docker/WORKSPACE.ngc /workspace/WORKSPACE"
313+
docker exec ngc_build_container bash -c "cd /workspace/py && pip install wheel setuptools pybind11==2.6.2"
314+
docker exec ngc_build_container bash -c "git config --global --add safe.directory /workspace"
315+
- when:
316+
condition: << parameters.release >>
317+
steps:
318+
- run:
319+
name: Build torch-tensorrt release build for NGC
320+
command: |
321+
docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi --release"
322+
- unless:
323+
condition: << parameters.release >>
324+
steps:
325+
- run:
326+
name: Build torch-tensorrt debug build for NGC
327+
command: |
328+
docker exec ngc_build_container bash -c "cd /workspace/py && python3 setup.py bdist_wheel --use-cxx11-abi"
329+
- run:
330+
name: Collect builds
331+
command: |
332+
mkdir -p /tmp/dist/builds
333+
cp /home/circleci/project/py/dist/* /tmp/dist/builds
334+
285335
build-cmake:
286336
description: "Build the torch-tensorrt using CMake"
287337
parameters:
@@ -385,6 +435,7 @@ commands:
385435
mkdir -p /tmp/artifacts/test_results
386436
cd tests/py
387437
pytest --junitxml=/tmp/artifacts/test_results/api/api_test_results.xml api/
438+
pytest --junitxml=/tmp/artifacts/test_results/models/models_test_results.xml models/
388439
pytest --junitxml=/tmp/artifacts/test_results/integrations/integrations_test_results.xml integrations/
389440
cd ~/project
390441
@@ -829,7 +880,7 @@ jobs:
829880
TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
830881
TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
831882
CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
832-
pip3 install -r ~/project/py/requirements.txt
883+
python3 -m pip install pybind11==2.6.2
833884
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
834885
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
835886
- run:
@@ -881,6 +932,64 @@ jobs:
881932
path: /tmp/dist/cmake
882933
destination: x86_64-cmake
883934

935+
build-x86_64-pyt-ngc:
936+
parameters:
937+
torch-base-image:
938+
type: string
939+
machine:
940+
image: ubuntu-2004-cuda-11.4:202110-01
941+
resource_class: xlarge
942+
steps:
943+
- checkout
944+
- build-py-ngc:
945+
release: false
946+
torch-base-image: << parameters.torch-base-image >>
947+
- run:
948+
name: Move to NGC dir
949+
command: |
950+
mkdir -p /tmp/dist/ngc
951+
cp -r /tmp/dist/builds/* /tmp/dist/ngc
952+
- persist_to_workspace:
953+
root: /tmp/dist
954+
paths:
955+
- ngc
956+
- store_artifacts:
957+
path: /tmp/dist/ngc
958+
destination: x86_64-pyt-ngc
959+
960+
package-x86_64-ngc:
961+
parameters:
962+
enabled:
963+
type: boolean
964+
default: false
965+
torch-base-image:
966+
type: string
967+
machine:
968+
image: ubuntu-2004-cuda-11.4:202110-01
969+
resource_class: xlarge
970+
steps:
971+
- when:
972+
condition: << parameters.enabled >>
973+
steps:
974+
- checkout
975+
- build-py-ngc:
976+
release: true
977+
torch-base-image: << parameters.torch-base-image >>
978+
- run:
979+
name: Collect packages
980+
command: |
981+
mkdir -p /tmp/dist/ngc
982+
cp -r ~/project/py/dist/* /tmp/dist/ngc
983+
- store_artifacts:
984+
path: /tmp/dist/ngc
985+
destination: x86_64-ngc-pkgs
986+
- unless:
987+
condition: << parameters.enabled >>
988+
steps:
989+
- run:
990+
name: Skipped packaging
991+
command: echo -e "Packaging stage not enabled"
992+
884993
parameters:
885994
bazel-version:
886995
type: string
@@ -889,10 +998,10 @@ parameters:
889998
# Nightly platform config
890999
torch-nightly-build:
8911000
type: string
892-
default: "1.13.0.dev20220810+cu113"
1001+
default: "1.13.0.dev20220825+cu116"
8931002
torch-nightly-build-index:
8941003
type: string
895-
default: "https://download.pytorch.org/whl/nightly/cu113"
1004+
default: "https://download.pytorch.org/whl/nightly/cu116"
8961005
cudnn-nightly-version:
8971006
type: string
8981007
default: "8.4.1"
@@ -901,15 +1010,15 @@ parameters:
9011010
default: "8.4.1"
9021011
trt-nightly-version-long:
9031012
type: string
904-
default: "8.4.1.5"
1013+
default: "8.4.3.1"
9051014

9061015
# Release platform config
9071016
torch-release-build:
9081017
type: string
909-
default: "1.12.0+cu113"
1018+
default: "1.12.1+cu116"
9101019
torch-release-build-index:
9111020
type: string
912-
default: "https://download.pytorch.org/whl/cu113"
1021+
default: "https://download.pytorch.org/whl/cu116"
9131022
cudnn-release-version:
9141023
type: string
9151024
default: "8.4.1"
@@ -918,15 +1027,15 @@ parameters:
9181027
default: "8.4.1"
9191028
trt-release-version-long:
9201029
type: string
921-
default: "8.4.1.5"
1030+
default: "8.4.3.1"
9221031

9231032
# Jetson platform config
9241033
torch-jetson-build:
9251034
type: string
926-
default: "torch-1.13.0a0+340c4120.nv22.06-cp38-cp38-linux_aarch64.whl"
1035+
default: "torch-1.13.0a0+08820cb0.nv22.07-cp38-cp38-linux_aarch64.whl"
9271036
jetpack-version:
9281037
type: string
929-
default: "50"
1038+
default: "502"
9301039
cudnn-jetson-version:
9311040
type: string
9321041
default: "8.3.2"
@@ -937,10 +1046,18 @@ parameters:
9371046
type: string
9381047
default: "8.4.1.5"
9391048

1049+
torch-ngc-base-image:
1050+
type: string
1051+
default: "nvcr.io/nvidia/pytorch:22.07-py3"
1052+
9401053
enable-packaging:
9411054
type: boolean
9421055
default: false
9431056

1057+
enable-ngc-packaging:
1058+
type: boolean
1059+
default: false
1060+
9441061
# Invoke jobs via workflows
9451062
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
9461063
workflows:
@@ -1028,10 +1145,6 @@ workflows:
10281145
release:
10291146
when: << pipeline.parameters.enable-packaging >>
10301147
jobs:
1031-
- build-aarch64-pyt-jetson:
1032-
torch-build: << pipeline.parameters.torch-jetson-build >>
1033-
jetpack-version: << pipeline.parameters.jetpack-version >>
1034-
python-version: 3.8.10
10351148

10361149
- build-x86_64-pyt-release:
10371150
torch-build: << pipeline.parameters.torch-release-build >>
@@ -1077,9 +1190,26 @@ workflows:
10771190
- test-py-ts-x86_64-pyt-release
10781191
- test-py-fx-x86_64-pyt-release
10791192

1193+
ngc-release:
1194+
when: << pipeline.parameters.enable-ngc-packaging >>
1195+
jobs:
1196+
- build-aarch64-pyt-jetson:
1197+
torch-build: << pipeline.parameters.torch-jetson-build >>
1198+
jetpack-version: << pipeline.parameters.jetpack-version >>
1199+
python-version: 3.8.10
1200+
1201+
- build-x86_64-pyt-ngc:
1202+
torch-base-image: << pipeline.parameters.torch-ngc-base-image >>
1203+
1204+
- package-x86_64-ngc:
1205+
torch-base-image: << pipeline.parameters.torch-ngc-base-image >>
1206+
enabled: << pipeline.parameters.enable-ngc-packaging >>
1207+
requires:
1208+
- build-x86_64-pyt-ngc
1209+
10801210
- package-jetson:
10811211
name: package-release-aarch64-jetson
1082-
enabled: << pipeline.parameters.enable-packaging >>
1212+
enabled: << pipeline.parameters.enable-ngc-packaging >>
10831213
torch-build: << pipeline.parameters.torch-jetson-build >>
10841214
jetpack-version: << pipeline.parameters.jetpack-version >>
10851215
python-version: 3.8.10

.github/workflows/docgen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up Python 3.9.4
3232
uses: actions/setup-python@v2
3333
with:
34-
python-version: 3.9.4
34+
python-version: 3.9.4
3535
- uses: actions/checkout@v2
3636
with:
3737
ref: ${{github.head_ref}}

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
pip3 install -r $GITHUB_WORKSPACE/.github/scripts/requirements.txt
4040
pip3 install -r $GITHUB_WORKSPACE/requirements-dev.txt
4141
- name: Lint C++
42-
run: |
42+
run: |
4343
cd $GITHUB_WORKSPACE
4444
python3 $GITHUB_WORKSPACE/.github/scripts/run_cpp_linter.py
4545
env:

.gitmodules

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
[submodule "toolchains/nv_workspaces"]
2-
path = toolchains/nv_workspaces
3-
url = ssh://[email protected]:12051/torch-tensorrt/WORKSPACES.git
4-
branch = master
5-
ignore = dirty

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ torch.jit.save(trt_ts_module, "trt_torchscript_module.ts") # save the TRT embedd
113113
These are the following dependencies used to verify the testcases. Torch-TensorRT can work with other versions, but the tests are not guaranteed to pass.
114114

115115
- Bazel 5.2.0
116-
- Libtorch 1.12.0 (built with CUDA 11.3)
117-
- CUDA 11.3
116+
- Libtorch 1.12.1 (built with CUDA 11.6)
117+
- CUDA 11.6
118118
- cuDNN 8.4.1
119-
- TensorRT 8.4.1.5
119+
- TensorRT 8.4.3.1
120120

121121
## Prebuilt Binaries and Wheel files
122122

WORKSPACE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ new_local_repository(
5656
http_archive(
5757
name = "libtorch",
5858
build_file = "@//third_party/libtorch:BUILD",
59-
sha256 = "80f089939de20e68e3fcad4dfa72a26c8bf91b5e77b11042f671f39ebac35865",
59+
sha256 = "5a392132fbff9db1482eae72a30f74b09f53a47edf8305fe9688d4ce7ddb0b6b",
6060
strip_prefix = "libtorch",
61-
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.12.0%2Bcu113.zip"],
61+
urls = ["https://download.pytorch.org/libtorch/cu116/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcu116.zip"],
6262
)
6363

6464
http_archive(
6565
name = "libtorch_pre_cxx11_abi",
6666
build_file = "@//third_party/libtorch:BUILD",
67-
sha256 = "8e35371403f7052d9e9b43bcff383980dbde4df028986dc1dab539953481d55f",
67+
sha256 = "5e044cc56a29cd4f3a7198c0fe5b2f0fa8f4c38cd71a0491274b6a914e8f24a7",
6868
strip_prefix = "libtorch",
69-
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.12.0%2Bcu113.zip"],
69+
urls = ["https://download.pytorch.org/libtorch/cu116/libtorch-shared-with-deps-1.12.1%2Bcu116.zip"],
7070
)
7171

7272
# Download these tarballs manually from the NVIDIA website
@@ -86,10 +86,10 @@ http_archive(
8686
http_archive(
8787
name = "tensorrt",
8888
build_file = "@//third_party/tensorrt/archive:BUILD",
89-
sha256 = "8107861af218694130f170e071f49814fa3e27f1386ce7cb6d807ac05a7fcf0e",
90-
strip_prefix = "TensorRT-8.4.1.5",
89+
sha256 = "8d7c2085c1639dcc73875048c23598a8526ce3089136876e31d90258e49e4f61",
90+
strip_prefix = "TensorRT-8.4.3.1",
9191
urls = [
92-
"https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.4.1/tars/tensorrt-8.4.1.5.linux.x86_64-gnu.cuda-11.6.cudnn8.4.tar.gz",
92+
"https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/8.4.3/tars/tensorrt-8.4.3.1.linux.x86_64-gnu.cuda-11.6.cudnn8.4.tar.gz",
9393
],
9494
)
9595

0 commit comments

Comments
 (0)