8888 required : false
8989 default : " python -m build --wheel"
9090 type : string
91+ is-jetpack :
92+ description : Set to true if the build is for jetpack
93+ required : false
94+ default : false
95+ type : boolean
9196 pip-install-torch-extra-args :
9297 # NOTE: Why does this exist?
9398 # Well setuptools / python packaging doesn't actually allow you to specify dependencies
@@ -128,7 +133,7 @@ jobs:
128133 UPLOAD_TO_BASE_BUCKET : ${{ matrix.upload_to_base_bucket }}
129134 ARCH : ${{ inputs.architecture }}
130135 BUILD_TARGET : ${{ inputs.build-target }}
131- name : build-${{ matrix.build_name }}
136+ name : build-wheel- ${{ matrix.python_version }}-${{ matrix.desired_cuda }}-${{ matrix.gpu_arch_type }}
132137 runs-on : ${{ matrix.validation_runner }}
133138 environment : ${{(inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && (startsWith(github.event.ref, 'refs/heads/nightly') || startsWith(github.event.ref, 'refs/tags/v')))) && 'pytorchbot-env' || ''}}
134139 container :
@@ -170,6 +175,11 @@ jobs:
170175 # when using Python version, less than the conda latest
171176 ###############################################################################
172177 echo 'Installing conda-forge'
178+ if [[ ${{ inputs.is-jetpack }} == true ]]; then
179+ # jetpack base image is ubuntu 22.04, does not have curl installed
180+ apt-get update
181+ apt-get install -y curl git
182+ fi
173183 curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
174184 chmod +x /mambaforge.sh
175185 /mambaforge.sh -b -p /opt/conda
@@ -195,12 +205,11 @@ jobs:
195205 python-version : ${{ env.PYTHON_VERSION }}
196206 cuda-version : ${{ env.CU_VERSION }}
197207 arch : ${{ env.ARCH }}
198-
199208 - name : Combine Env Var and Build Env Files
200209 if : ${{ inputs.env-var-script != '' }}
201210 working-directory : ${{ inputs.repository }}
202211 run : |
203- set -euxo pipefail
212+ set -x
204213 cat "${{ inputs.env-var-script }}" >> "${BUILD_ENV_FILE}"
205214 - name : Add XPU Env Vars in Build Env File
206215 if : ${{ matrix.gpu_arch_type == 'xpu' }}
@@ -211,6 +220,7 @@ jobs:
211220 echo "source /opt/intel/oneapi/pti/latest/env/vars.sh"
212221 } >> "${BUILD_ENV_FILE}"
213222 - name : Install torch dependency
223+ if : ${{ inputs.is-jetpack == false }}
214224 run : |
215225 set -euxo pipefail
216226 # shellcheck disable=SC1090
@@ -241,12 +251,17 @@ jobs:
241251 working-directory : ${{ inputs.repository }}
242252 shell : bash -l {0}
243253 run : |
244- set -euxo pipefail
254+ #set -euxo pipefail
255+ set -x
245256 source "${BUILD_ENV_FILE}"
246257 export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
247258 ${CONDA_RUN} python setup.py clean
248259 echo "Successfully ran `python setup.py clean`"
249- ${CONDA_RUN} python setup.py bdist_wheel
260+ if [[ ${{ inputs.is-jetpack }} == false ]]; then
261+ ${CONDA_RUN} python setup.py bdist_wheel
262+ else
263+ ${CONDA_RUN} python setup.py bdist_wheel --jetpack --plat-name=linux_tegra_aarch64
264+ fi
250265 - name : Repair Manylinux_2_28 Wheel
251266 shell : bash -l {0}
252267 env :
@@ -272,6 +287,7 @@ jobs:
272287 script : ${{ inputs.post-script }}
273288 - name : Smoke Test
274289 shell : bash -l {0}
290+ if : ${{ inputs.is-jetpack == false }}
275291 env :
276292 PACKAGE_NAME : ${{ inputs.package-name }}
277293 SMOKE_TEST_SCRIPT : ${{ inputs.smoke-test-script }}
@@ -316,7 +332,8 @@ jobs:
316332 upload :
317333 needs : build
318334 uses : pytorch/test-infra/.github/workflows/_binary_upload.yml@main
319- if : always()
335+ # only upload to pytorch index for non jetpack builds
336+ if : ${{ inputs.is-jetpack == false }}
320337 with :
321338 repository : ${{ inputs.repository }}
322339 ref : ${{ inputs.ref }}
0 commit comments