Skip to content

fix the jetson nightly build check bug #3552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .github/scripts/filter-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def validate_matrix(matrix_dict: Dict[str, Any]) -> None:


def filter_matrix_item(
item: Dict[str, Any], is_jetpack: bool, limit_pr_builds: bool, is_nightly: bool
item: Dict[str, Any],
is_jetpack: bool,
limit_pr_builds: bool,
) -> bool:
"""Filter a single matrix item based on the build type and requirements."""
if item["python_version"] in disabled_python_versions:
Expand All @@ -42,21 +44,13 @@ def filter_matrix_item(
item["python_version"] = "3.10"
item["container_image"] = jetpack_container_image
return True
elif is_nightly:
# nightly build, matrix passed from test-infra is cu128, all python versions, change to cu126, python 3.10
else:
# nightly/main build, matrix passed from test-infra is cu128, all python versions, change to cu126, python 3.10
if item["python_version"] in jetpack_python_versions:
item["desired_cuda"] = "cu126"
item["container_image"] = jetpack_container_image
return True
return False
else:
if (
item["python_version"] in jetpack_python_versions
and item["desired_cuda"] in jetpack_cuda_versions
):
item["container_image"] = jetpack_container_image
return True
return False
else:
if item["gpu_arch_type"] == "cuda-aarch64":
# pytorch image:pytorch/manylinuxaarch64-builder:cuda12.8 comes with glibc2.28
Expand Down Expand Up @@ -92,14 +86,6 @@ def main(args: list[str]) -> None:
default=os.getenv("LIMIT_PR_BUILDS", "false"),
)

parser.add_argument(
"--is-nightly",
help="If it is a nightly build",
type=str,
choices=["true", "false"],
default=os.getenv("LIMIT_PR_BUILDS", "false"),
)

options = parser.parse_args(args)
if options.matrix == "":
raise ValueError("--matrix needs to be provided")
Expand All @@ -120,7 +106,6 @@ def main(args: list[str]) -> None:
item,
options.jetpack == "true",
options.limit_pr_builds == "true",
options.is_nightly == "true",
):
filtered_includes.append(item)

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test-linux-aarch64-jetpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:
- name: Filter matrix
id: filter
env:
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }}
NIGHTLY_BUILDS: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }}
run: |
set -eou pipefail
echo "LIMIT_PR_BUILDS=${LIMIT_PR_BUILDS}"
echo "NIGHTLY_BUILDS=${NIGHTLY_BUILDS}"
echo '${{ github.event_name }}'
echo '${{ github.event.ref}}'
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}" --jetpack true --limit-pr-builds "${LIMIT_PR_BUILDS}" --is-nightly "${NIGHTLY_BUILDS}")"
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}" --jetpack true --limit-pr-builds "${LIMIT_PR_BUILDS}")"
echo "${MATRIX_BLOB}"
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ jobs:
needs: build
uses: pytorch/test-infra/.github/workflows/_binary_upload.yml@main
# for jetpack builds, only upload to pytorch index for nightly builds
if: ${{ inputs.is-jetpack == false || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
if: ${{ inputs.is-jetpack == false || (github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand Down
Loading