Skip to content

Commit 6ffac46

Browse files
authored
Merge branch 'master' into cumsum
2 parents 7b71dd9 + e81367b commit 6ffac46

File tree

510 files changed

+89742
-1737
lines changed

Some content is hidden

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

510 files changed

+89742
-1737
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+2-1
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/scripts/run_cpp_linter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626

2727
pr.create_review(commit, comment, approval)
2828

29-
29+
if output.returncode != 0:
30+
exit(1)
31+
else:
32+
exit(0)

.github/scripts/run_py_linter.py

+5
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@
2525
approval = 'REQUEST_CHANGES'
2626

2727
pr.create_review(commit, comment, approval)
28+
29+
if output.returncode != 0:
30+
exit(1)
31+
else:
32+
exit(0)

.github/workflows/docgen.yml

+19-13
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,32 @@ 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:
1520
- uses: actions/checkout@v2
1621
with:
1722
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"
23+
- name: Get HEAD SHA
24+
id: vars
25+
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
26+
- name: Build Python Package
27+
run: |
28+
cp docker/WORKSPACE.docs WORKSPACE
29+
cd py
30+
python3 setup.py install
31+
- name: Generate New Docs
32+
run: |
33+
cd docsrc
34+
make html
2835
- uses: stefanzweifel/git-auto-commit-action@v4
2936
with:
3037
# Required
31-
commit_message: >
32-
docs: [Automated] Regenerating documenation from ${{github.head_ref}}
38+
commit_message: "docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}"
3339
commit_options: "--no-verify --signoff"
3440
file_pattern: docs/
3541
commit_user_name: TRTorch Github Bot

.github/workflows/linter.yml

+2-2
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

.gitignore

+4-1
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,6 @@ 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

BUILD

+12-14
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,28 @@ pkg_tar(
1515
"//core/conversion:include",
1616
"//core/conversion/conversionctx:include",
1717
"//core/conversion/converters:include",
18-
"//core/conversion/var:include",
19-
"//core/conversion/tensorcontainer:include",
20-
"//core/conversion/evaluators:include",
2118
"//core/conversion/converters/impl/plugins:include",
22-
"//core/runtime:include",
19+
"//core/conversion/evaluators:include",
20+
"//core/conversion/tensorcontainer:include",
21+
"//core/conversion/var:include",
2322
"//core/lowering:include",
2423
"//core/lowering/passes:include",
24+
"//core/runtime:include",
2525
"//core/util:include",
26-
"//core/util/logging:include"
26+
"//core/util/logging:include",
2727
],
2828
)
2929

3030
pkg_tar(
3131
name = "include",
32-
package_dir = "include/trtorch/",
3332
srcs = [
3433
"//cpp/api:api_headers",
3534
],
35+
package_dir = "include/trtorch/",
3636
)
3737

3838
pkg_tar(
3939
name = "lib",
40-
package_dir = "lib/",
4140
srcs = select({
4241
":windows": ["//cpp/api/lib:trtorch.dll"],
4342
"//conditions:default": [
@@ -46,26 +45,25 @@ pkg_tar(
4645
],
4746
}),
4847
mode = "0755",
48+
package_dir = "lib/",
4949
)
5050

51-
5251
pkg_tar(
5352
name = "bin",
54-
package_dir = "bin/",
5553
srcs = [
56-
"//cpp/trtorchc:trtorchc",
54+
"//cpp/trtorchc",
5755
],
5856
mode = "0755",
57+
package_dir = "bin/",
5958
)
6059

61-
6260
pkg_tar(
6361
name = "libtrtorch",
64-
extension = "tar.gz",
65-
package_dir = "trtorch",
6662
srcs = [
67-
"//:LICENSE"
63+
"//:LICENSE",
6864
],
65+
extension = "tar.gz",
66+
package_dir = "trtorch",
6967
deps = [
7068
":lib",
7169
":include",

0 commit comments

Comments
 (0)