@@ -263,7 +263,7 @@ commands:
263
263
parameters :
264
264
torch-build :
265
265
type : string
266
- default : " 2.0.0.dev20230129 +cu117"
266
+ default : " 2.0.0.dev20230219 +cu117"
267
267
torch-build-index :
268
268
type : string
269
269
default : " https://download.pytorch.org/whl/nightly/cu117"
@@ -463,7 +463,7 @@ commands:
463
463
- run :
464
464
name : Run core / C++ tests
465
465
environment :
466
- LD_LIBRARY_PATH : " /home/circleci/project/bazel-project/external/libtorch_pre_cxx11_abi/lib/:/home/circleci/project/bazel-project/external/tensorrt/lib/:/usr/local/cuda/lib64/:$LD_LIBRARY_PATH"
466
+ LD_LIBRARY_PATH : " /opt/circleci/.pyenv/versions/3.9.4/lib/python3.9/site-packages/torch_tensorrt.libs:/ home/circleci/project/bazel-project/external/libtorch_pre_cxx11_abi/lib/:/home/circleci/project/bazel-project/external/tensorrt/lib/:/usr/local/cuda/lib64/:$LD_LIBRARY_PATH"
467
467
command : |
468
468
set -e
469
469
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
@@ -719,7 +719,7 @@ jobs:
719
719
at : /tmp/dist
720
720
- run :
721
721
name : " Install torch-tensorrt"
722
- command : pip3 install /tmp/dist/x86_64-linux/*
722
+ command : pip3 install /tmp/dist/x86_64-linux/*cp39-cp39*.whl
723
723
- dump-test-env
724
724
- test-ts-core
725
725
@@ -747,7 +747,7 @@ jobs:
747
747
torch-build-index : << parameters.torch-build-index >>
748
748
- run :
749
749
name : " Install torch-tensorrt"
750
- command : pip3 install --pre /tmp/dist/x86_64-linux/*
750
+ command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl
751
751
- dump-test-env
752
752
- test-ts-py-api
753
753
@@ -777,7 +777,7 @@ jobs:
777
777
# command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
778
778
- run :
779
779
name : " Install torch-tensorrt"
780
- command : pip3 install --pre /tmp/dist/x86_64-linux/*
780
+ command : pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl
781
781
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
782
782
- dump-test-env
783
783
- test-fx
@@ -791,9 +791,10 @@ jobs:
791
791
type : string
792
792
torch-build-index :
793
793
type : string
794
+ parallelism : 4
794
795
machine :
795
796
image : ubuntu-2004-cuda-11.4:202110-01
796
- resource_class : xlarge
797
+ resource_class : gpu.nvidia.small
797
798
steps :
798
799
- when :
799
800
condition : << parameters.enabled >>
@@ -805,18 +806,58 @@ jobs:
805
806
cd ~/project/py/
806
807
docker build -t torch_tensorrt_release_env --build-arg trt_version=<< pipeline.parameters.trt-version-short >> -f ci/Dockerfile.ci .
807
808
- run :
808
- name : Build Python packages and pre-cxx11-abi tarball
809
+ name : Build Python packages
809
810
command : |
810
811
cd ~/project/py/
811
812
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel ~/project/WORKSPACE
812
- docker run -it --rm -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash /workspace/project/py/ci/build_whl.sh
813
+ docker run -it --rm --gpus all -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash -c "source /workspace/project/py/ci/build_whl.sh && $(circleci tests split --total=4 ~/project/py/ci/build_manifest.txt)"
814
+ - run :
815
+ name : Collect packages
816
+ command : |
817
+ mkdir -p /tmp/dist/x86_64-linux
818
+ cp -r ~/project/py/wheelhouse/* /tmp/dist/x86_64-linux
819
+ - persist_to_workspace :
820
+ root : /tmp/dist
821
+ paths :
822
+ - x86_64-linux
823
+ - store_artifacts :
824
+ path : /tmp/dist/x86_64-linux
825
+ destination : x86_64-linux
826
+ - unless :
827
+ condition : << parameters.enabled >>
828
+ steps :
829
+ - run :
830
+ name : Skipped packaging
831
+ command : echo -e "Packaging stage not enabled"
832
+
833
+ # TODO: Merge this with above
834
+ package-x86_64-linux-cxx11-abi :
835
+ parameters :
836
+ enabled :
837
+ type : boolean
838
+ default : false
839
+ torch-build :
840
+ type : string
841
+ torch-build-index :
842
+ type : string
843
+ machine :
844
+ image : ubuntu-2004-cuda-11.4:202110-01
845
+ resource_class : xlarge
846
+ steps :
847
+ - when :
848
+ condition : << parameters.enabled >>
849
+ steps :
850
+ - checkout
813
851
- create-env :
814
852
os : " ubuntu2004"
815
853
platform : " x86_64"
816
854
cudnn-version : << pipeline.parameters.cudnn-version >>
817
855
trt-version-short : << pipeline.parameters.trt-version-short >>
818
856
bazel-version : << pipeline.parameters.bazel-version >>
819
857
bazel-platform : " x86_64"
858
+ - install-torch-from-index :
859
+ torch-build : << parameters.torch-build >>
860
+ torch-build-index : << parameters.torch-build-index >>
820
861
- run :
821
862
name : Build cxx11-abi tarball
822
863
command : |
@@ -825,13 +866,16 @@ jobs:
825
866
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu ~/project/WORKSPACE
826
867
bazel build //:libtorchtrt -c opt --noshow_progress
827
868
sudo chown -R $(whoami) ~/project/py
828
- CUDA_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
829
- TORCHTRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
830
- TRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
831
- CUDNN_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
869
+ cd ~/project/py
870
+ CUDA_VERSION=$(python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
871
+ TORCHTRT_VERSION=$(python3 -c "from versions import __version__;print(__version__)")
872
+ TRT_VERSION=$(python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
873
+ CUDNN_VERSION=$(python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
874
+ TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
832
875
pip3 install --upgrade pip
833
876
pip3 install -r ~/project/py/requirements.txt
834
877
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
878
+ mkdir -p ~/project/py/dist/
835
879
cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
836
880
- run :
837
881
name : Collect packages
@@ -1026,7 +1070,7 @@ parameters:
1026
1070
# Nightly platform config
1027
1071
torch-build :
1028
1072
type : string
1029
- default : " 2.0.0.dev20230129 +cu117"
1073
+ default : " 2.0.0.dev20230219 +cu117"
1030
1074
torch-build-index :
1031
1075
type : string
1032
1076
default : " https://download.pytorch.org/whl/nightly/cu117"
@@ -1113,7 +1157,13 @@ workflows:
1113
1157
when : << pipeline.parameters.enable-packaging >>
1114
1158
jobs :
1115
1159
1116
- - build-x86_64-linux :
1160
+ - package-x86_64-linux :
1161
+ enabled : << pipeline.parameters.enable-packaging >>
1162
+ torch-build : << pipeline.parameters.torch-build >>
1163
+ torch-build-index : << pipeline.parameters.torch-build-index >>
1164
+
1165
+ - package-x86_64-linux-cxx11-abi :
1166
+ enabled : << pipeline.parameters.enable-packaging >>
1117
1167
torch-build : << pipeline.parameters.torch-build >>
1118
1168
torch-build-index : << pipeline.parameters.torch-build-index >>
1119
1169
@@ -1124,31 +1174,21 @@ workflows:
1124
1174
trt-version-long : << pipeline.parameters.trt-version-long >>
1125
1175
cudnn-version : << pipeline.parameters.cudnn-version >>
1126
1176
requires :
1127
- - build -x86_64-linux
1177
+ - package -x86_64-linux
1128
1178
1129
1179
- test-py-ts-x86_64-linux :
1130
1180
torch-build : << pipeline.parameters.torch-build >>
1131
1181
torch-build-index : << pipeline.parameters.torch-build-index >>
1132
1182
trt-version-long : << pipeline.parameters.trt-version-long >>
1133
1183
requires :
1134
- - build -x86_64-linux
1184
+ - package -x86_64-linux
1135
1185
1136
1186
- test-py-fx-x86_64-linux :
1137
1187
torch-build : << pipeline.parameters.torch-build >>
1138
1188
torch-build-index : << pipeline.parameters.torch-build-index >>
1139
1189
trt-version-long : << pipeline.parameters.trt-version-long >>
1140
1190
requires :
1141
- - build-x86_64-linux
1142
-
1143
-
1144
- - package-x86_64-linux :
1145
- enabled : << pipeline.parameters.enable-packaging >>
1146
- torch-build : << pipeline.parameters.torch-build >>
1147
- torch-build-index : << pipeline.parameters.torch-build-index >>
1148
- # requires:
1149
- # - test-core-cpp-x86_64-linux
1150
- # - test-py-ts-x86_64-linux
1151
- # - test-py-fx-x86_64-linux
1191
+ - package-x86_64-linux
1152
1192
1153
1193
on-push :
1154
1194
jobs :
0 commit comments