Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lanluo-nvidia committed Jul 5, 2024
1 parent e8cd39e commit 6c67eae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 66 deletions.
72 changes: 9 additions & 63 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,39 @@ permissions:
packages: write

jobs:
release-cxx11-tar-ball:
env:
PYTHON_VERSION: 3.10
CU_VERSION: cu124
name: release_cxx11_tar_ball
runs-on: linux.4xlarge.nvidia.gpu
container:
# TODO: this should be changed to ghcr.io/pytorch/tensorrt/torch_tensorrt_cxx11:release_2.4
# once the PR is committed to release/2.4 branch
image: 'ghcr.io/pytorch/tensorrt/torch_tensorrt_cxx11:2987_merge'
options: '--gpus all'
timeout-minutes: 120
steps:
- name: Build CXX11-ABI Tarball
shell: bash -l {0}
run: |
set -euxo pipefail
cd /opt/torch_tensorrt
bazel build //:libtorchtrt --compilation_mode opt --config=default
mkdir release
# example: 2.4.0.dev20240610+cu124, we don't want the +cu124 part, so remove +cu124
PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__)")
PYTORCH_VERSION=${PYTORCH_VERSION%+*}
TORCHTRT_VERSION=2.4.0
cp bazel-bin/libtorchtrt.tar.gz \
release/libtorchtrt-${TORCHTRT_VERSION}-tensorrt${TENSORRT_VERSION}-cuda${CU_VERSION}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz
# NB: Only upload to GitHub after passing smoke tests
- name: Upload tarball to GitHub
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: cxx11-tarball-${PYTHON_VERSION}-${CU_VERSION}
path: /opt/torch_tensorrt/release/

# release-pre-cxx11-tar-ball:
# release-cxx11-tar-ball:
# env:
# PYTHON_VERSION: 3.10
# CU_VERSION: cu124
# name: release_pre_cxx11_tar_ball
# name: release_cxx11_tar_ball
# runs-on: linux.4xlarge.nvidia.gpu
# container:
# # TODO: this should be changed to ghcr.io/pytorch/tensorrt/torch_tensorrt:release_2.4
# # TODO: this should be changed to ghcr.io/pytorch/tensorrt/torch_tensorrt_cxx11:release_2.4
# # once the PR is committed to release/2.4 branch
# image: 'ghcr.io/pytorch/tensorrt/torch_tensorrt:2987_merge'
# image: 'ghcr.io/pytorch/tensorrt/torch_tensorrt_cxx11:2987_merge'
# options: '--gpus all'
# timeout-minutes: 120
# steps:
# - name: Build PRE-CXX11-ABI Tarball
# - name: Build CXX11-ABI Tarball
# shell: bash -l {0}
# run: |
# set -euxo pipefail
# cd /opt/torch_tensorrt
# bazel build //:libtorchtrt --compilation_mode opt --config=pre_cxx11_abi
# bazel build //:libtorchtrt --compilation_mode opt --config=default
# mkdir release
# # example: 2.4.0.dev20240610+cu124, we don't want the +cu124 part, so remove +cu124
# PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__)")
# PYTORCH_VERSION=${PYTORCH_VERSION%+*}
# TORCHTRT_VERSION=2.4.0
# cp bazel-bin/libtorchtrt.tar.gz \
# release/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-tensorrt${TENSORRT_VERSION}-cuda${CU_VERSION}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz
# release/libtorchtrt-${TORCHTRT_VERSION}-tensorrt${TENSORRT_VERSION}-cuda${CU_VERSION}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz

# # NB: Only upload to GitHub after passing smoke tests
# - name: Upload tarball to GitHub
# continue-on-error: true
# uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v3
# with:
# name: pre-cxx11-tarball-${PYTHON_VERSION}-${CU_VERSION}
# name: cxx11-tarball-${PYTHON_VERSION}-${CU_VERSION}
# path: /opt/torch_tensorrt/release/

generate-matrix:
Expand All @@ -94,25 +59,6 @@ jobs:
with-rocm: false
with-cpu: false

# generate-release-matrix:
# needs: [generate-matrix]
# outputs:
# release_matrix: ${{ steps.generate.outputs.release_matrix }}
# runs-on: ubuntu-latest
# steps:
# - name: Generate release matrix
# id: generate
# run: |
# set -x
# sudo apt-get update && sudo apt-get install -y jq
# matrix=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
# echo "${matrix}"

# RELEASE_MATRIX_INCLUDE=$(echo ${matrix} | jq -c '.[] | map(select(.desired_cuda=="cu124"))')
# RELEASE_MATRIX_BLOB=$(jq -c -n '{"include": $RELEASE_MATRIX_INCLUDE}' --argjson RELEASE_MATRIX_INCLUDE "$RELEASE_MATRIX_INCLUDE")
# echo "${RELEASE_MATRIX_BLOB}"
# echo "release_matrix=${RELEASE_MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"

build-wheel-artifacts:
name: Build torch-tensorrt release wheel artifacts
needs: [generate-matrix]
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release-wheel-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,16 @@ jobs:
working-directory: ${{ inputs.repository }}
shell: bash -l {0}
run: |
# set -euxo pipefail
set -x
set -euxo pipefail
source "${BUILD_ENV_FILE}"
# BUILD_VERSION example: 2.4.0.dev20240610+cu121, we don't want the +cu121 part, so remove +cu121
BUILD_VERSION=${BUILD_VERSION%+*}
${CONDA_RUN} python setup.py bdist_wheel --release
TRT_VERSION=10.0.1
mkdir tarball
cp bazel-bin/libtorchtrt.tar.gz \
tarball/libtorchtrt-${BUILD_VERSION}-pre-cxx11-abi-tensorrt${TRT_VERSION}-cuda${CU_VERSION}-libtorch${BUILD_VERSION}-x86_64-linux.tar.gz
${CONDA_RUN} python -m pip install auditwheel
${CONDA_RUN} python -m auditwheel repair \
Expand Down Expand Up @@ -244,7 +246,13 @@ jobs:
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/

- name: Upload pre-cxx11 tarball to GitHub
if: ${{ env.PYTHON_VERSION == "3.10" && env.CU_VERSION == "cu124" }}
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: pre-cxx11-tarball-${PYTHON_VERSION}-${CU_VERSION}
path: ${{ inputs.repository }}/tarball/

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}
Expand Down

0 comments on commit 6c67eae

Please sign in to comment.