@@ -6,6 +6,15 @@ version: 2.1
6
6
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
7
7
jobs :
8
8
build :
9
+ environment :
10
+ CUDNN_VERSION : " 8.2.1"
11
+ TRT_VERSION : " 8.2.4"
12
+ TRT_VERSION_LONG : " 8.2.4.2"
13
+ BAZEL_VERSION : " 5.1.1"
14
+ CUDNN_PKG_NAME : " 8.2.1.*-1+cuda11.3"
15
+ TRT_PKG_NAME : " 8.2.4-1+cuda11.4"
16
+ TORCH_BUILD : " 1.11.0+cu113"
17
+ OS : " ubuntu2004"
9
18
machine :
10
19
# Primary container image where all steps run.
11
20
# image: nvcr.io/nvidia/tensorrt:22.01-py3 # does not work with customized image
@@ -15,41 +24,39 @@ jobs:
15
24
steps :
16
25
- checkout
17
26
- run :
18
- name : install cudnn + tensorrt + bazel
27
+ name : Install cudnn + tensorrt + bazel
19
28
command : |
20
29
cd ~
21
- OS=ubuntu2004
22
- CUDNN_VERSION=8.2.1.*-1+cuda11.3
23
- TRT_VERSION=8.2.4-1+cuda11.4
24
- BAZEL_VERSION=5.1.1
25
-
26
- wget https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
30
+
31
+ wget https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
27
32
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
28
33
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/7fa2af80.pub
29
34
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
30
35
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
31
36
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
32
37
sudo apt-get update
33
- sudo apt-get install libcudnn8=${CUDNN_VERSION }
34
- sudo apt-get install libcudnn8-dev=${CUDNN_VERSION }
38
+ sudo apt-get install libcudnn8=${CUDNN_PKG_NAME }
39
+ sudo apt-get install libcudnn8-dev=${CUDNN_PKG_NAME }
35
40
36
41
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/{OS}/x86_64/3bf863cc.pub
37
42
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
38
43
sudo apt-get update
39
-
40
- sudo apt-get install libnvinfer8=${TRT_VERSION} libnvonnxparsers8=${TRT_VERSION} libnvparsers8=${TRT_VERSION} libnvinfer-plugin8=${TRT_VERSION } libnvinfer-dev=${TRT_VERSION} libnvonnxparsers-dev=${TRT_VERSION} libnvparsers-dev=${TRT_VERSION} libnvinfer-plugin-dev=${TRT_VERSION} python3-libnvinfer=${TRT_VERSION }
44
+
45
+ sudo apt-get install libnvinfer8=${TRT_PKG_NAME} libnvinfer-plugin8=${TRT_PKG_NAME } libnvinfer-dev=${TRT_PKG_NAME} libnvinfer-plugin-dev=${TRT_PKG_NAME }
41
46
# check available version, apt list libnvinfer8 -a
42
47
sudo wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64 -O /usr/bin/bazel
43
48
sudo chmod a+x /usr/bin/bazel
44
49
45
50
- run :
46
- name : set up python environment
51
+ name : Set up python environment
47
52
command : |
53
+ pip3 install --upgrade pip
48
54
pip3 install nvidia-pyindex
49
- pip3 install nvidia-tensorrt==8.2.4.2
50
- pip3 install --pre torch==1.13.0.dev20220621 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
51
- pip3 install pytest parameterized expecttest
52
55
pip3 install tabulate
56
+ pip3 install nvidia-tensorrt==${TRT_VERSION_LONG}
57
+ #pip3 install --pre torch==${TORCH_BUILD} torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
58
+ pip3 install torch==${TORCH_BUILD} torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
59
+ pip3 install pytest parameterized expecttest nox
53
60
# install torch_tensorrt
54
61
mv WORKSPACE.ci WORKSPACE
55
62
cd py
@@ -58,19 +65,50 @@ jobs:
58
65
# install fx2trt
59
66
# cd py/torch_tensorrt/fx/setup
60
67
# python3 setup.py install
68
+
69
+ - run :
70
+ name : GPU Config
71
+ command : |
72
+ nvidia-smi
73
+
74
+ - run :
75
+ name : Test torch
76
+ command : |
77
+ python3 -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
78
+
79
+ - run :
80
+ name : Pull test models
81
+ environment :
82
+ USE_HOST_DEPS : " 1"
83
+ command : |
84
+ cd tests/modules
85
+ pip3 install -r requirements.txt
86
+ python3 hub.py
87
+ cd ../..
88
+
89
+ - run :
90
+ name : Run core / C++ tests
91
+ command : |
92
+ bazel test //tests --jobs 2
93
+
61
94
- run :
62
- name : run fx2trt tests
95
+ name : Run L0 python tests
96
+ command : |
97
+ nox -s l0_api_tests
98
+
99
+ - run :
100
+ name : Run fx tests
63
101
command : |
64
102
# one fix pending to enable below
65
103
# cd py/torch_tensorrt/fx/test
66
104
# pytest $(find . -name '*.py' | grep -v test_dispatch* | grep -v test_setitem*)
67
-
105
+
68
106
cd py/torch_tensorrt/fx/test
69
107
pushd converters/acc_op
70
- pytest
108
+ pytest
71
109
popd
72
110
pushd passes
73
- list_passes=$(ls | grep -v test_setitem*)
111
+ list_passes=$(ls | grep -v test_setitem*)
74
112
pytest $list_passes
75
113
popd
76
114
pushd core
86
124
pytest
87
125
popd
88
126
pushd tracer
89
- list_tracer=$(ls | grep -v test_dispatch_*)
127
+ list_tracer=$(ls | grep -v test_dispatch_*)
90
128
pytest $list_tracer
91
129
popd
92
130
# Invoke jobs via workflows
0 commit comments