Skip to content

Commit 76db42c

Browse files
committed
Merge branch 'master' of https://github.com/NVIDIA/TRTorch into new_evaluators
Signed-off-by: Naren Dasan <[email protected]>
2 parents 87398d4 + f0aab14 commit 76db42c

File tree

902 files changed

+212896
-20067
lines changed

Some content is hidden

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

902 files changed

+212896
-20067
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Steps to reproduce the behavior:
2929

3030
> Build information about the TRTorch compiler can be found by turning on debug messages
3131
32-
- PyTorch Version (e.g., 1.0):
32+
- TRTorch Version (e.g. 0.2.0):
33+
- PyTorch Version (e.g. 1.0):
3334
- CPU Architecture:
3435
- OS (e.g., Linux):
3536
- How you installed PyTorch (`conda`, `pip`, `libtorch`, source):

.github/pr-labels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"component: trtorchc":
2+
- cpp/trtorchc/**/*
3+
14
"component: api [C++]":
25
- cpp/api/**/*
36

.github/scripts/run_cpp_linter.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
comment = '''There are some changes that do not conform to C++ style guidelines:\n ```diff\n{}```'''.format(output.stdout.decode("utf-8"))
2525
approval = 'REQUEST_CHANGES'
2626

27-
pr.create_review(commit, comment, approval)
28-
29-
27+
try:
28+
pr.create_review(commit, comment, approval)
29+
except:
30+
print("Unable to submit in depth review, please review logs for linting issues")
31+
32+
if output.returncode != 0:
33+
exit(1)
34+
else:
35+
exit(0)

.github/scripts/run_py_linter.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,12 @@
2424
comment = '''There are some changes that do not conform to Python style guidelines:\n ```diff\n{}```'''.format(output.stdout.decode("utf-8"))
2525
approval = 'REQUEST_CHANGES'
2626

27-
pr.create_review(commit, comment, approval)
27+
try:
28+
pr.create_review(commit, comment, approval)
29+
except:
30+
print("Unable to submit in depth review, please review logs for linting issues")
31+
32+
if output.returncode != 0:
33+
exit(1)
34+
else:
35+
exit(0)

.github/workflows/docgen.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,37 @@ on:
1010

1111
jobs:
1212
build-docs:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-18.04
14+
container:
15+
image: docker.pkg.github.com/nvidia/trtorch/docgen:latest
16+
credentials:
17+
username: $GITHUB_ACTOR
18+
password: ${{secrets.GITHUB_TOKEN}}
1419
steps:
20+
- name: Reclaim space
21+
run: |
22+
rm -rf /usr/share/dotnet
23+
rm -rf /opt/ghc
24+
rm -rf "/usr/local/share/boost"
1525
- uses: actions/checkout@v2
1626
with:
1727
ref: ${{github.head_ref}}
18-
- name: Docker login
19-
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
20-
env:
21-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22-
- name: Run image
23-
run: docker run -it -d --name builder -v $GITHUB_WORKSPACE:/workspace -w /workspace docker.pkg.github.com/nvidia/trtorch/docgen:latest
24-
- name: Build python package
25-
run: docker exec builder bash -c "cp docker/WORKSPACE.docker WORKSPACE && cd py && python3 setup.py install"
26-
- name: Generate new docs
27-
run: docker exec builder bash -c "cd docsrc && make html"
28+
- name: Get HEAD SHA
29+
id: vars
30+
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
31+
- name: Build Python Package
32+
run: |
33+
cp docker/WORKSPACE.docs WORKSPACE
34+
cd py
35+
python3 setup.py install
36+
- name: Generate New Docs
37+
run: |
38+
cd docsrc
39+
make html
2840
- uses: stefanzweifel/git-auto-commit-action@v4
2941
with:
3042
# Required
31-
commit_message: >
32-
docs: [Automated] Regenerating documenation from ${{github.head_ref}}
43+
commit_message: "docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}"
3344
commit_options: "--no-verify --signoff"
3445
file_pattern: docs/
3546
commit_user_name: TRTorch Github Bot

.github/workflows/linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Run image
2020
run: |
2121
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/nvidia/trtorch/docgen:latest
22-
docker exec cpplinter bash -c "cp /workspace/docker/WORKSPACE.docker /workspace/WORKSPACE"
22+
docker exec cpplinter bash -c "cp /workspace/docker/WORKSPACE.docs /workspace/WORKSPACE"
2323
env:
2424
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2525
- name: Install dependencies
@@ -41,7 +41,7 @@ jobs:
4141
- name: Run image
4242
run: |
4343
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/nvidia/trtorch/docgen:latest
44-
docker exec pylinter bash -c "cp /workspace/docker/WORKSPACE.docker /workspace/WORKSPACE"
44+
docker exec pylinter bash -c "cp /workspace/docker/WORKSPACE.docs /workspace/WORKSPACE"
4545
env:
4646
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4747
- name: Install dependencies

.github/workflows/stale.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- uses: actions/stale@v1
1414
with:
1515
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: 'This issue has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days'
17-
stale-pr-message: 'This PR has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days'
16+
stale-issue-message: 'This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days'
17+
stale-pr-message: 'This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days'
1818
stale-issue-label: 'No Activity'
1919
exempt-issue-labels: 'feature request'
2020
stale-pr-label: 'No Activity'
2121
exempt-pr-labels: 'WIP'
22-
days-before-stale: 30
23-
days-before-close: 5
22+
days-before-stale: 90
23+
days-before-close: 10

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ bazel-genfiles
55
bazel-out
66
bazel-testlogs
77
bazel-TRTorch
8+
bazel-trtorch-testing
89
third_party/pytorch
910
*.jit
1011
*.jit.pt
@@ -37,4 +38,13 @@ bdist
3738
py/trtorch/_version.py
3839
py/wheelhouse
3940
py/.eggs
40-
notebooks/.ipynb_checkpoints/
41+
notebooks/.ipynb_checkpoints/
42+
*.cache
43+
tests/py/data
44+
examples/**/deps/**/*
45+
!examples/**/deps/.gitkeep
46+
examples/trtorchrt_example/trtorchrt_example
47+
examples/int8/ptq/ptq
48+
examples/int8/qat/qat
49+
examples/int8/training/vgg16/data/*
50+
examples/int8/datasets/data/*

BUILD

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,56 @@ pkg_tar(
1818
"//core/conversion/var:include",
1919
"//core/conversion/tensorcontainer:include",
2020
"//core/conversion/evaluators:include",
21-
"//core/conversion/converters/impl/plugins:include",
22-
"//core/runtime:include",
21+
"//core/ir:include",
2322
"//core/lowering:include",
2423
"//core/lowering/passes:include",
24+
"//core/partitioning:include",
25+
"//core/plugins:impl_include",
26+
"//core/plugins:include",
27+
"//core/runtime:include",
2528
"//core/util:include",
26-
"//core/util/logging:include"
29+
"//core/util/logging:include",
2730
],
2831
)
2932

3033
pkg_tar(
3134
name = "include",
32-
package_dir = "include/trtorch/",
3335
srcs = [
3436
"//cpp/api:api_headers",
3537
],
38+
package_dir = "include/trtorch/",
3639
)
3740

3841
pkg_tar(
3942
name = "lib",
40-
package_dir = "lib/",
4143
srcs = select({
4244
":windows": ["//cpp/api/lib:trtorch.dll"],
4345
"//conditions:default": [
4446
"//cpp/api/lib:libtrtorch.so",
4547
"//cpp/api/lib:libtrtorchrt.so",
48+
"//cpp/api/lib:libtrtorch_plugins.so",
4649
],
4750
}),
4851
mode = "0755",
52+
package_dir = "lib/",
4953
)
5054

51-
5255
pkg_tar(
5356
name = "bin",
54-
package_dir = "bin/",
5557
srcs = [
56-
"//cpp/trtorchc:trtorchc",
58+
"//cpp/trtorchc",
5759
],
5860
mode = "0755",
61+
package_dir = "bin/",
5962
)
6063

61-
6264
pkg_tar(
6365
name = "libtrtorch",
64-
extension = "tar.gz",
65-
package_dir = "trtorch",
6666
srcs = [
67-
"//:LICENSE"
67+
"//:LICENSE",
6868
],
69+
extension = "tar.gz",
70+
package_dir = "trtorch",
6971
deps = [
7072
":lib",
7173
":include",

0 commit comments

Comments
 (0)