Skip to content

Commit 95cdbba

Browse files
committed
test
1 parent 2732bc4 commit 95cdbba

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

.github/scripts/build-linux-release-artifacts.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -x
44

5+
source "${BUILD_ENV_FILE}"
6+
57
export CXX=g++
68
CURRENT_DIR=`pwd`
79

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

92-
cp wheelhouse/torch_tensorrt*x86_64.whl dist/
94+
cp wheelhouse/torch_tensorrt*x86_64.whl dist/
95+
96+
97+
BUILD_VERSION=${TORCHTRT_VERSION} CI_BUILD=1 RELEASE=1 C python setup.py bdist_wheel --release

.github/workflows/linux-release-artifacts.yml

+23-9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Pre script to run prior to build"
2020
default: ""
2121
type: string
22+
env-var-script:
23+
description: "Script that sets Domain-Specific Environment Variables"
24+
default: ""
25+
type: string
2226
test-infra-repository:
2327
description: "Test infra repository to use"
2428
default: "pytorch/test-infra"
@@ -77,9 +81,6 @@ jobs:
7781
container:
7882
image: ${{ matrix.container_image }}
7983
options: ${{ matrix.gpu_arch_type == 'cuda' && '--gpus all' || ' ' }}
80-
# TO DO: ask Naren, I am not able to skip the release build if it is not cuda12.1 on the job level
81-
# if: ${{ env.CU_VERSION == '12.1' }}
82-
8384
# If a build is taking longer than 60 minutes on these runners we need
8485
# to have a conversation
8586
timeout-minutes: 60
@@ -116,6 +117,19 @@ jobs:
116117
python-version: ${{ env.PYTHON_VERSION }}
117118
cuda-version: ${{ env.CU_VERSION }}
118119
arch: ${{ env.ARCH }}
120+
- name: Combine Env Var and Build Env Files
121+
if: ${{ inputs.env-var-script != '' }}
122+
working-directory: ${{ inputs.repository }}
123+
run: |
124+
set -euxo pipefail
125+
cat "${{ inputs.env-var-script }}" >> "${BUILD_ENV_FILE}"
126+
- name: Install torch dependency
127+
run: |
128+
set -euxo pipefail
129+
# shellcheck disable=SC1090
130+
source "${BUILD_ENV_FILE}"
131+
# shellcheck disable=SC2086
132+
${CONDA_RUN} ${PIP_INSTALL_TORCH}
119133
- name: Run Pre-Script with Caching
120134
if: ${{ inputs.pre-script != '' }}
121135
uses: ./test-infra/.github/actions/run-script-with-cache
@@ -129,12 +143,12 @@ jobs:
129143
with:
130144
name: ${{ env.ARTIFACT_NAME }}
131145
path: /opt/torch-tensorrt-builds/
132-
- name: Install torch and torch-tensorrt
133-
if: ${{ inputs.pre-script != '' }}
134-
uses: ./test-infra/.github/actions/run-script-with-cache
135-
with:
136-
repository: ${{ inputs.repository }}
137-
script: .github/scripts/install-torch-tensorrt.sh
146+
# - name: Install torch and torch-tensorrt
147+
# if: ${{ inputs.pre-script != '' }}
148+
# uses: ./test-infra/.github/actions/run-script-with-cache
149+
# with:
150+
# repository: ${{ inputs.repository }}
151+
# script: .github/scripts/install-torch-tensorrt.sh
138152
- name: Pack script
139153
continue-on-error: ${{ inputs.continue-on-error }}
140154
working-directory: ${{ inputs.repository }}

.github/workflows/linux-release.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ jobs:
5353
matrix:
5454
include:
5555
- repository: pytorch/tensorrt
56-
- package-name: torch_tensorrt
57-
- pre-script: packaging/pre_build_script.sh
56+
package-name: torch_tensorrt
57+
pre-script: packaging/pre_build_script.sh
58+
env-var-script: packaging/env_vars.txt
5859
uses: ./.github/workflows/linux-release-artifacts.yml
59-
if: ${{ contains(github.event.pull_request.labels.*.name, 'build-release-artifacts') }}
60+
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' }}
6061
with:
6162
job-name: build-release-artifiacts
6263
repository: "pytorch/tensorrt"
@@ -65,6 +66,7 @@ jobs:
6566
test-infra-ref: main
6667
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
6768
pre-script: ${{ matrix.pre-script }}
69+
env-var-script: ${{ matrix.env-var-script }}
6870
script: |
6971
7072
concurrency:

0 commit comments

Comments
 (0)