diff --git a/.github/workflows/build_linux_jax_wheels.yml b/.github/workflows/build_linux_jax_wheels.yml index f47bd8adcc..99fda0b709 100644 --- a/.github/workflows/build_linux_jax_wheels.yml +++ b/.github/workflows/build_linux_jax_wheels.yml @@ -217,9 +217,6 @@ jobs: env: TARGET: ${{ inputs.amdgpu_family }} PLATFORM: "linux" - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/configure_target_run.py test_jax_wheels: diff --git a/.github/workflows/build_portable_linux_pytorch_wheels.yml b/.github/workflows/build_portable_linux_pytorch_wheels.yml index 5eb742c1e8..6a7fd720c5 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels.yml @@ -262,9 +262,6 @@ jobs: env: TARGET: ${{ inputs.amdgpu_family }} PLATFORM: "linux" - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/configure_target_run.py test_pytorch_wheels: diff --git a/.github/workflows/build_windows_pytorch_wheels.yml b/.github/workflows/build_windows_pytorch_wheels.yml index f7078f4420..157f092c93 100644 --- a/.github/workflows/build_windows_pytorch_wheels.yml +++ b/.github/workflows/build_windows_pytorch_wheels.yml @@ -297,9 +297,6 @@ jobs: env: TARGET: ${{ inputs.amdgpu_family }} PLATFORM: "windows" - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/configure_target_run.py test_pytorch_wheels: diff --git a/.github/workflows/release_portable_linux_packages.yml b/.github/workflows/release_portable_linux_packages.yml index 7e2265a228..e29cdb2092 100644 --- a/.github/workflows/release_portable_linux_packages.yml +++ b/.github/workflows/release_portable_linux_packages.yml @@ -150,9 +150,6 @@ jobs: env: AMDGPU_FAMILIES: ${{ inputs.families }} THEROCK_PACKAGE_PLATFORM: "linux" - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/fetch_package_targets.py portable_linux_packages: diff --git a/.github/workflows/release_windows_packages.yml b/.github/workflows/release_windows_packages.yml index 2ad73ce3f6..3f5987e6cd 100644 --- a/.github/workflows/release_windows_packages.yml +++ b/.github/workflows/release_windows_packages.yml @@ -132,9 +132,6 @@ jobs: env: AMDGPU_FAMILIES: ${{ inputs.families }} THEROCK_PACKAGE_PLATFORM: "windows" - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/fetch_package_targets.py windows_packages: diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index b1531f68e3..0d33bd4622 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -78,9 +78,6 @@ jobs: ADDITIONAL_LABEL_OPTIONS: ${{ github.event.inputs.additional_label_options }} BUILD_VARIANT: ${{ inputs.build_variant }} MULTI_ARCH: ${{ inputs.multi_arch }} - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: ./build_tools/github_actions/configure_ci.py - name: Compute package version diff --git a/.github/workflows/therock_test_harness.yml b/.github/workflows/therock_test_harness.yml index 548ef285cf..454a568ca0 100644 --- a/.github/workflows/therock_test_harness.yml +++ b/.github/workflows/therock_test_harness.yml @@ -49,9 +49,6 @@ jobs: AMDGPU_FAMILIES: ${{ inputs.families }} THEROCK_PACKAGE_PLATFORM: "linux" TEST_HARNESS_TARGET_FETCH: true - # Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS' - ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }} - LOAD_TEST_RUNNERS_FROM_VAR: false run: python ./build_tools/github_actions/fetch_package_targets.py diff --git a/build_tools/github_actions/amdgpu_family_matrix.py b/build_tools/github_actions/amdgpu_family_matrix.py index b8e70fe1d2..1761d17a5a 100644 --- a/build_tools/github_actions/amdgpu_family_matrix.py +++ b/build_tools/github_actions/amdgpu_family_matrix.py @@ -13,11 +13,6 @@ TODO(#2200): clarify AMD GPU family selection """ -from github_actions_utils import str2bool - -import json -import os - ############################################################################################# # NOTE: when doing changes here, also check that they are done in new_amdgpu_family_matrix.py ############################################################################################# @@ -226,53 +221,11 @@ } -def load_test_runner_from_gh_variables(): - """ - As test runner names are frequently updated, we are pulling the runner label data from the ROCm organization variable called "ROCM_THEROCK_TEST_RUNNERS" - - For more info, go to 'docs/development/test_runner_info.md' - """ - test_runner_json_str = os.getenv("ROCM_THEROCK_TEST_RUNNERS", "{}") - test_runner_dict = json.loads(test_runner_json_str) - for key in test_runner_dict.keys(): - for platform in test_runner_dict[key].keys(): - # Checking in presubmit dictionary - if ( - key in amdgpu_family_info_matrix_presubmit - and platform in amdgpu_family_info_matrix_presubmit[key] - ): - amdgpu_family_info_matrix_presubmit[key][platform]["test-runs-on"] = ( - test_runner_dict[key][platform] - ) - # Checking in postsubmit dictionary - if ( - key in amdgpu_family_info_matrix_postsubmit - and platform in amdgpu_family_info_matrix_postsubmit[key] - ): - amdgpu_family_info_matrix_postsubmit[key][platform]["test-runs-on"] = ( - test_runner_dict[key][platform] - ) - # Checking in nightly dictionary - if ( - key in amdgpu_family_info_matrix_nightly - and platform in amdgpu_family_info_matrix_nightly[key] - ): - amdgpu_family_info_matrix_nightly[key][platform]["test-runs-on"] = ( - test_runner_dict[key][platform] - ) - - def get_all_families_for_trigger_types(trigger_types): """ Returns a combined family matrix for the specified trigger types. trigger_types: list of strings, e.g. ['presubmit', 'postsubmit', 'nightly'] """ - # Load in test runners from ROCm organization variable "ROCM_THEROCK_TEST_RUNNERS" - load_test_runners_from_var = str2bool( - os.getenv("LOAD_TEST_RUNNERS_FROM_VAR", "true") - ) - if load_test_runners_from_var: - load_test_runner_from_gh_variables() result = {} matrix_map = { "presubmit": amdgpu_family_info_matrix_presubmit, diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 895e414f7b..a7aebed274 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -18,8 +18,6 @@ * WINDOWS_USE_PREBUILT_ARTIFACTS (optional): If enabled, CI will only run Windows tests * BRANCH_NAME (optional): The branch name * BUILD_VARIANT (optional): The build variant to run (ex: release, asan, tsan) - * ROCM_THEROCK_TEST_RUNNERS (optional): Test runner JSON object, coming from ROCm organization - * LOAD_TEST_RUNNERS_FROM_VAR (optional): boolean env variable that loads in ROCm org data if enabled Environment variables (for pull requests): * PR_LABELS (optional) : JSON list of PR label names. diff --git a/build_tools/github_actions/configure_target_run.py b/build_tools/github_actions/configure_target_run.py index b9f6c33749..61a76b78d0 100644 --- a/build_tools/github_actions/configure_target_run.py +++ b/build_tools/github_actions/configure_target_run.py @@ -4,8 +4,6 @@ * 'TARGET': A GPU family like 'gfx95X-dcgpu' or 'gfx1151', corresponding to a release index. * 'PLATFORM': "linux" or "windows" - * ROCM_THEROCK_TEST_RUNNERS (optional): Test runner JSON object, coming from ROCm organization - * LOAD_TEST_RUNNERS_FROM_VAR (optional): boolean env variable that loads in ROCm org data if enabled """ import os diff --git a/build_tools/github_actions/fetch_package_targets.py b/build_tools/github_actions/fetch_package_targets.py index 21c576889e..2477c4fd6a 100644 --- a/build_tools/github_actions/fetch_package_targets.py +++ b/build_tools/github_actions/fetch_package_targets.py @@ -4,8 +4,6 @@ * 'AMDGPU_FAMILIES': A comma separated list of AMD GPU families, e.g. `gfx94X,gfx103x`, or empty for the default list * 'THEROCK_PACKAGE_PLATFORM': "linux" or "windows" - * ROCM_THEROCK_TEST_RUNNERS (optional): Test runner JSON object, coming from ROCm organization - * LOAD_TEST_RUNNERS_FROM_VAR (optional): boolean env variable that loads in ROCm org data if enabled Outputs written to GITHUB_OUTPUT: * 'package_targets': JSON list of the form diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index a1c01369a7..94f1d125c0 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -9,15 +9,6 @@ import configure_ci from benchmarks.benchmark_test_matrix import benchmark_matrix -therock_test_runner_dict = { - "gfx110x": { - "linux": "linux-gfx110X-gpu-rocm-test", - "windows": "windows-gfx110X-gpu-rocm-test", - }, -} - -os.environ["ROCM_THEROCK_TEST_RUNNERS"] = json.dumps(therock_test_runner_dict) - class ConfigureCITest(unittest.TestCase): def assert_target_output_is_valid(self, target_output, allow_xfail): @@ -765,12 +756,6 @@ def test_multi_arch_production_sanity_check_configuration(self): f"Experimental family {experimental_arch_name} should have sanity_check=True", ) - def test_rocm_org_var_names(self): - os.environ["LOAD_TEST_RUNNERS_FROM_VAR"] = "false" - test_matrix = configure_ci.get_all_families_for_trigger_types(["presubmit"]) - self.assertIn("linux-gfx110X-gpu-rocm-test", json.dumps(test_matrix)) - self.assertIn("windows-gfx110X-gpu-rocm-test", json.dumps(test_matrix)) - # TODO(#3433): Remove sandbox logic once ASAN tests are passing and environment is no longer required def test_sandbox_test_runner_with_asan(self): base_args = {"build_variant": "asan"} diff --git a/docs/development/test_runner_info.md b/docs/development/test_runner_info.md deleted file mode 100644 index 7d2c95c35f..0000000000 --- a/docs/development/test_runner_info.md +++ /dev/null @@ -1,37 +0,0 @@ -# Test Runner Setup - -In the repo `TheRock`, `amdgpu_family_matrix.py` is the source of truth. We are allowed to do testing with new labels. - -For other external repos that use TheRock CI, they get their GitHub self-hosted runner labels through the ROCm organization variable called `ROCM_THEROCK_TEST_RUNNERS` - -We use the environment variable `LOAD_TEST_RUNNERS_FROM_VAR` with `amdgpu_family_matrix.py` to determine whether to pull from the `amdgpu_family_matrix.py` or `ROCm` organization variable - -With this organization variable, we are able to update the runner labels immediately instead of having to open 2+ PRs. - -TheRock CI gets this the runner labels via: - -1. Retrieving the environment variable from ROCm organization (can be used in any repository in ROCm) -1. Parse the JSON string into Python dictionary -1. Adds the "test-runs-on" key / value in the associated amdgpu_family_info_matrix - -The data for `ROCM_THEROCK_TEST_RUNNERS` is organized like so: - -``` -{ - "gfx110x": { - "linux": "linux-gfx110X-gpu-rocm", - "windows": "windows-gfx110X-gpu-rocm", - }, - "gfx1151": { - "linux": "linux-strix-halo-gpu-rocm", - "windows": "windows-strix-halo-gpu-rocm", - }, - "gfx90x": { - "linux": "", - "windows": "", - }, - ... -} -``` - -For ROCm organization admin, please update the [runner labels in the ROCm organization settings](https://github.com/organizations/ROCm/settings/variables/actions/ROCM_THEROCK_TEST_RUNNERS)