Skip to content

Commit c13d86c

Browse files
author
Wei Wei
committed
Merge branch 'circleci-editor/245/circleci-project-setup' of https://github.com/pytorch/TensorRT into circleci-editor/245/circleci-project-setup
2 parents 873b0a4 + caa5ac9 commit c13d86c

File tree

1 file changed

+67
-6
lines changed

1 file changed

+67
-6
lines changed

.circleci/config.yml

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,82 @@ jobs:
1111
# image: nvcr.io/nvidia/tensorrt:22.01-py3 # does not work with customized image
1212
# https://circleci.com/docs/2.0/configuration-reference#available-linux-gpu-images
1313
image: ubuntu-2004-cuda-11.4:202110-01
14-
resource_class: gpu.nvidia.medium
14+
resource_class: gpu.nvidia.large
1515
steps:
1616
- checkout
1717
- run:
18-
name: set up environment
18+
name: install cudnn + tensorrt + bazel
19+
command: |
20+
cd ~
21+
OS=ubuntu2004
22+
wget https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
23+
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
24+
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/7fa2af80.pub
25+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
26+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
27+
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
28+
sudo apt-get update
29+
sudo apt-get install libcudnn8=8.2.1.*-1+cuda11.3
30+
sudo apt-get install libcudnn8-dev=8.2.1.*-1+cuda11.3
31+
32+
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/{OS}/x86_64/3bf863cc.pub
33+
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
34+
sudo apt-get update
35+
v=8.2.4-1+cuda11.4
36+
sudo apt-get install libnvinfer8=${v} libnvonnxparsers8=${v} libnvparsers8=${v} libnvinfer-plugin8=${v} libnvinfer-dev=${v} libnvonnxparsers-dev=${v} libnvparsers-dev=${v} libnvinfer-plugin-dev=${v} python3-libnvinfer=${v}
37+
# check available version, apt list libnvinfer8 -a
38+
BAZEL_VERSION=5.1.1
39+
sudo wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64 -O /usr/bin/bazel
40+
sudo chmod a+x /usr/bin/bazel
41+
42+
- run:
43+
name: set up python environment
1944
command: |
2045
pip3 install nvidia-pyindex
21-
pip3 install --upgrade nvidia-tensorrt
22-
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
46+
pip3 install nvidia-tensorrt==8.2.4.2
47+
pip3 install --pre torch==1.13.0.dev20220618 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
2348
pip3 install pytest parameterized expecttest
24-
49+
# install torch_tensorrt
50+
cd py
51+
python3 setup.py install
2552
53+
# install fx2trt
54+
# cd py/torch_tensorrt/fx/setup
55+
# python3 setup.py install
56+
- run:
57+
name: run tests
58+
command: |
59+
# one fix pending to enable below
60+
# cd py/torch_tensorrt/fx/test
61+
# pytest $(find . -name '*.py' | grep -v test_dispatch* | grep -v test_setitem*)
62+
63+
cd py/torch_tensorrt/fx/test
64+
pushd converters/acc_op
65+
pytest
66+
popd
67+
pushd passes
68+
list_passes=$(ls | grep -v test_setitem*)
69+
pytest $list_passes
70+
popd
71+
pushd core
72+
pytest
73+
popd
74+
# pushd quant
75+
# pytest
76+
# popd
77+
pushd tools
78+
pytest
79+
popd
80+
pushd trt_lower
81+
pytest
82+
popd
83+
pushd tracer
84+
list_tracer=$(ls | grep -v test_dispatch_*)
85+
pytest $list_tracer
86+
popd
2687
# Invoke jobs via workflows
2788
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
2889
workflows:
29-
build_setup:
90+
build_run:
3091
jobs:
3192
- build

0 commit comments

Comments
 (0)