Skip to content

Commit 08a8494

Browse files
committed
chore: Update CI
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 4267406 commit 08a8494

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

.circleci/config.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ commands:
162162
- run:
163163
name: Build setup
164164
command: |
165-
mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE
166-
cd py
165+
mv ~/project/toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> ~/project/WORKSPACE
167166
python3 -m pip install wheel setuptools
168167
python3 -m pip install pybind11==2.6.2
169168
- when:
@@ -172,6 +171,7 @@ commands:
172171
- run:
173172
name: Build torch-tensorrt python release package
174173
command: |
174+
cd ~/project/py
175175
python3 setup.py bdist_wheel --use-cxx11-abi --release
176176
python3 setup.py install --use-cxx11-abi --release
177177
mkdir -p /tmp/dist/builds
@@ -182,6 +182,7 @@ commands:
182182
- run:
183183
name: Build torch-tensorrt python package
184184
command: |
185+
cd ~/project/py
185186
python3 setup.py bdist_wheel --use-cxx11-abi
186187
python3 setup.py install --use-cxx11-abi
187188
mkdir -p /tmp/dist/builds
@@ -625,7 +626,7 @@ jobs:
625626
command: |
626627
cd ~/project/py/
627628
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release ~/project/WORKSPACE
628-
docker run -it --rm -v$(pwd)/..:/workspace/Torch-TensorRT torch_tensorrt_release_env /bin/bash /workspace/Torch-TensorRT/py/ci/build_whl.sh
629+
docker run -it --rm -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash /workspace/project/py/ci/build_whl.sh
629630
- create-env:
630631
os: "ubuntu2004"
631632
platform: "x86_64"
@@ -637,14 +638,16 @@ jobs:
637638
name: Build cxx11-abi tarball
638639
command: |
639640
set -e
640-
bazel build //:libtorchtrt -c opt
641+
cd ~/project/
642+
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64 ~/project/WORKSPACE
643+
bazel build //:libtorchtrt -c opt --noshow_progress
641644
CUDA_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
642-
TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
643-
TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
644-
CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
645+
TORCHTRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
646+
TRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
647+
CUDNN_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
645648
pip3 install -r ~/project/py/requirements.txt
646649
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
647-
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}.tar.gz
650+
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
648651
- run:
649652
name: Collect packages
650653
command: |
@@ -720,14 +723,15 @@ jobs:
720723
name: Build cxx11-abi tarball
721724
command: |
722725
set -e
723-
bazel build //:libtorchtrt -c opt
726+
cd ~/project/py/
727+
bazel build //:libtorchtrt -c opt --noshow_progress
724728
CUDA_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
725729
TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
726730
TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
727731
CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
728732
pip3 install -r ~/project/py/requirements.txt
729733
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
730-
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}.tar.gz
734+
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}-aarch64-linux-jp<< parameters.jetpack-version >>.tar.gz
731735
- run:
732736
name: Move to release dir
733737
command: |
@@ -928,19 +932,19 @@ workflows:
928932
enabled: << pipeline.parameters.packaging-enabled >>
929933
torch-build: << pipeline.parameters.torch-release-build >>
930934
torch-build-index: << pipeline.parameters.torch-release-build-index >>
931-
requires:
932-
- test-core-cpp-x86_64-pyt-release
933-
- test-py-ts-x86_64-pyt-release
934-
- test-py-fx-x86_64-pyt-release
935+
#requires:
936+
# - test-core-cpp-x86_64-pyt-release
937+
# - test-py-ts-x86_64-pyt-release
938+
# - test-py-fx-x86_64-pyt-release
935939

936940
- package-jetson:
937941
name: package-release-aarch64-jetson
938942
enabled: << pipeline.parameters.packaging-enabled >>
939943
torch-build: << pipeline.parameters.torch-jetson-build >>
940944
jetpack-version: << pipeline.parameters.jetpack-version >>
941945
python-version: 3.8.10
942-
requires:
943-
- build-aarch64-pyt-jetson
946+
#requires:
947+
# - build-aarch64-pyt-jetson
944948

945949
on-push:
946950
jobs:

py/ci/build_whl.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
# Example usage: docker run -it -v$(pwd)/..:/workspace/TRTorch build_trtorch_wheel /bin/bash /workspace/TRTorch/py/build_whl.sh
44

5-
cd /workspace/Torch-TensorRT/py
5+
cd /workspace/project/py
66

77
export CXX=g++
88
export CUDA_HOME=/usr/local/cuda-11.3
9+
PROJECT_DIR=/workspace/project
10+
11+
ln -s $CUDA_HOME /usr/local/cuda
912

1013
build_py37() {
1114
/opt/python/cp37-cp37m/bin/python -m pip install -r requirements.txt
@@ -33,29 +36,28 @@ build_py310() {
3336

3437
build_libtorchtrt() {
3538
bazel clean
36-
bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt
37-
CUDA_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
38-
TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
39-
TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
40-
CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
39+
bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
40+
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
41+
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
42+
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
43+
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
4144
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
42-
cp ../bazel-bin/libtorchtrt.tar.gz dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch-${TORCH_VERSION}.tar.gz
45+
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
4346
}
4447

4548
build_libtorchtrt_pre_cxx11_abi() {
46-
bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt
47-
CUDA_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
48-
TORCHTRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
49-
TRT_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
50-
CUDNN_VERSION=$(cd torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
49+
bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
50+
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
51+
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
52+
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
53+
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
5154
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
52-
cp ../bazel-bin/libtorchtrt.tar.gz dist/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch-${TORCH_VERSION}.tar.gz
53-
55+
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/dist/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
5456
}
5557

5658
build_py37
5759
build_py38
5860
build_py39
5961
build_py310
6062
build_libtorchtrt_pre_cxx11_abi
61-
build_libtorchtrt
63+
#build_libtorchtrt

toolchains/ci_workspaces/WORKSPACE.x86_64.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ local_repository(
4141
new_local_repository(
4242
name = "cuda",
4343
build_file = "@//third_party/cuda:BUILD",
44-
path = "/usr/local/cuda-11.3/",
44+
path = "/usr/local/cuda-11.3",
4545
)
4646

4747
new_local_repository(

0 commit comments

Comments
 (0)