From 2e1365c5b48bd803706009369d8362bba0f073d9 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Tue, 13 Jan 2026 15:50:44 -0800 Subject: [PATCH 1/7] Adding kernel oem runner --- .../github_actions/amdgpu_family_matrix.py | 3 +++ build_tools/github_actions/configure_ci.py | 17 +++++++++++++++++ docs/development/ci_behavior_manipulation.md | 1 + 3 files changed, 21 insertions(+) diff --git a/build_tools/github_actions/amdgpu_family_matrix.py b/build_tools/github_actions/amdgpu_family_matrix.py index d0bdc924d10..6fbab98d9dd 100644 --- a/build_tools/github_actions/amdgpu_family_matrix.py +++ b/build_tools/github_actions/amdgpu_family_matrix.py @@ -77,6 +77,9 @@ "gfx1151": { "linux": { "test-runs-on": "linux-gfx1151-gpu-rocm", + "test-runs-on-kernel": { + "oem": "linux-strix-halo-gpu-rocm-oem", + }, "family": "gfx1151", "bypass_tests_for_releases": True, "build_variants": ["release"], diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 281ccf0d2d6..663e8b195f1 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -608,6 +608,23 @@ def matrix_generator( artifact_group += f"-{build_variant_suffix}" matrix_row["artifact_group"] = artifact_group + # If a specific test kernel type was specified, we use that kernel-enabled test runners + # We disable the other machines that do not have the specified kernel type + pr_labels = get_pr_labels(base_args) + for label in pr_labels: + if "kernel" in label: + _, kernel_type = label.split(":") + if ( + "test-runs-on-kernel" in platform_info + and kernel_type in platform_info["test-runs-on-kernel"] + ): + matrix_row["test-runs-on"] = platform_info[ + "test-runs-on-kernel" + ][kernel_type] + else: + matrix_row["test-runs-on"] = "" + break + matrix_output.append(matrix_row) print(f"Generated build matrix: {str(matrix_output)}") diff --git a/docs/development/ci_behavior_manipulation.md b/docs/development/ci_behavior_manipulation.md index 4049fd81726..cff05e1fe97 100644 --- a/docs/development/ci_behavior_manipulation.md +++ b/docs/development/ci_behavior_manipulation.md @@ -16,6 +16,7 @@ However, if additional options are wanted, you can add a label to manipulate the - `run-all-archs-ci`: The CI will build all possible architectures - `gfx...`: A build and test (if a test machine is available) is added to the CI matrix for the specified gfx family. (ex: `gfx120X`, `gfx950`) - `test:...`: The full test will run only for the specified label and other labeled projects (ex: `test:rocthrust`, `test:hipblaslt`) +- `kernel:...`: The CI will run tests on only kernel-specific enabled test machines (ex: `kernel:oem`) ## Workflow dispatch behavior From bddd3b27c9b40c8996877124a766f9ce95554c77 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Tue, 13 Jan 2026 17:30:40 -0800 Subject: [PATCH 2/7] Adding comments and fixing unit test --- build_tools/github_actions/configure_ci.py | 7 ++++++- .../github_actions/tests/configure_ci_test.py | 20 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 663e8b195f1..3e4f18773bb 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -224,7 +224,7 @@ def should_ci_run_given_modified_paths(paths: Optional[Iterable[str]]) -> bool: def get_pr_labels(args) -> List[str]: """Gets a list of labels applied to a pull request.""" - data = json.loads(args.get("pr_labels")) + data = json.loads(args.get("pr_labels", "{}")) labels = [] for label in data.get("labels", []): labels.append(label["name"]) @@ -612,8 +612,10 @@ def matrix_generator( # We disable the other machines that do not have the specified kernel type pr_labels = get_pr_labels(base_args) for label in pr_labels: + # If a kernel test label was added, we set the test-runs-on accordingly to kernel-specific test machines if "kernel" in label: _, kernel_type = label.split(":") + # If the architecture has a valid kernel machine, we set it here if ( "test-runs-on-kernel" in platform_info and kernel_type in platform_info["test-runs-on-kernel"] @@ -621,8 +623,11 @@ def matrix_generator( matrix_row["test-runs-on"] = platform_info[ "test-runs-on-kernel" ][kernel_type] + # Otherwise, we disable the test runner for this architecture else: matrix_row["test-runs-on"] = "" + if "test-runs-on-multi-gpu" in platform_info: + matrix_row["test-runs-on-multi-gpu"] = "" break matrix_output.append(matrix_row) diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index ad12290c073..e17ce637c9c 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -293,6 +293,26 @@ def test_invalid_test_label_linux_pull_request_matrix_generator(self): ) self.assertEqual(linux_test_labels, []) + def test_kernel_test_label_linux_pull_request_matrix_generator(self): + base_args = { + "pr_labels": '{"labels":[{"name":"kernel:oem"}]}', + "build_variant": "release", + } + linux_target_output, linux_test_labels = configure_ci.matrix_generator( + is_pull_request=True, + is_workflow_dispatch=False, + is_push=False, + is_schedule=False, + base_args=base_args, + families={}, + platform="linux", + ) + self.assertGreaterEqual(len(linux_target_output), 1) + self.assert_target_output_is_valid( + target_output=linux_target_output, allow_xfail=False + ) + self.assertEqual(linux_test_labels, []) + def test_main_linux_branch_push_matrix_generator(self): base_args = {"branch_name": "main", "build_variant": "release"} linux_target_output, linux_test_labels = configure_ci.matrix_generator( From 768ccac6060e9b1c23946c330a6d2018d5e14978 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Jan 2026 09:17:52 -0800 Subject: [PATCH 3/7] Adding workflow dispatch custom label option --- .github/workflows/ci.yml | 4 +++ .github/workflows/setup.yml | 1 + build_tools/github_actions/configure_ci.py | 30 +++++++++++++++++++--- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9421c5b097c..15e72d54d2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,10 @@ on: windows_use_prebuilt_artifacts: type: boolean description: "If enabled, the CI will pull Windows artifacts using artifact_run_id and only run tests" + additional_label_options: + type: string + description: "If enabled, these additional labels options will be applied. ex: kernel:oem" + default: "" artifact_run_id: type: string description: "If provided, the tests will run on this artifact ID" diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 2a4f46c6bc8..7fb0398c948 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -75,6 +75,7 @@ jobs: INPUT_WINDOWS_AMDGPU_FAMILIES: ${{ github.event.inputs.windows_amdgpu_families }} WINDOWS_TEST_LABELS: ${{ github.event.inputs.windows_test_labels }} WINDOWS_USE_PREBUILT_ARTIFACTS: ${{ github.event.inputs.windows_use_prebuilt_artifacts }} + 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' diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 3e4f18773bb..842b7fe9cf7 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -231,6 +231,20 @@ def get_pr_labels(args) -> List[str]: return labels +def get_workflow_dispatch_additional_label_options(args) -> List[str]: + """Gets a list of additional label options from workflow_dispatch.""" + additional_label_options = args.get( + "workflow_dispatch_additional_label_options", "" + ) + if additional_label_options: + return [ + label.strip() + for label in additional_label_options.split(",") + if label.strip() + ] + return [] + + def filter_known_names( requested_names: List[str], name_type: str, target_matrix=None ) -> List[str]: @@ -608,10 +622,15 @@ def matrix_generator( artifact_group += f"-{build_variant_suffix}" matrix_row["artifact_group"] = artifact_group - # If a specific test kernel type was specified, we use that kernel-enabled test runners - # We disable the other machines that do not have the specified kernel type - pr_labels = get_pr_labels(base_args) - for label in pr_labels: + # We retrieve labels from both PR and workflow_dispatch to customize the build and test jobs + label_options = [] + label_options.extend(get_pr_labels(base_args)) + label_options.extend( + get_workflow_dispatch_additional_label_options(base_args) + ) + for label in label_options: + # If a specific test kernel type was specified, we use that kernel-enabled test runners + # We disable the other machines that do not have the specified kernel type # If a kernel test label was added, we set the test-runs-on accordingly to kernel-specific test machines if "kernel" in label: _, kernel_type = label.split(":") @@ -788,6 +807,9 @@ def format_variants(variants): base_args["workflow_dispatch_windows_test_labels"] = os.getenv( "WINDOWS_TEST_LABELS", "" ) + base_args["workflow_dispatch_additional_label_options"] = os.getenv( + "ADDITIONAL_LABEL_OPTIONS", "" + ) base_args["build_variant"] = os.getenv("BUILD_VARIANT", "release") base_args["multi_arch"] = os.environ.get("MULTI_ARCH", "false") == "true" From 3fa6b62721fba524605d0178e796fec23607aea7 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Jan 2026 09:27:40 -0800 Subject: [PATCH 4/7] adding gha append step --- build_tools/github_actions/configure_ci.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 842b7fe9cf7..f6e822e8d55 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -756,6 +756,7 @@ def format_variants(variants): * `windows_variants`: {str(format_variants(windows_variants_output))} * `windows_test_labels`: {str([test for test in windows_test_output])} * `windows_use_prebuilt_artifacts`: {json.dumps(base_args.get("windows_use_prebuilt_artifacts"))} +* `additional_label_options`: {json.dumps(base_args.get("workflow_dispatch_additional_label_options"))} * `enable_build_jobs`: {json.dumps(enable_build_jobs)} * `test_type`: {test_type} """ From bf453fb8dd7b5e20e9f01b000dfb1a7137b95c23 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 14 Jan 2026 09:33:22 -0800 Subject: [PATCH 5/7] removing label option --- build_tools/github_actions/configure_ci.py | 1 - 1 file changed, 1 deletion(-) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index f6e822e8d55..842b7fe9cf7 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -756,7 +756,6 @@ def format_variants(variants): * `windows_variants`: {str(format_variants(windows_variants_output))} * `windows_test_labels`: {str([test for test in windows_test_output])} * `windows_use_prebuilt_artifacts`: {json.dumps(base_args.get("windows_use_prebuilt_artifacts"))} -* `additional_label_options`: {json.dumps(base_args.get("workflow_dispatch_additional_label_options"))} * `enable_build_jobs`: {json.dumps(enable_build_jobs)} * `test_type`: {test_type} """ From 2eaee5830a1052863445501b725a09aa69321dd9 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 28 Jan 2026 03:42:13 -0800 Subject: [PATCH 6/7] PR comments --- .github/workflows/ci.yml | 2 +- build_tools/github_actions/configure_ci.py | 2 +- build_tools/github_actions/tests/configure_ci_test.py | 4 +++- docs/development/ci_behavior_manipulation.md | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15e72d54d2f..f6238ab0fdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ on: description: "If enabled, the CI will pull Windows artifacts using artifact_run_id and only run tests" additional_label_options: type: string - description: "If enabled, these additional labels options will be applied. ex: kernel:oem" + description: "If enabled, these additional labels options will be applied. ex: test_runner:oem" default: "" artifact_run_id: type: string diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 842b7fe9cf7..9ba531473e0 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -632,7 +632,7 @@ def matrix_generator( # If a specific test kernel type was specified, we use that kernel-enabled test runners # We disable the other machines that do not have the specified kernel type # If a kernel test label was added, we set the test-runs-on accordingly to kernel-specific test machines - if "kernel" in label: + if "test_runner" in label: _, kernel_type = label.split(":") # If the architecture has a valid kernel machine, we set it here if ( diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index e17ce637c9c..689e793ad28 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -295,7 +295,7 @@ def test_invalid_test_label_linux_pull_request_matrix_generator(self): def test_kernel_test_label_linux_pull_request_matrix_generator(self): base_args = { - "pr_labels": '{"labels":[{"name":"kernel:oem"}]}', + "pr_labels": '{"labels":[{"name":"test_runner:oem"}]}', "build_variant": "release", } linux_target_output, linux_test_labels = configure_ci.matrix_generator( @@ -308,6 +308,8 @@ def test_kernel_test_label_linux_pull_request_matrix_generator(self): platform="linux", ) self.assertGreaterEqual(len(linux_target_output), 1) + # check that at least one runner name has "oem" in test runner name if "oem" test runner was requested + self.assertTrue("oem" in item["test-runs-on"] for item in linux_target_output) self.assert_target_output_is_valid( target_output=linux_target_output, allow_xfail=False ) diff --git a/docs/development/ci_behavior_manipulation.md b/docs/development/ci_behavior_manipulation.md index cff05e1fe97..e3454dd2198 100644 --- a/docs/development/ci_behavior_manipulation.md +++ b/docs/development/ci_behavior_manipulation.md @@ -16,7 +16,7 @@ However, if additional options are wanted, you can add a label to manipulate the - `run-all-archs-ci`: The CI will build all possible architectures - `gfx...`: A build and test (if a test machine is available) is added to the CI matrix for the specified gfx family. (ex: `gfx120X`, `gfx950`) - `test:...`: The full test will run only for the specified label and other labeled projects (ex: `test:rocthrust`, `test:hipblaslt`) -- `kernel:...`: The CI will run tests on only kernel-specific enabled test machines (ex: `kernel:oem`) +- `test_runner:...`: The CI will run tests on only custom test machines (ex: `test_runner:oem`) ## Workflow dispatch behavior From d5463b2c57a643fa966a7d03be3d6a30cc3d9bd1 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Thu, 29 Jan 2026 11:54:44 -0800 Subject: [PATCH 7/7] adding kernel version check --- build_tools/print_driver_gpu_info.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_tools/print_driver_gpu_info.py b/build_tools/print_driver_gpu_info.py index 29c72390db8..9babdc3d36d 100644 --- a/build_tools/print_driver_gpu_info.py +++ b/build_tools/print_driver_gpu_info.py @@ -120,6 +120,12 @@ def run_sanity(os_name: str) -> None: args=[], extra_command_search_paths=[bin_dir], ) + run_command_with_search( + label="Kernel version", + command="uname -r", + args=[], + extra_command_search_paths=[bin_dir], + ) log("\n=== End of sanity check ===")