Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lanluo-nvidia committed Jun 17, 2024
1 parent 2732bc4 commit 95cdbba
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
7 changes: 6 additions & 1 deletion .github/scripts/build-linux-release-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -x

source "${BUILD_ENV_FILE}"

export CXX=g++
CURRENT_DIR=`pwd`

Expand Down Expand Up @@ -89,4 +91,7 @@ python -m auditwheel repair \
--plat manylinux_2_34_x86_64 \
/opt/torch-tensorrt-builds/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl

cp wheelhouse/torch_tensorrt*x86_64.whl dist/
cp wheelhouse/torch_tensorrt*x86_64.whl dist/


BUILD_VERSION=${TORCHTRT_VERSION} CI_BUILD=1 RELEASE=1 C python setup.py bdist_wheel --release
32 changes: 23 additions & 9 deletions .github/workflows/linux-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
description: "Pre script to run prior to build"
default: ""
type: string
env-var-script:
description: "Script that sets Domain-Specific Environment Variables"
default: ""
type: string
test-infra-repository:
description: "Test infra repository to use"
default: "pytorch/test-infra"
Expand Down Expand Up @@ -77,9 +81,6 @@ jobs:
container:
image: ${{ matrix.container_image }}
options: ${{ matrix.gpu_arch_type == 'cuda' && '--gpus all' || ' ' }}
# TO DO: ask Naren, I am not able to skip the release build if it is not cuda12.1 on the job level
# if: ${{ env.CU_VERSION == '12.1' }}

# If a build is taking longer than 60 minutes on these runners we need
# to have a conversation
timeout-minutes: 60
Expand Down Expand Up @@ -116,6 +117,19 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
cuda-version: ${{ env.CU_VERSION }}
arch: ${{ env.ARCH }}
- name: Combine Env Var and Build Env Files
if: ${{ inputs.env-var-script != '' }}
working-directory: ${{ inputs.repository }}
run: |
set -euxo pipefail
cat "${{ inputs.env-var-script }}" >> "${BUILD_ENV_FILE}"
- name: Install torch dependency
run: |
set -euxo pipefail
# shellcheck disable=SC1090
source "${BUILD_ENV_FILE}"
# shellcheck disable=SC2086
${CONDA_RUN} ${PIP_INSTALL_TORCH}
- name: Run Pre-Script with Caching
if: ${{ inputs.pre-script != '' }}
uses: ./test-infra/.github/actions/run-script-with-cache
Expand All @@ -129,12 +143,12 @@ jobs:
with:
name: ${{ env.ARTIFACT_NAME }}
path: /opt/torch-tensorrt-builds/
- name: Install torch and torch-tensorrt
if: ${{ inputs.pre-script != '' }}
uses: ./test-infra/.github/actions/run-script-with-cache
with:
repository: ${{ inputs.repository }}
script: .github/scripts/install-torch-tensorrt.sh
# - name: Install torch and torch-tensorrt
# if: ${{ inputs.pre-script != '' }}
# uses: ./test-infra/.github/actions/run-script-with-cache
# with:
# repository: ${{ inputs.repository }}
# script: .github/scripts/install-torch-tensorrt.sh
- name: Pack script
continue-on-error: ${{ inputs.continue-on-error }}
working-directory: ${{ inputs.repository }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ jobs:
matrix:
include:
- repository: pytorch/tensorrt
- package-name: torch_tensorrt
- pre-script: packaging/pre_build_script.sh
package-name: torch_tensorrt
pre-script: packaging/pre_build_script.sh
env-var-script: packaging/env_vars.txt
uses: ./.github/workflows/linux-release-artifacts.yml
if: ${{ contains(github.event.pull_request.labels.*.name, 'build-release-artifacts') }}
if: ${{ (contains(github.event.pull_request.labels.*.name, 'build-release-artifacts') || startsWith(github.event.ref, 'refs/tags/v')) && needs.generate-matrix.outputs.matrix.desired_cuda == 'cu121' }}
with:
job-name: build-release-artifiacts
repository: "pytorch/tensorrt"
Expand All @@ -65,6 +66,7 @@ jobs:
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
env-var-script: ${{ matrix.env-var-script }}
script: |
concurrency:
Expand Down

0 comments on commit 95cdbba

Please sign in to comment.