Skip to content

Commit 9fecda0

Browse files
committed
chore: rebase on master branch
Signed-off-by: Bo Wang <[email protected]>
2 parents f2ef0eb + b70c913 commit 9fecda0

File tree

1,093 files changed

+344696
-11325
lines changed

Some content is hidden

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

1,093 files changed

+344696
-11325
lines changed

.circleci/config.yml

Lines changed: 397 additions & 282 deletions
Large diffs are not rendered by default.

.github/actions/assigner/package-lock.json

Lines changed: 24 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/assigner/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"license": "BSD-3-Clause",
2020
"repository": "https://www.github.com/pytorch/TensorRT",
2121
"dependencies": {
22-
"@actions/core": "^1.8.2",
22+
"@actions/core": "^1.9.1",
2323
"@actions/github": "^5.0.3",
2424
"fs": "^0.0.1-security",
2525
"js-yaml": "^4.1.0"

.github/workflows/docgen.yml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010

1111
jobs:
1212
build-docs:
13-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-20.04
1414
container:
15-
image: docker.pkg.github.com/pytorch/tensorrt/docgen:latest
15+
image: ghcr.io/pytorch/tensorrt/docgen:latest
1616
credentials:
1717
username: ${{ github.actor }}
1818
password: ${{ secrets.GITHUB_TOKEN }}
@@ -22,23 +22,66 @@ jobs:
2222
rm -rf /usr/share/dotnet
2323
rm -rf /opt/ghc
2424
rm -rf "/usr/local/share/boost"
25+
rm -rf /usr/local/cuda/cuda-*
26+
- name: Install base deps
27+
run: |
28+
apt update
29+
DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common gcc git curl wget make zlib1g-dev bzip2 libbz2-dev lzma lzma-dev libreadline-dev libsqlite3-dev libssl-dev libffi-dev doxygen pandoc
30+
git config --global --add safe.directory '*'
31+
- name: Set up Python 3.9.4
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: 3.9.4
2535
- uses: actions/checkout@v2
2636
with:
2737
ref: ${{github.head_ref}}
2838
- name: Get HEAD SHA
2939
id: vars
3040
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
41+
- name: Get Bazel version
42+
id: bazel_info
43+
run: echo "::set-output name=version::$(cat .bazelversion)"
44+
- name: Install Bazel
45+
run: |
46+
wget -q https://github.com/bazelbuild/bazel/releases/download/${{ steps.bazel_info.outputs.version }}/bazel-${{ steps.bazel_info.outputs.version }}-linux-x86_64 -O /usr/bin/bazel
47+
chmod a+x /usr/bin/bazel
48+
- name: Install cudnn + tensorrt
49+
run: |
50+
apt-get update
51+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
52+
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
53+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
54+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
55+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
56+
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
57+
apt-get update
58+
apt-get install -y libcudnn8 libcudnn8-dev
59+
60+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
61+
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
62+
apt-get update
63+
64+
apt-get install -y libnvinfer8 libnvinfer-plugin8 libnvinfer-dev libnvinfer-plugin-dev
65+
- name: Install Torch
66+
run: |
67+
python3 -m pip install -r py/requirements.txt
3168
- name: Build Python Package
3269
run: |
33-
cp docker/WORKSPACE.docker WORKSPACE
70+
cp toolchains/ci_workspaces/WORKSPACE.x86_64 WORKSPACE
3471
cd py
72+
echo $(which python3)
73+
echo $(python3 -c 'import site; print(site.getsitepackages()[0])')
74+
mkdir -p /opt/circleci/.pyenv/versions/3.9.4/lib/python3.9/
75+
ln -s $(python3 -c 'import site; print(site.getsitepackages()[0])') /opt/circleci/.pyenv/versions/3.9.4/lib/python3.9/site-packages
3576
python3 setup.py install
77+
cd ..
3678
- name: Generate New Docs
3779
run: |
3880
cd docsrc
39-
pip3 install -r requirements.txt
81+
python3 -m pip install -r requirements.txt
4082
python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
4183
make html
84+
cd ..
4285
- uses: stefanzweifel/git-auto-commit-action@v4
4386
with:
4487
# Required

.github/workflows/linter.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ jobs:
2525
- uses: actions/checkout@v2
2626
with:
2727
ref: ${{ github.event.pull_request.head.sha }}
28-
- name: Docker login
29-
uses: docker/login-action@v1
28+
- name: Set up Python 3.9.4
29+
uses: actions/setup-python@v2
3030
with:
31-
registry: docker.pkg.github.com
32-
username: ${{ github.actor }}
33-
password: ${{ secrets.GITHUB_TOKEN }}
34-
- name: Run image
31+
python-version: 3.9.4
32+
- name: Setup env
3533
run: |
36-
docker pull docker.pkg.github.com/pytorch/tensorrt/docgen:latest
37-
docker run -it -d --name cpplinter -e GITHUB_TOKEN=$GITHUB_TOKEN -v $GITHUB_WORKSPACE:/workspace -v $GITHUB_EVENT_PATH:/GITHUB_EVENT.json -w /workspace docker.pkg.github.com/pytorch/tensorrt/docgen:latest
38-
docker exec cpplinter bash -c "cp /workspace/docker/WORKSPACE.docker /workspace/WORKSPACE"
34+
sudo ln -s $GITHUB_EVENT_PATH /GITHUB_EVENT.json
3935
env:
4036
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4137
- name: Install dependencies
4238
run: |
43-
docker exec cpplinter bash -c "pip3 install -r /workspace/.github/scripts/requirements.txt"
44-
docker exec cpplinter bash -c "pip3 install -r /workspace/requirements-dev.txt"
39+
pip3 install -r $GITHUB_WORKSPACE/.github/scripts/requirements.txt
40+
pip3 install -r $GITHUB_WORKSPACE/requirements-dev.txt
4541
- name: Lint C++
46-
run: docker exec cpplinter bash -c "cd /workspace && python3 /workspace/.github/scripts/run_cpp_linter.py"
42+
run: |
43+
cd $GITHUB_WORKSPACE
44+
python3 $GITHUB_WORKSPACE/.github/scripts/run_cpp_linter.py
45+
env:
46+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4747

4848
py-linting:
4949
name: Python Linting
@@ -65,22 +65,28 @@ jobs:
6565
- uses: actions/checkout@v2
6666
with:
6767
ref: ${{ github.event.pull_request.head.sha }}
68+
- name: Set up Python 3.9.4
69+
uses: actions/setup-python@v2
70+
with:
71+
python-version: 3.9.4
6872
- name: Docker login
6973
uses: docker/login-action@v1
7074
with:
7175
registry: docker.pkg.github.com
7276
username: ${{ github.actor }}
7377
password: ${{ secrets.GITHUB_TOKEN }}
74-
- name: Run image
78+
- name: Setup env
7579
run: |
76-
docker pull docker.pkg.github.com/pytorch/tensorrt/docgen:latest
77-
docker run -it -d --name pylinter -e GITHUB_TOKEN=$GITHUB_TOKEN -v $GITHUB_WORKSPACE:/workspace -v $GITHUB_EVENT_PATH:/GITHUB_EVENT.json -w /workspace docker.pkg.github.com/pytorch/tensorrt/docgen:latest
78-
docker exec pylinter bash -c "cp /workspace/docker/WORKSPACE.docker /workspace/WORKSPACE"
80+
sudo ln -s $GITHUB_EVENT_PATH /GITHUB_EVENT.json
7981
env:
8082
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
8183
- name: Install dependencies
8284
run: |
83-
docker exec pylinter bash -c "pip3 install -r /workspace/.github/scripts/requirements.txt"
84-
docker exec pylinter bash -c "pip3 install -r /workspace/requirements-dev.txt"
85+
pip3 install -r $GITHUB_WORKSPACE/.github/scripts/requirements.txt
86+
pip3 install -r $GITHUB_WORKSPACE/requirements-dev.txt
8587
- name: Lint Python
86-
run: docker exec pylinter bash -c "cd /workspace && python3 /workspace/.github/scripts/run_py_linter.py"
88+
run: |
89+
cd $GITHUB_WORKSPACE
90+
python3 $GITHUB_WORKSPACE/.github/scripts/run_py_linter.py
91+
env:
92+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.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

BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ pkg_tar(
2222
"//core/lowering:include",
2323
"//core/lowering/passes:include",
2424
"//core/partitioning:include",
25+
"//core/partitioning/partitioningctx:include",
26+
"//core/partitioning/partitioninginfo:include",
27+
"//core/partitioning/segmentedblock:include",
2528
"//core/plugins:impl_include",
2629
"//core/plugins:include",
2730
"//core/runtime:include",

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ trt_ts_module = torch_tensorrt.compile(torch_script_module,
8080
# For static size shape=[1, 3, 224, 224]
8181
dtype=torch.half) # Datatype of input tensor. Allowed options torch.(float|half|int8|int32|bool)
8282
],
83-
enabled_precisions = {torch.half}, # Run with FP16)
83+
enabled_precisions = {torch.half}, # Run with FP16
84+
)
8485
8586
result = trt_ts_module(input_data) # run inference
8687
torch.jit.save(trt_ts_module, "trt_torchscript_module.ts") # save the TRT embedded Torchscript
@@ -112,10 +113,10 @@ torch.jit.save(trt_ts_module, "trt_torchscript_module.ts") # save the TRT embedd
112113
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.
113114

114115
- Bazel 5.2.0
115-
- Libtorch 1.12.0 (built with CUDA 11.3)
116-
- CUDA 11.3
116+
- Libtorch 1.12.1 (built with CUDA 11.6)
117+
- CUDA 11.6
117118
- cuDNN 8.4.1
118-
- TensorRT 8.4.1.5
119+
- TensorRT 8.4.3.1
119120

120121
## Prebuilt Binaries and Wheel files
121122

WORKSPACE

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ local_repository(
4141
new_local_repository(
4242
name = "cuda",
4343
build_file = "@//third_party/cuda:BUILD",
44-
path = "/usr/local/cuda-11.3/",
44+
path = "/usr/local/cuda-11.6/",
4545
)
4646

4747
new_local_repository(
@@ -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 = "486106ddc5b5ad532f030f447940a571b924da821b9534d25c0cef5503cdfaea",
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/nightly/cu116/libtorch-cxx11-abi-shared-with-deps-1.13.0.dev20220921%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 = "b304ebf26effcbbefcec99134bcfb0127c499306343fbe2e2cd127213448a4a6",
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/nightly/cu116/libtorch-shared-with-deps-1.13.0.dev20220921%2Bcu116.zip"],
7070
)
7171

7272
# Download these tarballs manually from the NVIDIA website
@@ -76,8 +76,8 @@ http_archive(
7676
http_archive(
7777
name = "cudnn",
7878
build_file = "@//third_party/cudnn/archive:BUILD",
79-
sha256 = "7f3fbe6201708de409532a32d647af6b4bdb10d7f045d557270549e286487289",
80-
strip_prefix = "cudnn-linux-x86_64-8.4.1.114_cuda11.4-archive",
79+
sha256 = "ec96d2376d81fca42bdd3d4c3d705a99b29a065bab57f920561c763e29c67d01",
80+
strip_prefix = "cudnn-linux-x86_64-8.4.1.50_cuda11.6-archive",
8181
urls = [
8282
"https://developer.nvidia.com/compute/cudnn/secure/8.4.1/local_installers/11.6/cudnn-linux-x86_64-8.4.1.50_cuda11.6-archive.tar.xz",
8383
],
@@ -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)