@@ -263,7 +263,7 @@ commands:
263263 parameters :
264264 torch-build :
265265 type : string
266- default : " 2.0.0.dev20230129 +cu117"
266+ default : " 2.0.0.dev20230219 +cu117"
267267 torch-build-index :
268268 type : string
269269 default : " https://download.pytorch.org/whl/nightly/cu117"
@@ -463,7 +463,7 @@ commands:
463463 - run :
464464 name : Run core / C++ tests
465465 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"
467467 command : |
468468 set -e
469469 mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
@@ -719,7 +719,7 @@ jobs:
719719 at : /tmp/dist
720720 - run :
721721 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
723723 - dump-test-env
724724 - test-ts-core
725725
@@ -747,7 +747,7 @@ jobs:
747747 torch-build-index : << parameters.torch-build-index >>
748748 - run :
749749 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
751751 - dump-test-env
752752 - test-ts-py-api
753753
@@ -777,7 +777,7 @@ jobs:
777777 # command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
778778 - run :
779779 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
781781 # We install torch after torch-trt because pip automatically enforces the version constraint otherwise
782782 - dump-test-env
783783 - test-fx
@@ -791,9 +791,10 @@ jobs:
791791 type : string
792792 torch-build-index :
793793 type : string
794+ parallelism : 4
794795 machine :
795796 image : ubuntu-2004-cuda-11.4:202110-01
796- resource_class : xlarge
797+ resource_class : gpu.nvidia.small
797798 steps :
798799 - when :
799800 condition : << parameters.enabled >>
@@ -805,18 +806,58 @@ jobs:
805806 cd ~/project/py/
806807 docker build -t torch_tensorrt_release_env --build-arg trt_version=<< pipeline.parameters.trt-version-short >> -f ci/Dockerfile.ci .
807808 - run :
808- name : Build Python packages and pre-cxx11-abi tarball
809+ name : Build Python packages
809810 command : |
810811 cd ~/project/py/
811812 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
813851 - create-env :
814852 os : " ubuntu2004"
815853 platform : " x86_64"
816854 cudnn-version : << pipeline.parameters.cudnn-version >>
817855 trt-version-short : << pipeline.parameters.trt-version-short >>
818856 bazel-version : << pipeline.parameters.bazel-version >>
819857 bazel-platform : " x86_64"
858+ - install-torch-from-index :
859+ torch-build : << parameters.torch-build >>
860+ torch-build-index : << parameters.torch-build-index >>
820861 - run :
821862 name : Build cxx11-abi tarball
822863 command : |
@@ -825,13 +866,16 @@ jobs:
825866 cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu ~/project/WORKSPACE
826867 bazel build //:libtorchtrt -c opt --noshow_progress
827868 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])")
832875 pip3 install --upgrade pip
833876 pip3 install -r ~/project/py/requirements.txt
834877 TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
878+ mkdir -p ~/project/py/dist/
835879 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
836880 - run :
837881 name : Collect packages
@@ -1026,7 +1070,7 @@ parameters:
10261070 # Nightly platform config
10271071 torch-build :
10281072 type : string
1029- default : " 2.0.0.dev20230129 +cu117"
1073+ default : " 2.0.0.dev20230219 +cu117"
10301074 torch-build-index :
10311075 type : string
10321076 default : " https://download.pytorch.org/whl/nightly/cu117"
@@ -1113,7 +1157,13 @@ workflows:
11131157 when : << pipeline.parameters.enable-packaging >>
11141158 jobs :
11151159
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 >>
11171167 torch-build : << pipeline.parameters.torch-build >>
11181168 torch-build-index : << pipeline.parameters.torch-build-index >>
11191169
@@ -1124,31 +1174,21 @@ workflows:
11241174 trt-version-long : << pipeline.parameters.trt-version-long >>
11251175 cudnn-version : << pipeline.parameters.cudnn-version >>
11261176 requires :
1127- - build -x86_64-linux
1177+ - package -x86_64-linux
11281178
11291179 - test-py-ts-x86_64-linux :
11301180 torch-build : << pipeline.parameters.torch-build >>
11311181 torch-build-index : << pipeline.parameters.torch-build-index >>
11321182 trt-version-long : << pipeline.parameters.trt-version-long >>
11331183 requires :
1134- - build -x86_64-linux
1184+ - package -x86_64-linux
11351185
11361186 - test-py-fx-x86_64-linux :
11371187 torch-build : << pipeline.parameters.torch-build >>
11381188 torch-build-index : << pipeline.parameters.torch-build-index >>
11391189 trt-version-long : << pipeline.parameters.trt-version-long >>
11401190 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
11521192
11531193 on-push :
11541194 jobs :
0 commit comments