From 57504d98f736760d25d0cc8a34a1625256879f6a Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:46:49 -0600 Subject: [PATCH 1/6] feat: build manylinux compatible builds (#1527) Signed-off-by: Naren Dasan Signed-off-by: Naren Dasan --- .circleci/config.yml | 90 ++++++++++++++++------- py/ci/build_manifest.txt | 5 ++ py/ci/build_whl.sh | 129 ++++++++++++++++++++++----------- py/ci/soname_excludes.params | 33 +++++++++ py/setup.py | 14 ++-- py/versions.py | 4 + tests/modules/requirements.txt | 3 +- 7 files changed, 201 insertions(+), 77 deletions(-) create mode 100644 py/ci/build_manifest.txt create mode 100644 py/ci/soname_excludes.params create mode 100644 py/versions.py diff --git a/.circleci/config.yml b/.circleci/config.yml index 347dd77294..311d73601e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -463,7 +463,7 @@ commands: - run: name: Run core / C++ tests environment: - 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" + 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" command: | set -e mv toolchains/ci_workspaces/WORKSPACE.<< parameters.platform >> WORKSPACE @@ -719,7 +719,7 @@ jobs: at: /tmp/dist - run: name: "Install torch-tensorrt" - command: pip3 install /tmp/dist/x86_64-linux/* + command: pip3 install /tmp/dist/x86_64-linux/*cp39-cp39*.whl - dump-test-env - test-ts-core @@ -747,7 +747,7 @@ jobs: torch-build-index: << parameters.torch-build-index >> - run: name: "Install torch-tensorrt" - command: pip3 install --pre /tmp/dist/x86_64-linux/* + command: pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl - dump-test-env - test-ts-py-api @@ -777,7 +777,7 @@ jobs: # command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH - run: name: "Install torch-tensorrt" - command: pip3 install --pre /tmp/dist/x86_64-linux/* + command: pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl # We install torch after torch-trt because pip automatically enforces the version constraint otherwise - dump-test-env - test-fx @@ -791,9 +791,10 @@ jobs: type: string torch-build-index: type: string + parallelism: 5 machine: image: ubuntu-2004-cuda-11.4:202110-01 - resource_class: xlarge + resource_class: gpu.nvidia.small steps: - when: condition: << parameters.enabled >> @@ -805,11 +806,48 @@ jobs: cd ~/project/py/ docker build -t torch_tensorrt_release_env --build-arg trt_version=<< pipeline.parameters.trt-version-short >> -f ci/Dockerfile.ci . - run: - name: Build Python packages and pre-cxx11-abi tarball + name: Build Python packages command: | cd ~/project/py/ cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel ~/project/WORKSPACE - docker run -it --rm -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash /workspace/project/py/ci/build_whl.sh + 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=5 ~/project/py/ci/build_manifest.txt)" + - run: + name: Collect packages + command: | + mkdir -p /tmp/dist/x86_64-linux + cp -r ~/project/py/wheelhouse/* /tmp/dist/x86_64-linux + - persist_to_workspace: + root: /tmp/dist + paths: + - x86_64-linux + - store_artifacts: + path: /tmp/dist/x86_64-linux + destination: x86_64-linux + - unless: + condition: << parameters.enabled >> + steps: + - run: + name: Skipped packaging + command: echo -e "Packaging stage not enabled" + + # TODO: Merge this with above + package-x86_64-linux-cxx11-abi: + parameters: + enabled: + type: boolean + default: false + torch-build: + type: string + torch-build-index: + type: string + machine: + image: ubuntu-2004-cuda-11.4:202110-01 + resource_class: xlarge + steps: + - when: + condition: << parameters.enabled >> + steps: + - checkout - create-env: os: "ubuntu2004" platform: "x86_64" @@ -817,6 +855,9 @@ jobs: trt-version-short: << pipeline.parameters.trt-version-short >> bazel-version: << pipeline.parameters.bazel-version >> bazel-platform: "x86_64" + - install-torch-from-index: + torch-build: << parameters.torch-build >> + torch-build-index: << parameters.torch-build-index >> - run: name: Build cxx11-abi tarball command: | @@ -825,13 +866,16 @@ jobs: cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu ~/project/WORKSPACE bazel build //:libtorchtrt -c opt --noshow_progress sudo chown -R $(whoami) ~/project/py - CUDA_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)") - TORCHTRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") - TRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") - CUDNN_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") + cd ~/project/py + CUDA_VERSION=$(python3 -c "from versions import __cuda_version__;print(__cuda_version__)") + TORCHTRT_VERSION=$(python3 -c "from versions import __version__;print(__version__)") + TRT_VERSION=$(python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)") + CUDNN_VERSION=$(python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)") + TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])") pip3 install --upgrade pip pip3 install -r ~/project/py/requirements.txt TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])") + mkdir -p ~/project/py/dist/ 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 - run: name: Collect packages @@ -1113,7 +1157,13 @@ workflows: when: << pipeline.parameters.enable-packaging >> jobs: - - build-x86_64-linux: + - package-x86_64-linux: + enabled: << pipeline.parameters.enable-packaging >> + torch-build: << pipeline.parameters.torch-build >> + torch-build-index: << pipeline.parameters.torch-build-index >> + + - package-x86_64-linux-cxx11-abi: + enabled: << pipeline.parameters.enable-packaging >> torch-build: << pipeline.parameters.torch-build >> torch-build-index: << pipeline.parameters.torch-build-index >> @@ -1124,31 +1174,21 @@ workflows: trt-version-long: << pipeline.parameters.trt-version-long >> cudnn-version: << pipeline.parameters.cudnn-version >> requires: - - build-x86_64-linux + - package-x86_64-linux - test-py-ts-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> requires: - - build-x86_64-linux + - package-x86_64-linux - test-py-fx-x86_64-linux: torch-build: << pipeline.parameters.torch-build >> torch-build-index: << pipeline.parameters.torch-build-index >> trt-version-long: << pipeline.parameters.trt-version-long >> requires: - - build-x86_64-linux - - - - package-x86_64-linux: - enabled: << pipeline.parameters.enable-packaging >> - torch-build: << pipeline.parameters.torch-build >> - torch-build-index: << pipeline.parameters.torch-build-index >> - #requires: - #- test-core-cpp-x86_64-linux - #- test-py-ts-x86_64-linux - #- test-py-fx-x86_64-linux + - package-x86_64-linux on-push: jobs: diff --git a/py/ci/build_manifest.txt b/py/ci/build_manifest.txt new file mode 100644 index 0000000000..f0b3e49fc3 --- /dev/null +++ b/py/ci/build_manifest.txt @@ -0,0 +1,5 @@ +py37 +py38 +py39 +py310 +libtorchtrt_pre_cxx11_abi diff --git a/py/ci/build_whl.sh b/py/ci/build_whl.sh index 66855fbf2e..99b78f53f7 100755 --- a/py/ci/build_whl.sh +++ b/py/ci/build_whl.sh @@ -2,36 +2,66 @@ # Example usage: docker run -it -v$(pwd)/..:/workspace/TRTorch build_trtorch_wheel /bin/bash /workspace/TRTorch/py/build_whl.sh -cd /workspace/project/py - export CXX=g++ -export CUDA_HOME=/usr/local/cuda-11.6 -PROJECT_DIR=/workspace/project +export CUDA_HOME=/usr/local/cuda-11.7 +export PROJECT_DIR=/workspace/project cp -r $CUDA_HOME /usr/local/cuda -build_py37() { - /opt/python/cp37-cp37m/bin/python -m pip install -r requirements.txt - /opt/python/cp37-cp37m/bin/python setup.py bdist_wheel --release --ci - #auditwheel repair --plat manylinux2014_x86_64 +py37() { + cd /workspace/project/py + PY_BUILD_CODE=cp37-cp37m + PY_VERSION=3.7 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel + ${PY_DIR}/bin/python setup.py bdist_wheel --release --ci + 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 } -build_py38() { - /opt/python/cp38-cp38/bin/python -m pip install -r requirements.txt - /opt/python/cp38-cp38/bin/python setup.py bdist_wheel --release --ci - #auditwheel repair --plat manylinux2014_x86_64 +py38() { + cd /workspace/project/py + PY_BUILD_CODE=cp38-cp38 + PY_VERSION=3.8 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel + ${PY_DIR}/bin/python setup.py bdist_wheel --release --ci + 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 } -build_py39() { - /opt/python/cp39-cp39/bin/python -m pip install -r requirements.txt - /opt/python/cp39-cp39/bin/python setup.py bdist_wheel --release --ci - #auditwheel repair --plat manylinux2014_x86_64 +py39() { + cd /workspace/project/py + PY_BUILD_CODE=cp39-cp39 + PY_VERSION=3.9 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel + ${PY_DIR}/bin/python setup.py bdist_wheel --release --ci + 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 } -build_py310() { - /opt/python/cp310-cp310/bin/python -m pip install -r requirements.txt - /opt/python/cp310-cp310/bin/python setup.py bdist_wheel --release --ci - #auditwheel repair --plat manylinux2014_x86_64 +py310() { + cd /workspace/project/py + PY_BUILD_CODE=cp310-cp310 + PY_VERSION=3.10 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel + ${PY_DIR}/bin/python setup.py bdist_wheel --release --ci + 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 } #build_py311() { @@ -40,31 +70,42 @@ build_py310() { # #auditwheel repair --plat manylinux2014_x86_64 #} -build_libtorchtrt() { - bazel clean +libtorchtrt() { + cd /workspace/project/py + mkdir -p /workspace/project/py/wheelhouse + PY_BUILD_CODE=cp310-cp310 + PY_VERSION=3.10 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress - CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)") - TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") - TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") - CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") - TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])") - 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 + CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)") + TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)") + TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)") + CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)") + TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])") + 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 } -build_libtorchtrt_pre_cxx11_abi() { +libtorchtrt_pre_cxx11_abi() { + cd /workspace/project/py + mkdir -p /workspace/project/py/wheelhouse + PY_BUILD_CODE=cp310-cp310 + PY_VERSION=3.10 + PY_NAME=python${PY_VERSION} + PY_DIR=/opt/python/${PY_BUILD_CODE} + PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/ + ${PY_DIR}/bin/python -m pip install --upgrade pip + ${PY_DIR}/bin/python -m pip install -r requirements.txt + ${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress - CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)") - TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)") - TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)") - CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)") - TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])") - 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 -} - -build_py37 -build_py38 -build_py39 -build_py310 -#build_py311 -build_libtorchtrt_pre_cxx11_abi -#build_libtorchtrt \ No newline at end of file + CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)") + TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)") + TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)") + CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)") + TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])") + 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 +} \ No newline at end of file diff --git a/py/ci/soname_excludes.params b/py/ci/soname_excludes.params new file mode 100644 index 0000000000..7b3e802f26 --- /dev/null +++ b/py/ci/soname_excludes.params @@ -0,0 +1,33 @@ +--exclude libc10_cuda.so +--exclude libc10.so +--exclude libcaffe2_nvrtc.so +--exclude libcublasLt.so +--exclude libcuda.so +--exclude libnvrtc.so +--exclude libnvToolsExt.so +--exclude libshm.so +--exclude libtorch_cpu.so +--exclude libtorch_cuda_cpp.so +--exclude libtorch_cuda_cu.so +--exclude libtorch_cuda.so +--exclude libtorch_global_deps.so +--exclude libtorch_python.so +--exclude libtorch.so +--exclude libcudart.so + +--exclude libnvToolsExt-847d78f2.so.1 +--exclude libnvToolsExt-847d78f2.so +--exclude libcudart-e409450e.so.11.0 +--exclude libcudart-e409450e.so +--exclude libgomp-a34b3233.so.1 +--exclude libgomp-a34b3233.so +--exclude libcudart.so.11 +--exclude libcudart.so.11.7.60 +--exclude libnvrtc.so.11.2 +--exclude libnvinfer_plugin.so.8 +--exclude libcublas.so.11 +--exclude libcuda.so.1 +--exclude libcuda.so.515 +--exclude libcublasLt.so.11 +--exclude libnvinfer.so.8 +--exclude libcudnn.so.8 diff --git a/py/setup.py b/py/setup.py index f8a64f6571..d0449be309 100644 --- a/py/setup.py +++ b/py/setup.py @@ -16,6 +16,13 @@ import platform import warnings +from versions import ( + __version__, + __cuda_version__, + __cudnn_version__, + __tensorrt_version__, +) + dir_path = os.path.dirname(os.path.realpath(__file__)) CXX11_ABI = False @@ -28,11 +35,6 @@ CI_RELEASE = False -__version__ = "1.4.0dev0" -__cuda_version__ = "11.6" -__cudnn_version__ = "8.4" -__tensorrt_version__ = "8.4" - def get_git_revision_short_hash() -> str: return ( @@ -391,7 +393,7 @@ def run(self): packages=packages if FX_ONLY else find_packages(), package_dir=package_dir if FX_ONLY else {}, classifiers=[ - "Development Status :: 5 - Stable", + "Development Status :: 5 - Production/Stable", "Environment :: GPU :: NVIDIA CUDA", "License :: OSI Approved :: BSD License", "Intended Audience :: Developers", diff --git a/py/versions.py b/py/versions.py new file mode 100644 index 0000000000..998b2520c7 --- /dev/null +++ b/py/versions.py @@ -0,0 +1,4 @@ +__version__ = "1.3.0" +__cuda_version__ = "11.7" +__cudnn_version__ = "8.5" +__tensorrt_version__ = "8.5" diff --git a/tests/modules/requirements.txt b/tests/modules/requirements.txt index 8ad4e47be6..3edaa477aa 100644 --- a/tests/modules/requirements.txt +++ b/tests/modules/requirements.txt @@ -1,4 +1,3 @@ timm==v0.4.12 transformers==4.17.0 ---extra-index-url https://download.pytorch.org/whl/nightly/cu117 -torchvision==0.15.0.dev20230103+cu117 +torchvision From a05fe473b5920aceb50626cb7f4f893126f47514 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Thu, 16 Feb 2023 23:56:22 +0000 Subject: [PATCH 2/6] chore: Update base container for packaging container --- package-lock.json | 2 +- py/ci/Dockerfile.ci | 2 +- toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d13e5c303d..01dc757ec1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "tensorrt", + "name": "TensorRT", "lockfileVersion": 2, "requires": true, "packages": {} diff --git a/py/ci/Dockerfile.ci b/py/ci/Dockerfile.ci index 2cd9962449..918eaaef07 100644 --- a/py/ci/Dockerfile.ci +++ b/py/ci/Dockerfile.ci @@ -1,4 +1,4 @@ -FROM pytorch/manylinux-builder:cuda11.6 +FROM pytorch/manylinux-builder:cuda11.7 ARG trt_version RUN echo -e "Installing with TensorRT ${trt_version}" diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel index 608efac78b..53a3135cae 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel @@ -41,7 +41,7 @@ local_repository( new_local_repository( name = "cuda", build_file = "@//third_party/cuda:BUILD", - path = "/usr/local/cuda-11.6", + path = "/usr/local/cuda-11.7", ) new_local_repository( From 827d498338fe0383892103be26f56f5b89296196 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Wed, 22 Feb 2023 00:34:56 +0000 Subject: [PATCH 3/6] chore: aligning versions in the repo --- WORKSPACE | 8 ++++---- py/requirements.txt | 4 ++-- toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel | 8 ++++---- toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 7f4e951892..0d58bff297 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -56,17 +56,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "59b8b5e1954a86d50b79c13f06398d385b200da13e37a08ecf31d3c62e5ca127", + sha256 = "8b3b48615169c83c1b643c0efade078ea080b1da598e15fcf01bc59421f3095e", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "e260fc7476be89d1650953e8643e9f7363845f5a52de4bab87ac0e619c1f6ad4", + sha256 = "aa7fd06079d260ff83c344d043fb84fbd9cf831cf375ed8b5a1b62416817af31", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) # Download these tarballs manually from the NVIDIA website diff --git a/py/requirements.txt b/py/requirements.txt index 6d0916af9d..d28469ba15 100644 --- a/py/requirements.txt +++ b/py/requirements.txt @@ -1,7 +1,7 @@ numpy pybind11==2.6.2 --extra-index-url https://download.pytorch.org/whl/nightly/cu117 -torch==2.0.0.dev20230103+cu117 -torchvision==0.15.0.dev20230103+cu117 +torch==2.0.0.dev20230219+cu117 +torchvision==0.15.0.dev20230219+cu117 --extra-index-url https://pypi.ngc.nvidia.com tensorrt==8.5.1.7 diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel index 53a3135cae..59270cad51 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel @@ -56,17 +56,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "59b8b5e1954a86d50b79c13f06398d385b200da13e37a08ecf31d3c62e5ca127", + sha256 = "8b3b48615169c83c1b643c0efade078ea080b1da598e15fcf01bc59421f3095e", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "e260fc7476be89d1650953e8643e9f7363845f5a52de4bab87ac0e619c1f6ad4", + sha256 = "aa7fd06079d260ff83c344d043fb84fbd9cf831cf375ed8b5a1b62416817af31", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) #################################################################################### diff --git a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu index da3f766240..aa917f460a 100644 --- a/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu +++ b/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu @@ -56,17 +56,17 @@ new_local_repository( http_archive( name = "libtorch", build_file = "@//third_party/libtorch:BUILD", - sha256 = "59b8b5e1954a86d50b79c13f06398d385b200da13e37a08ecf31d3c62e5ca127", + sha256 = "8b3b48615169c83c1b643c0efade078ea080b1da598e15fcf01bc59421f3095e", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) http_archive( name = "libtorch_pre_cxx11_abi", build_file = "@//third_party/libtorch:BUILD", - sha256 = "e260fc7476be89d1650953e8643e9f7363845f5a52de4bab87ac0e619c1f6ad4", + sha256 = "aa7fd06079d260ff83c344d043fb84fbd9cf831cf375ed8b5a1b62416817af31", strip_prefix = "libtorch", - urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"], + urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230219%2Bcu117.zip"], ) #################################################################################### From 1a2b7a087ce59fa3acdae58b53bc15db6ebafcc6 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Wed, 22 Feb 2023 00:53:23 +0000 Subject: [PATCH 4/6] chore: remove py37 builds --- .circleci/config.yml | 2 +- py/ci/build_manifest.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 311d73601e..945c9e7b9c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -810,7 +810,7 @@ jobs: command: | cd ~/project/py/ cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel ~/project/WORKSPACE - 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=5 ~/project/py/ci/build_manifest.txt)" + 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)" - run: name: Collect packages command: | diff --git a/py/ci/build_manifest.txt b/py/ci/build_manifest.txt index f0b3e49fc3..7f1ff88237 100644 --- a/py/ci/build_manifest.txt +++ b/py/ci/build_manifest.txt @@ -1,4 +1,3 @@ -py37 py38 py39 py310 From b4ab3d0a11a7adf296ec25a9f925118d910a8e07 Mon Sep 17 00:00:00 2001 From: Naren Dasan <1790613+narendasan@users.noreply.github.com> Date: Wed, 22 Feb 2023 10:01:12 -0800 Subject: [PATCH 5/6] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 945c9e7b9c..c8b0d1fbd5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -791,7 +791,7 @@ jobs: type: string torch-build-index: type: string - parallelism: 5 + parallelism: 4 machine: image: ubuntu-2004-cuda-11.4:202110-01 resource_class: gpu.nvidia.small From e17f83a00e8e3d48d63e768bb668d8e23644166d Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Thu, 23 Feb 2023 16:36:09 -0800 Subject: [PATCH 6/6] Fix CI installed torch version --- .circleci/config.yml | 2 +- py/versions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8b0d1fbd5..3373262242 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1070,7 +1070,7 @@ parameters: # Nightly platform config torch-build: type: string - default: "2.0.0.dev20230129+cu117" + default: "2.0.0.dev20230219+cu117" torch-build-index: type: string default: "https://download.pytorch.org/whl/nightly/cu117" diff --git a/py/versions.py b/py/versions.py index 998b2520c7..3633ad114f 100644 --- a/py/versions.py +++ b/py/versions.py @@ -1,4 +1,4 @@ -__version__ = "1.3.0" +__version__ = "1.4.0.dev0" __cuda_version__ = "11.7" __cudnn_version__ = "8.5" __tensorrt_version__ = "8.5"