CI: auto-trigger AITER prebuilt upload when 3rdparty/aiter updates on dev#543
CI: auto-trigger AITER prebuilt upload when 3rdparty/aiter updates on dev#543VeeraRajasekhar wants to merge 7 commits into
Conversation
da019d7 to
5240d8d
Compare
|
What happens if e.g. an aiter prebuilt cache entry was already created from a branch before it gets merged into |
There was a problem hiding this comment.
Pushing to dev is too late. Binaries are expected to be cached when PR is created, otherwise the PR CI will have to rebuild them
There was a problem hiding this comment.
I initially started with an idea to provide a PR comment trigger which does this. Do you think it is better? In this case I might need to provide a way to force-push if the user needs to trigger multiple times while working on the PR.
There was a problem hiding this comment.
I wonder if it can be driven by CI labels + filter by specific path modification. I.e. on the first CI run after aiter commit update, it first builds and uploads AITER and then goes further with CI.
There was a problem hiding this comment.
On that note, can we have an upload as a side effect during the build-and-test workflow? That would provide a relatively simple way to implement this.
Specifically, we can do this more-or-less as-is by using the following filtering for a prebuilt cache upload:
on:
pull_request:
paths:
- '3rdparty/aiter'
- '3rdpart/aiter/***'
Not sure which one exactly is needed since aiter is a submodule but one should work. Still, I'd be more interested in conditionally checking whether the AITER submodule was built from source, and then uploading if it was in the build-and-test flow.
It will cancel It won't force push or anything. |
rocm-ci-dispatch.yml
rocm-ci.yml
aiter-prebuilt-upload.yml
|
|
Big rocm-ci refactor is in progress #528, let's postpone this PR till refactoring one is merged |
ipanfilo
left a comment
There was a problem hiding this comment.
Put the PR on hold not to interfere with other WIP
| type: boolean | ||
| default: false | ||
| trigger_aiter_upload: | ||
| description: 'Advanced; PR path uses rocm-ci-dispatch. Default false.' |
There was a problem hiding this comment.
workflow_dispatch is not PR triggered action. Also no need to specify default in description
|
rebasing with the latest changes to rocm-ci file. |
a4fd1df to
2a63432
Compare
109e32e to
52be5b1
Compare
|
Rather than adding a label to skip the pre-built upload, can we instead have it be opt-in so that we don't burn extra resources on intermediate changes and iteration? |
I will be removing this “skip prebuilt upload” label. The original idea was to handle cases where Artifactory was unreachable from the runner, but that’s no longer the main control: we now have preflight checks that test whether the AITER prebuilt Artifactory is reachable from the current runner. If it isn’t, we skip the upload and still run CI. So we don’t need a separate skip label for that anymore. As for keeping an Aiter-Upload label, doing this would force an awkward ordering (“only add ci-level-* after upload succeeds”) and extra process overhead. It would also waste effort when people set test labels first and we build but never publish. Current behavior |
Wire PR Automatic CI to optionally build and upload AITER prebuilts to Artifactory when a synchronize touches 3rdparty/aiter and the upload-success cache misses. Reuse select-docker-image for consistent image resolution across dispatch, rocm-ci, and the upload workflow. - rocm-ci-dispatch: gate on aiter paths, compute aiter_upload_cache_key from Docker image slug and submodule SHA, restore cache before deciding trigger_aiter_upload, pass docker_image_override and flags into rocm-ci. - rocm-ci: call aiter-prebuilt-upload on pull_request when trigger_aiter_upload; pass image tag and cache key; keep build gated on select_image and upload success or skip. - aiter-prebuilt-upload: always run select_docker_image; pull/run using needs.select_docker_image.outputs.image_tag; optional cache save after success. - Add select-docker-image reusable workflow for ci/ci_config.json resolution.
Claude WalkthroughIntent. Auto-build and upload the AITER prebuilt to AMD Artifactory whenever a PR changes Key changes.
Walkthrough.
Testing. No automated tests were added; this is a CI-only change. Validation comes from observing Notes for reviewers.
Generated by Claude. To request a code review, comment |
| - name: Detect PR changes under 3rdparty/aiter | ||
| uses: dorny/paths-filter@v4 | ||
| id: paths | ||
| if: github.event.action == 'synchronize' |
There was a problem hiding this comment.
Minor: this if: is on the step, not the job, so aiter_gate still spins up an ubuntu-latest runner on every labeled and reopened event just to skip its only step. Moving the gate to the job level (and letting the downstream aiter_prebuilt_upload_trigger see an empty aiter_paths output, which the existing expression already treats as falsy) would avoid that.
| if: github.event.action == 'synchronize' | |
| - name: Detect PR changes under 3rdparty/aiter | |
| uses: dorny/paths-filter@v4 | |
| id: paths | |
| with: | |
| filters: | | |
| aiter: | |
| - '3rdparty/aiter/**' |
…paired with if: github.event.action == 'synchronize' on the aiter_gate job itself.
|
|
||
| echo "Selected image: $IMAGE_TO_USE" | ||
| echo "image-tag=$IMAGE_TO_USE" >> $GITHUB_OUTPUT | ||
| uses: ./.github/workflows/select-docker-image.yml |
There was a problem hiding this comment.
select-docker-image.yml ends up being invoked three times along this chain (dispatch.yml → rocm-ci.yml here → aiter-prebuilt-upload.yml), once per layer. The two inner invocations always receive the already-resolved tag via docker_image_override, so they only run the reusable workflow's JSON lookup to overwrite it with the override — three runners and three checkouts for the same answer.
If the override is non-empty, you can skip the reusable workflow and emit the override directly as select_image.outputs.image_tag (e.g., a tiny job whose only step echoes it to $GITHUB_OUTPUT), and reserve the full reusable workflow for the workflow_dispatch path. Same for aiter-prebuilt-upload.yml.
| _aiter_check_artifactory_download | ||
| ;; | ||
| *) | ||
| echo "Usage: $(basename "$0") --preflight --upload | --preflight --download" >&2 |
There was a problem hiding this comment.
Usage string omits the script's primary modes (no-arg package-only and --build). When someone misuses --preflight and lands on this branch they'll be told only the preflight forms exist.
| echo "Usage: $(basename "$0") --preflight --upload | --preflight --download" >&2 | |
| echo "Usage: $(basename "$0") [--build]" >&2 | |
| echo " $(basename "$0") --preflight --upload | --preflight --download" >&2 |
Claude reviewReviewed the AITER auto-upload + shared docker-image selector changes (6 CI files, +319 / -79). The flow looks sound: PR-side path filter on Three minor inline notes — none blocking:
Worth confirming with the author:
Copyright headers: OK — all six files (4 modified, 1 added, 1 unchanged-header script) have correct AMD-only headers ending in 2026. |
Description
This adds CI to build and upload AITER prebuilts to AMD Artifactory when the AITER submodule pointer or contents under
3rdparty/aiterchange ondev, so prebuilts stay aligned with the submodule without relying only on manual runs.Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
.github/workflows/aiter-prebuilt-upload.yml:pushtodevwithpaths: 3rdparty/aiter.Checklist: