@@ -6,6 +6,15 @@ version: 2.1
66# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
77jobs :
88 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"
918 machine :
1019 # Primary container image where all steps run.
1120 # image: nvcr.io/nvidia/tensorrt:22.01-py3 # does not work with customized image
@@ -15,41 +24,39 @@ jobs:
1524 steps :
1625 - checkout
1726 - run :
18- name : install cudnn + tensorrt + bazel
27+ name : Install cudnn + tensorrt + bazel
1928 command : |
2029 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
2732 sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
2833 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/7fa2af80.pub
2934 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
3035 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
3136 sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
3237 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 }
3540
3641 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/{OS}/x86_64/3bf863cc.pub
3742 sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /"
3843 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 }
4146 # check available version, apt list libnvinfer8 -a
4247 sudo wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64 -O /usr/bin/bazel
4348 sudo chmod a+x /usr/bin/bazel
4449
4550 - run :
46- name : set up python environment
51+ name : Set up python environment
4752 command : |
53+ pip3 install --upgrade pip
4854 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
5255 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
5360 # install torch_tensorrt
5461 mv WORKSPACE.ci WORKSPACE
5562 cd py
@@ -58,19 +65,50 @@ jobs:
5865 # install fx2trt
5966 # cd py/torch_tensorrt/fx/setup
6067 # 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+
6194 - 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
63101 command : |
64102 # one fix pending to enable below
65103 # cd py/torch_tensorrt/fx/test
66104 # pytest $(find . -name '*.py' | grep -v test_dispatch* | grep -v test_setitem*)
67-
105+
68106 cd py/torch_tensorrt/fx/test
69107 pushd converters/acc_op
70- pytest
108+ pytest
71109 popd
72110 pushd passes
73- list_passes=$(ls | grep -v test_setitem*)
111+ list_passes=$(ls | grep -v test_setitem*)
74112 pytest $list_passes
75113 popd
76114 pushd core
86124 pytest
87125 popd
88126 pushd tracer
89- list_tracer=$(ls | grep -v test_dispatch_*)
127+ list_tracer=$(ls | grep -v test_dispatch_*)
90128 pytest $list_tracer
91129 popd
92130# Invoke jobs via workflows
0 commit comments