From df522497cb0119802805dc5a6abcbf6ff01ab77d Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Oct 2026 10:59:44 -0700 Subject: [PATCH 1/3] test(ci): rewire Multi-Arch CI onto TheRock's consolidated CI engine TheRock removed configure_external_repo_ci.py and now derives changed_projects itself, so drop the `configure` job and read the value off `setup` instead. The external_repo JSON gains "projects_config" so TheRock can map this repo's diff onto project paths; test_type now comes from setup as well. Also migrates the setup call from the retired linux_test_labels/ windows_test_labels inputs to the general pr_labels input. cv-libs is dropped from prebuilt_stages. It used to be removed conditionally when projects/rpp changed, which is no longer expressible: prebuilt_stages is an input to the same job that now computes changed_projects, and TheRock does not filter explicit prebuilt stages by changed-project impact. Always rebuilding cv-libs is the safe choice until TheRock does that filtering. TEMPORARY: all TheRock refs point at the branch users/geomin12/external-ci-file-goodbye for testing. Do not merge as-is. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/therock-multi-arch-ci.yml | 122 ++++++++------------ 1 file changed, 49 insertions(+), 73 deletions(-) diff --git a/.github/workflows/therock-multi-arch-ci.yml b/.github/workflows/therock-multi-arch-ci.yml index 1720bc9b05d0..6b1d525a602b 100644 --- a/.github/workflows/therock-multi-arch-ci.yml +++ b/.github/workflows/therock-multi-arch-ci.yml @@ -14,7 +14,9 @@ name: TheRock Multi-Arch CI -# TheRock ref: pinned to ROCm/TheRock commit c01e3a3f3f67966dd35612cf363b49964f33cd47. +# TheRock ref: TEMPORARILY pointed at the branch +# users/geomin12/external-ci-file-goodbye to test ROCm/TheRock's removal of +# configure_external_repo_ci.py. Restore a pinned SHA before merging. # NOTE: update all `@` refs and `ref:` inputs together when switching. on: @@ -35,17 +37,13 @@ on: type: string description: "Insert comma-separated list of Linux GPU families to build and test. ex: gfx94X, gfx120X (empty = skip linux)" default: "" - linux_test_labels: - type: string - description: "If enabled, reduce test set on Linux to the list of labels prefixed with 'test:'. ex: test:rocprim, test:hipcub" - default: "" windows_amdgpu_families: type: string description: "Insert comma-separated list of Windows GPU families to build and test. ex: gfx94X, gfx120X (empty = skip windows)" default: "" - windows_test_labels: + pr_labels: type: string - description: "If enabled, reduce test set on Windows to the list of labels prefixed with 'test:' ex: test:rocprim, test:hipcub" + description: "Comma-separated labels, as a PR would carry. ex: test:rocprim,test_filter:quick" default: "" prebuilt_stages: type: string @@ -108,52 +106,9 @@ jobs: id: ci-env uses: ./.github/actions/ci-env - configure: - name: Configure Changed Projects - runs-on: ubuntu-24.04 - outputs: - changed_projects: ${{ steps.configure.outputs.changed_projects }} - # TheRock's determine_rocm_test_dependencies.py natively resolves - # shared/* monorepo subtrees (shared/stinkytofu, shared/tensile, - # shared/origami, shared/mxdatagenerator, shared/rocroller) into the - # right consumer set, so changed_projects is passed straight through - # as test_projects without a rocm-libraries-side translation step. - # See ROCm/rocm-libraries#11784 for the retired stopgap this replaces. - test_projects: ${{ steps.configure.outputs.changed_projects }} - run_all_tests: ${{ steps.configure.outputs.run_all_tests }} - test_type: ${{ steps.configure.outputs.test_type }} - steps: - - name: Checkout repository config - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - sparse-checkout: | - .github/repos-config.json - sparse-checkout-cone-mode: false - - - name: Checkout TheRock for configure script - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - repository: ROCm/TheRock - ref: c01e3a3f3f67966dd35612cf363b49964f33cd47 - path: _therock - sparse-checkout: build_tools/github_actions - sparse-checkout-cone-mode: true - - - name: Configure CI - id: configure - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - python3 _therock/build_tools/github_actions/configure_external_repo_ci.py \ - --event-name "${{ github.event_name }}" \ - --github-repo "${{ github.repository }}" \ - --base-sha "${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}" \ - --head-sha "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" \ - --config-path ".github/repos-config.json" - setup: - needs: [ci-env, configure] - uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + needs: [ci-env] + uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@users/geomin12/external-ci-file-goodbye with: build_variant: "release" # Limit GPU families for rocm-libraries CI. @@ -165,15 +120,23 @@ jobs: # only nightly. linux_amdgpu_families: ${{ inputs.linux_amdgpu_families || 'gfx94X,gfx950,gfx125X' }} windows_amdgpu_families: ${{ inputs.windows_amdgpu_families || 'gfx110X' }} - linux_test_labels: ${{ inputs.linux_test_labels || '' }} - windows_test_labels: ${{ inputs.windows_test_labels || '' }} + pr_labels: ${{ inputs.pr_labels || '' }} # Copy all stages except math-libs and ml-libs from TheRock baseline # rocm-libraries only affects math-libs and ml-libs source sets - # RPP owns cv-libs, so rebuild that stage when projects/rpp changes. # Note: compiler-runtime excluded due to hardcoded CMake paths (fftw3, etc.) # Copy prebuilt stages only when the resolved reuse policy provides a # baseline run ID. Otherwise, leave this empty for a full stage build. - prebuilt_stages: ${{ needs.ci-env.outputs.baseline-run-id != '' && (inputs.prebuilt_stages || (contains(format(',{0},', needs.configure.outputs.changed_projects), ',projects/rpp,') && 'runtime-tests,comm-libs,storage-libs,debug-tools,dctools-core,profiler-apps,media-libs,wsl-rocdxg' || 'runtime-tests,comm-libs,cv-libs,storage-libs,debug-tools,dctools-core,profiler-apps,media-libs,wsl-rocdxg')) || '' }} + # + # cv-libs is NOT in this list. It used to be dropped conditionally when + # projects/rpp changed, using the retired `configure` job's output. That + # is no longer expressible: changed_projects is now computed by `setup` + # itself, and prebuilt_stages is an input to that same job. TheRock does + # not filter explicit prebuilt_stages by changed-project impact, so + # listing cv-libs here would copy stale RPP artifacts over a real RPP + # change. Always rebuilding cv-libs is the safe choice. + # TODO: have TheRock drop prebuilt stages that build a changed project, + # then restore cv-libs here. + prebuilt_stages: ${{ needs.ci-env.outputs.baseline-run-id != '' && (inputs.prebuilt_stages || 'runtime-tests,comm-libs,storage-libs,debug-tools,dctools-core,profiler-apps,media-libs,wsl-rocdxg') || '' }} # Use the baseline selected by the artifact reuse policy above. baseline_run_id: ${{ needs.ci-env.outputs.baseline-run-id }} baseline_repository: ${{ inputs.baseline_repository || (inputs.baseline_run_id != '' && github.repository) || '' }} @@ -192,8 +155,16 @@ jobs: 'off' }} repository: ROCm/TheRock - ref: c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + ref: users/geomin12/external-ci-file-goodbye # Pass external repo info for stage-impact analysis. + # + # event_name/pr_number/base_sha/head_sha let TheRock fetch this repo's + # diff. projects_config maps that diff onto changed projects, replacing + # the retired configure_external_repo_ci.py; skip_ci_config supplies the + # skip patterns. skip_ci_config is REQUIRED -- without it TheRock falls + # back to its own skip config, whose patterns reference TheRock-only + # paths that mean nothing in this repository. + # # extra_cmake_options is appended to the cmake configure line of every # build stage, scoped to this repository's CI runs. TheRock keeps # HIPKERNELPROVIDER_ENABLE_ROCKE OFF by default; enabling it here is what @@ -210,19 +181,20 @@ jobs: "head_sha": "${{ github.sha }}", "pr_number": ${{ github.event.pull_request.number || 'null' }}, "event_name": "${{ github.event_name }}", + "projects_config": ".github/repos-config.json", "skip_ci_config": ".github/skip-ci-config.toml", "extra_cmake_options": "-DTHEROCK_FLAG_HIPKERNELPROVIDER_ENABLE_ROCKE=ON" } linux_build_and_test: name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} - needs: [configure, setup] + needs: [setup] if: >- ${{ needs.setup.outputs.linux_build_config != '' && needs.setup.outputs.enable_build_jobs == 'true' }} - uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@users/geomin12/external-ci-file-goodbye secrets: inherit with: build_config: ${{ needs.setup.outputs.linux_build_config }} @@ -230,38 +202,42 @@ jobs: rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} rocm_deb_package_version: ${{ needs.setup.outputs.rocm_deb_package_version }} rocm_rpm_package_version: ${{ needs.setup.outputs.rocm_rpm_package_version }} - test_type: ${{ needs.configure.outputs.test_type }} + test_type: ${{ needs.setup.outputs.test_type }} external_repo_config: ${{ needs.setup.outputs.external_repo_config }} - # Empty string when run_all_tests=true triggers full test run in downstream workflow - changed_projects: ${{ needs.configure.outputs.run_all_tests == 'true' && '' || needs.configure.outputs.test_projects }} + # Scopes the test run to the projects this PR touched; empty means run + # everything. It does not narrow the build: TheRock builds every + # in-scope stage in full, so a rocPRIM change still rebuilds math-libs. + changed_projects: ${{ needs.setup.outputs.changed_projects }} repository: ROCm/TheRock # Concrete SHA resolved once by setup; do not re-resolve main here. - ref: c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + ref: users/geomin12/external-ci-file-goodbye permissions: contents: read id-token: write windows_build_and_test: name: Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} - needs: [configure, setup] + needs: [setup] if: >- ${{ needs.setup.outputs.windows_build_config != '' && needs.setup.outputs.enable_build_jobs == 'true' }} - uses: ROCm/TheRock/.github/workflows/multi_arch_ci_windows.yml@c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + uses: ROCm/TheRock/.github/workflows/multi_arch_ci_windows.yml@users/geomin12/external-ci-file-goodbye secrets: inherit with: build_config: ${{ needs.setup.outputs.windows_build_config }} test_labels: ${{ needs.setup.outputs.windows_test_labels }} rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} - test_type: ${{ needs.configure.outputs.test_type }} + test_type: ${{ needs.setup.outputs.test_type }} external_repo_config: ${{ needs.setup.outputs.external_repo_config }} - # Empty string when run_all_tests=true triggers full test run in downstream workflow - changed_projects: ${{ needs.configure.outputs.run_all_tests == 'true' && '' || needs.configure.outputs.test_projects }} + # Scopes the test run to the projects this PR touched; empty means run + # everything. It does not narrow the build: TheRock builds every + # in-scope stage in full, so a rocPRIM change still rebuilds math-libs. + changed_projects: ${{ needs.setup.outputs.changed_projects }} repository: ROCm/TheRock # Concrete SHA resolved once by setup; do not re-resolve main here. - ref: c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + ref: users/geomin12/external-ci-file-goodbye permissions: contents: read id-token: write @@ -271,14 +247,14 @@ jobs: # A caller cannot depend on an individual job inside a reusable workflow, # so start after the Linux workflow has finished publishing its artifacts. # This sidecar remains advisory and is not part of the required summary. - needs: [ci-env, configure, linux_build_and_test] + needs: [ci-env, setup, linux_build_and_test] if: >- ${{ !cancelled() && github.event_name == 'pull_request' && ( - contains(format(',{0},', needs.configure.outputs.changed_projects), ',projects/hipblaslt,') || - contains(format(',{0},', needs.configure.outputs.changed_projects), ',projects/hipblaslt/tensilelite,') || + contains(format(',{0},', needs.setup.outputs.changed_projects), ',projects/hipblaslt,') || + contains(format(',{0},', needs.setup.outputs.changed_projects), ',projects/hipblaslt/tensilelite,') || contains(github.event.pull_request.labels.*.name, 'test:hipblaslt') ) && needs.linux_build_and_test.result != 'skipped' @@ -308,7 +284,7 @@ jobs: with: repository: "ROCm/TheRock" # Concrete SHA resolved once by setup; do not re-resolve main here. - ref: c01e3a3f3f67966dd35612cf363b49964f33cd47 # 2026-10-12 + ref: users/geomin12/external-ci-file-goodbye sparse-checkout: build_tools/github_actions sparse-checkout-cone-mode: true From de5056c3becccb9c65da83b51b6e9311f07ed3a5 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Oct 2026 11:34:06 -0700 Subject: [PATCH 2/3] fix(ci): drop deleted configure job from summary job's needs Removing the `configure` job left a dangling dependency in multi_arch_ci_summary's needs list, which fails workflow validation before any job starts: job "multi_arch_ci_summary" needs job "configure" which does not exist Co-Authored-By: Claude Opus 4.6 --- .github/workflows/therock-multi-arch-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/therock-multi-arch-ci.yml b/.github/workflows/therock-multi-arch-ci.yml index 6b1d525a602b..ebbc7944bfe8 100644 --- a/.github/workflows/therock-multi-arch-ci.yml +++ b/.github/workflows/therock-multi-arch-ci.yml @@ -273,7 +273,6 @@ jobs: if: always() needs: - ci-env - - configure - setup - linux_build_and_test - windows_build_and_test From 67a16e4ea5c26e894268ac31671444f36c34f06e Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Oct 2026 12:50:06 -0700 Subject: [PATCH 3/3] test(ci): pin baseline-run-id so 13645 exercises stage reuse The bot cleared baseline-run-id in #13623 alongside the TheRock ref bump to 2a55cec, and this branch inherited the empty value when develop was merged. An empty baseline makes therock-multi-arch-ci.yml pass prebuilt_stages="" and stage_reuse_mode=off, so every stage rebuilds and the run looks like changed_projects failed to narrow anything. It did not: setup resolved all 34 rocm-libraries projects and put rccl/rocshmem/core-hiptests in reusable_artifacts, exactly as #8514 expects. Restore 38220501023, the baseline develop carried before the bump and the one the stacked rocPRIM PR still uses, so the two test PRs differ only in their diffs. Co-Authored-By: Claude Opus 4.6 --- .github/actions/ci-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/ci-env/action.yml b/.github/actions/ci-env/action.yml index bb0996d6fc59..004cbbe853fa 100644 --- a/.github/actions/ci-env/action.yml +++ b/.github/actions/ci-env/action.yml @@ -13,7 +13,12 @@ outputs: value: "a022846cf553c2b135410a5168f97705f1b9c6ac" # 2026-08-22 baseline-run-id: description: "TheRock workflow run ID for prebuilt stage artifacts" - value: "" # Updated by assistant-librarian[bot] on submodule bumps + # DO NOT MERGE: develop's value was cleared by the bot in #13623 when the + # TheRock ref moved to 2a55cec, which turns stage reuse off and rebuilds + # every stage. Restoring the pre-bump baseline so this test PR exercises + # changed_projects narrowing instead of a full stage build. Revert before + # any real merge; the bot owns this value. + value: "38220501023" # Updated by assistant-librarian[bot] on submodule bumps docker-image: description: "Docker container image for Linux builds" value: "ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:cf4f6d9909056906e4a1c0bc4c245658a0af4c6a6174082a86adfa2d518b7aeb"