Skip to content

Commit 853cc0b

Browse files
fix the jetson nightly build check bug (#3552)
1 parent 74df712 commit 853cc0b

File tree

3 files changed

+10
-25
lines changed

3 files changed

+10
-25
lines changed

.github/scripts/filter-matrix.py

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def validate_matrix(matrix_dict: Dict[str, Any]) -> None:
2828

2929

3030
def filter_matrix_item(
31-
item: Dict[str, Any], is_jetpack: bool, limit_pr_builds: bool, is_nightly: bool
31+
item: Dict[str, Any],
32+
is_jetpack: bool,
33+
limit_pr_builds: bool,
3234
) -> bool:
3335
"""Filter a single matrix item based on the build type and requirements."""
3436
if item["python_version"] in disabled_python_versions:
@@ -42,21 +44,13 @@ def filter_matrix_item(
4244
item["python_version"] = "3.10"
4345
item["container_image"] = jetpack_container_image
4446
return True
45-
elif is_nightly:
46-
# nightly build, matrix passed from test-infra is cu128, all python versions, change to cu126, python 3.10
47+
else:
48+
# nightly/main build, matrix passed from test-infra is cu128, all python versions, change to cu126, python 3.10
4749
if item["python_version"] in jetpack_python_versions:
4850
item["desired_cuda"] = "cu126"
4951
item["container_image"] = jetpack_container_image
5052
return True
5153
return False
52-
else:
53-
if (
54-
item["python_version"] in jetpack_python_versions
55-
and item["desired_cuda"] in jetpack_cuda_versions
56-
):
57-
item["container_image"] = jetpack_container_image
58-
return True
59-
return False
6054
else:
6155
if item["gpu_arch_type"] == "cuda-aarch64":
6256
# pytorch image:pytorch/manylinuxaarch64-builder:cuda12.8 comes with glibc2.28
@@ -92,14 +86,6 @@ def main(args: list[str]) -> None:
9286
default=os.getenv("LIMIT_PR_BUILDS", "false"),
9387
)
9488

95-
parser.add_argument(
96-
"--is-nightly",
97-
help="If it is a nightly build",
98-
type=str,
99-
choices=["true", "false"],
100-
default=os.getenv("LIMIT_PR_BUILDS", "false"),
101-
)
102-
10389
options = parser.parse_args(args)
10490
if options.matrix == "":
10591
raise ValueError("--matrix needs to be provided")
@@ -120,7 +106,6 @@ def main(args: list[str]) -> None:
120106
item,
121107
options.jetpack == "true",
122108
options.limit_pr_builds == "true",
123-
options.is_nightly == "true",
124109
):
125110
filtered_includes.append(item)
126111

.github/workflows/build-test-linux-aarch64-jetpack.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ jobs:
3939
- name: Filter matrix
4040
id: filter
4141
env:
42-
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains( github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }}
43-
NIGHTLY_BUILDS: ${{ inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly') }}
42+
LIMIT_PR_BUILDS: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ciflow/binaries/all') }}
4443
run: |
4544
set -eou pipefail
4645
echo "LIMIT_PR_BUILDS=${LIMIT_PR_BUILDS}"
47-
echo "NIGHTLY_BUILDS=${NIGHTLY_BUILDS}"
46+
echo '${{ github.event_name }}'
47+
echo '${{ github.event.ref}}'
4848
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
49-
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}" --jetpack true --limit-pr-builds "${LIMIT_PR_BUILDS}" --is-nightly "${NIGHTLY_BUILDS}")"
49+
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}" --jetpack true --limit-pr-builds "${LIMIT_PR_BUILDS}")"
5050
echo "${MATRIX_BLOB}"
5151
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
5252

.github/workflows/build_wheels_linux_aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ jobs:
333333
needs: build
334334
uses: pytorch/test-infra/.github/workflows/_binary_upload.yml@main
335335
# for jetpack builds, only upload to pytorch index for nightly builds
336-
if: ${{ inputs.is-jetpack == false || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
336+
if: ${{ inputs.is-jetpack == false || (github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }}
337337
with:
338338
repository: ${{ inputs.repository }}
339339
ref: ${{ inputs.ref }}

0 commit comments

Comments
 (0)