Skip to content

CI: auto-trigger AITER prebuilt upload when 3rdparty/aiter updates on dev#543

Open
VeeraRajasekhar wants to merge 2 commits intodevfrom
veergopu/aiter-prebuilt-upload-on-dev
Open

CI: auto-trigger AITER prebuilt upload when 3rdparty/aiter updates on dev#543
VeeraRajasekhar wants to merge 2 commits intodevfrom
veergopu/aiter-prebuilt-upload-on-dev

Conversation

@VeeraRajasekhar
Copy link
Copy Markdown
Contributor

Description

This adds CI to build and upload AITER prebuilts to AMD Artifactory when the AITER submodule pointer or contents under 3rdparty/aiter change on dev, so prebuilts stay aligned with the submodule without relying only on manual runs.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Add .github/workflows/aiter-prebuilt-upload.yml: push to dev with paths: 3rdparty/aiter.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@VeeraRajasekhar VeeraRajasekhar force-pushed the veergopu/aiter-prebuilt-upload-on-dev branch from da019d7 to 5240d8d Compare April 15, 2026 20:37
@VeeraRajasekhar VeeraRajasekhar marked this pull request as ready for review April 15, 2026 20:37
@VeeraRajasekhar VeeraRajasekhar self-assigned this Apr 15, 2026
@Micky774
Copy link
Copy Markdown
Contributor

What happens if e.g. an aiter prebuilt cache entry was already created from a branch before it gets merged into dev, thus on merge this action would not be needed -- does it still run and overwrite the entry? Does it cancel gracefully?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@Micky774 Micky774 Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@VeeraRajasekhar
Copy link
Copy Markdown
Contributor Author

What happens if e.g. an aiter prebuilt cache entry was already created from a branch before it gets merged into dev, thus on merge this action would not be needed -- does it still run and overwrite the entry? Does it cancel gracefully?

It will cancel It won't force push or anything.

…selection

- rocm-ci: add select_docker_image (ci_config.json) once; pass image to matrix and
  aiter-prebuilt-upload reusable workflow. upload_aiter_prebuilt runs only for
  workflow_call/workflow_dispatch when inputs.trigger_aiter_upload is true; push
  to dev/release skips upload (prebuilts expected from PR CI). build_and_test
  gates on select_docker_image and upload job success or skip.
- rocm-ci-dispatch: add aiter_upload_trigger and pass trigger_aiter_upload into rocm-ci.
- aiter-prebuilt-upload: support workflow_call with required docker_image from
  caller;
- Add .github/scripts/select_te_docker_image_ci_config.sh for shared image
  resolution aligned with CI config and overrides.
@VeeraRajasekhar
Copy link
Copy Markdown
Contributor Author

rocm-ci-dispatch.yml

  • Job aiter_upload_trigger: paths-filter on 3rdparty/aiter vs the PR base → sets trigger_aiter_upload.
  • dispatch calls rocm-ci.yml with test_level + trigger_aiter_upload (same entry path as existing PR CI).

rocm-ci.yml

  • select_docker_image: resolves the Docker image once from ci/ci_config.json (shared script: select_te_docker_image_ci_config.sh).
  • upload_aiter_prebuilt: runs only when workflow_call / workflow_dispatch and inputs.trigger_aiter_upload — i.e. PR CI (or manual), not on push to dev/release. It uses aiter-prebuilt-upload.yml and passes the resolved image.
  • build_and_test: GPU matrix; waits for image resolution and for upload to succeed or be skipped (skipped on post-merge push, where we assume prebuilts were already published from the PR).

aiter-prebuilt-upload.yml

  • Reusable workflow: workflow_call takes required docker_image from rocm-ci; workflow_dispatch unchanged for manual runs.

@ipanfilo
Copy link
Copy Markdown
Collaborator

Big rocm-ci refactor is in progress #528, let's postpone this PR till refactoring one is merged

Copy link
Copy Markdown
Collaborator

@ipanfilo ipanfilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch is not PR triggered action. Also no need to specify default in description

@VeeraRajasekhar
Copy link
Copy Markdown
Contributor Author

rebasing with the latest changes to rocm-ci file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants