Skip to content

Commit 6373b5e

Browse files
Update JAX Test runner to multi-GPU runner
1 parent a9c78bc commit 6373b5e

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

build_tools/github_actions/configure_target_run.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Copyright Advanced Micro Devices, Inc.
22
# SPDX-License-Identifier: MIT
33

4-
"""This file looks up the test-runs-on runner label for a given GPU family.
4+
"""This file looks up the runner label to run JAX tests on for a GPU family.
5+
6+
JAX tests need multiple GPUs (e.g. multi_device_test), so the family's
7+
multi-GPU runner ("test-runs-on-multi-gpu") is preferred, falling back to the
8+
single-GPU runner ("test-runs-on") for families without a dedicated multi-GPU
9+
machine.
510
611
Environment variable inputs:
712
* 'TARGET': A GPU family like 'gfx95X-dcgpu' or 'gfx1151', corresponding
@@ -41,8 +46,12 @@ def get_runner_label(target: str, platform: str) -> str:
4146
)
4247
continue
4348

44-
# If there is a test machine available for this target, run on it.
45-
test_runs_on_machine = platform_for_key.get("test-runs-on")
49+
# JAX tests need multiple GPUs, so prefer the family's multi-GPU runner
50+
# and fall back to the single-GPU runner when there is no dedicated
51+
# multi-GPU machine for this family.
52+
test_runs_on_machine = platform_for_key.get(
53+
"test-runs-on-multi-gpu"
54+
) or platform_for_key.get("test-runs-on")
4655
if test_runs_on_machine:
4756
print(f" Found runner: '{test_runs_on_machine}'")
4857
return test_runs_on_machine

build_tools/github_actions/tests/configure_target_run_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ def test_linux_gfx94X(self):
1515
# gfx94x is the outer key used to construct workflow pipelines, while
1616
# gfx94X-dcgpu is the inner key, which we use for package names. When
1717
# run from a workflow, we expect to only work on the inner keys.
18+
# JAX tests use the multi-GPU runner for the family.
1819
runner_label = configure_target_run.get_runner_label("gfx94x", "linux")
19-
self.assertEqual(runner_label, "linux-gfx942-1gpu-ccs-csp-ossci-rocm")
20+
self.assertEqual(runner_label, "linux-gfx942-8gpu-ossci-rocm")
2021

2122
def test_linux_gfx94X_dcgpu(self):
2223
# gfx94x is the outer key used to construct workflow pipelines, while
2324
# gfx94X-dcgpu is the inner key, which we use for package names. When
2425
# run from a workflow, we expect to only work on the inner keys.
26+
# JAX tests use the multi-GPU runner for the family.
2527
runner_label = configure_target_run.get_runner_label("gfx94X-dcgpu", "linux")
26-
self.assertEqual(runner_label, "linux-gfx942-1gpu-ccs-csp-ossci-rocm")
28+
self.assertEqual(runner_label, "linux-gfx942-8gpu-ossci-rocm")
2729

2830
def test_windows_gfx115x(self):
2931
runner_label = configure_target_run.get_runner_label("gfx1151", "windows")

0 commit comments

Comments
 (0)