Skip to content

Commit bf92fbd

Browse files
authored
Cherry-pick manylinux compatible builds into main (#1677)
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 4fa546d commit bf92fbd

13 files changed

+217
-94
lines changed

.circleci/config.yml

+65-25
Original file line numberDiff line numberDiff line change
@@ -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
@@ -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:

WORKSPACE

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ new_local_repository(
5656
http_archive(
5757
name = "libtorch",
5858
build_file = "@//third_party/libtorch:BUILD",
59-
sha256 = "59b8b5e1954a86d50b79c13f06398d385b200da13e37a08ecf31d3c62e5ca127",
59+
sha256 = "8b3b48615169c83c1b643c0efade078ea080b1da598e15fcf01bc59421f3095e",
6060
strip_prefix = "libtorch",
61-
urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"],
61+
urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"],
6262
)
6363

6464
http_archive(
6565
name = "libtorch_pre_cxx11_abi",
6666
build_file = "@//third_party/libtorch:BUILD",
67-
sha256 = "e260fc7476be89d1650953e8643e9f7363845f5a52de4bab87ac0e619c1f6ad4",
67+
sha256 = "aa7fd06079d260ff83c344d043fb84fbd9cf831cf375ed8b5a1b62416817af31",
6868
strip_prefix = "libtorch",
69-
urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"],
69+
urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"],
7070
)
7171

7272
# Download these tarballs manually from the NVIDIA website

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

py/ci/Dockerfile.ci

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM pytorch/manylinux-builder:cuda11.6
1+
FROM pytorch/manylinux-builder:cuda11.7
22
ARG trt_version
33

44
RUN echo -e "Installing with TensorRT ${trt_version}"

py/ci/build_manifest.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
py38
2+
py39
3+
py310
4+
libtorchtrt_pre_cxx11_abi

py/ci/build_whl.sh

+85-44
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,66 @@
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/project/py
6-
75
export CXX=g++
8-
export CUDA_HOME=/usr/local/cuda-11.6
9-
PROJECT_DIR=/workspace/project
6+
export CUDA_HOME=/usr/local/cuda-11.7
7+
export PROJECT_DIR=/workspace/project
108

119
cp -r $CUDA_HOME /usr/local/cuda
1210

13-
build_py37() {
14-
/opt/python/cp37-cp37m/bin/python -m pip install -r requirements.txt
15-
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel --release --ci
16-
#auditwheel repair --plat manylinux2014_x86_64
11+
py37() {
12+
cd /workspace/project/py
13+
PY_BUILD_CODE=cp37-cp37m
14+
PY_VERSION=3.7
15+
PY_NAME=python${PY_VERSION}
16+
PY_DIR=/opt/python/${PY_BUILD_CODE}
17+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
18+
${PY_DIR}/bin/python -m pip install --upgrade pip
19+
${PY_DIR}/bin/python -m pip install -r requirements.txt
20+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
21+
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
22+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
1723
}
1824

19-
build_py38() {
20-
/opt/python/cp38-cp38/bin/python -m pip install -r requirements.txt
21-
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel --release --ci
22-
#auditwheel repair --plat manylinux2014_x86_64
25+
py38() {
26+
cd /workspace/project/py
27+
PY_BUILD_CODE=cp38-cp38
28+
PY_VERSION=3.8
29+
PY_NAME=python${PY_VERSION}
30+
PY_DIR=/opt/python/${PY_BUILD_CODE}
31+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
32+
${PY_DIR}/bin/python -m pip install --upgrade pip
33+
${PY_DIR}/bin/python -m pip install -r requirements.txt
34+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
35+
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
36+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
2337
}
2438

25-
build_py39() {
26-
/opt/python/cp39-cp39/bin/python -m pip install -r requirements.txt
27-
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel --release --ci
28-
#auditwheel repair --plat manylinux2014_x86_64
39+
py39() {
40+
cd /workspace/project/py
41+
PY_BUILD_CODE=cp39-cp39
42+
PY_VERSION=3.9
43+
PY_NAME=python${PY_VERSION}
44+
PY_DIR=/opt/python/${PY_BUILD_CODE}
45+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
46+
${PY_DIR}/bin/python -m pip install --upgrade pip
47+
${PY_DIR}/bin/python -m pip install -r requirements.txt
48+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
49+
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
50+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
2951
}
3052

31-
build_py310() {
32-
/opt/python/cp310-cp310/bin/python -m pip install -r requirements.txt
33-
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel --release --ci
34-
#auditwheel repair --plat manylinux2014_x86_64
53+
py310() {
54+
cd /workspace/project/py
55+
PY_BUILD_CODE=cp310-cp310
56+
PY_VERSION=3.10
57+
PY_NAME=python${PY_VERSION}
58+
PY_DIR=/opt/python/${PY_BUILD_CODE}
59+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
60+
${PY_DIR}/bin/python -m pip install --upgrade pip
61+
${PY_DIR}/bin/python -m pip install -r requirements.txt
62+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
63+
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
64+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
3565
}
3666

3767
#build_py311() {
@@ -40,31 +70,42 @@ build_py310() {
4070
# #auditwheel repair --plat manylinux2014_x86_64
4171
#}
4272

43-
build_libtorchtrt() {
44-
bazel clean
73+
libtorchtrt() {
74+
cd /workspace/project/py
75+
mkdir -p /workspace/project/py/wheelhouse
76+
PY_BUILD_CODE=cp310-cp310
77+
PY_VERSION=3.10
78+
PY_NAME=python${PY_VERSION}
79+
PY_DIR=/opt/python/${PY_BUILD_CODE}
80+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
81+
${PY_DIR}/bin/python -m pip install --upgrade pip
82+
${PY_DIR}/bin/python -m pip install -r requirements.txt
83+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
4584
bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
46-
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
47-
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
48-
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
49-
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
50-
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
51-
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
85+
CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
86+
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)")
87+
TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
88+
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
89+
TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
90+
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
5291
}
5392

54-
build_libtorchtrt_pre_cxx11_abi() {
93+
libtorchtrt_pre_cxx11_abi() {
94+
cd /workspace/project/py
95+
mkdir -p /workspace/project/py/wheelhouse
96+
PY_BUILD_CODE=cp310-cp310
97+
PY_VERSION=3.10
98+
PY_NAME=python${PY_VERSION}
99+
PY_DIR=/opt/python/${PY_BUILD_CODE}
100+
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
101+
${PY_DIR}/bin/python -m pip install --upgrade pip
102+
${PY_DIR}/bin/python -m pip install -r requirements.txt
103+
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
55104
bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
56-
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
57-
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
58-
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
59-
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
60-
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
61-
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
62-
}
63-
64-
build_py37
65-
build_py38
66-
build_py39
67-
build_py310
68-
#build_py311
69-
build_libtorchtrt_pre_cxx11_abi
70-
#build_libtorchtrt
105+
CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
106+
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)")
107+
TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
108+
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
109+
TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
110+
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
111+
}

0 commit comments

Comments
 (0)