Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Magpie/benchmark_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Format: framework -> gpu_arch -> docker_image
#
# GPU Architecture Identifiers:
# AMD: gfx942 (MI300X), gfx950 (MI355X), gfx1151 (Strix Halo / Radeon 8060S)
# AMD: gfx942 (MI300X), gfx950 (MI355X)
# NVIDIA: sm_80 (A100), sm_90 (H100/H200), sm_100 (B200)
#
# Usage:
Expand All @@ -13,7 +13,6 @@ vllm:
# AMD GPUs
gfx942: "vllm/vllm-openai-rocm:v0.23.0"
gfx950: "vllm/vllm-openai-rocm:v0.23.0"
gfx1151: "vllm/vllm-openai-rocm:v0.23.0"
# NVIDIA GPUs
sm_80: "vllm/vllm-openai:v0.23.0"
sm_90: "vllm/vllm-openai:v0.23.0"
Expand Down
1 change: 0 additions & 1 deletion Magpie/modes/benchmark/benchmarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
{
"vllm_mi300x.sh",
"vllm_mi355x.sh",
"vllm_gfx11.sh",
"sglang_mi300x.sh",
"sglang_mi355x.sh",
"atom_mi300x.sh",
Expand Down
13 changes: 2 additions & 11 deletions Magpie/modes/benchmark/image_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,10 @@ def get_runner_type(self, gpu_arch: Optional[str] = None) -> str:

# Map GPU architectures to runner types
arch_to_runner = {
# AMD data-center GPUs
# AMD GPUs
"gfx942": "mi300x", # MI300X
"gfx950": "mi355x", # MI355X
# AMD client/edge (RDNA3/3.5): one shared runner, since the
# recipe is identical across the family.
"gfx1100": "gfx11", # Navi31 (RX 7900 XT/XTX, W7900)
"gfx1101": "gfx11", # Navi32 (RX 7800 XT, W7800)
"gfx1102": "gfx11", # Navi33 (RX 7600)
"gfx1103": "gfx11", # Phoenix APU (Radeon 780M)
"gfx1150": "gfx11", # Strix Point APU (Radeon 890M)
"gfx1151": "gfx11", # Strix Halo APU (Radeon 8040S/8050S/8060S)
"gfx1152": "gfx11", # Krackan Point APU
"gfx1153": "gfx11", # Krackan Point APU
"gfx1100": "mi325x", # MI325X
# NVIDIA GPUs
"sm_80": "a100", # A100
"sm_90": "h100", # H100
Expand Down
8 changes: 1 addition & 7 deletions Magpie/modes/benchmark/tracelens_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ def trace_arch_platform_from_runner(runner_type: Optional[str]) -> Optional[str]
"""Map Magpie runner/GPU architecture naming to TraceLens platform names."""
if runner_type:
runner = runner_type.lower()
if runner.startswith("gfx11"):
# A family runner can't pick a per-SKU spec (gfx1151 covers the
# 8060S/8050S/8040S). None omits --gpu_arch_platform so TraceLens
# identifies the part itself instead of us guessing.
return None
aliases = {
"mi300": "MI300X",
"mi300x": "MI300X",
Expand All @@ -250,8 +245,7 @@ def trace_arch_platform_from_runner(runner_type: Optional[str]) -> Optional[str]
arch_map = {
"gfx942": "MI300X",
"gfx950": "MI355X",
# No gfx11: each target covers several parts with different CU counts,
# so None lets TraceLens identify the part.
"gfx1100": "MI325X",
}
return arch_map.get(arch)

Expand Down
146 changes: 0 additions & 146 deletions Magpie/scripts/benchmark/vllm_gfx11.sh

This file was deleted.

120 changes: 0 additions & 120 deletions tests/test_benchmark_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -2615,123 +2615,3 @@ def test_result_parser_carries_scriptable_quality_gate(tmp_path):
d = parsed.to_dict()
assert d["workload_kind"] == "scriptable"
assert d["quality_gate"]["passed"] is True


# ── gfx11 (RDNA3 / RDNA3.5) client-GPU support ────────────────────────


@pytest.mark.parametrize(
"gpu_arch",
[
"gfx1100",
"gfx1101",
"gfx1102",
"gfx1103",
"gfx1150",
"gfx1151",
"gfx1152",
"gfx1153",
],
)
def test_gfx11_arches_share_one_runner(gpu_arch):
"""The whole gfx11 family selects the shared vllm_gfx11.sh recipe."""
assert ImageSelector().get_runner_type(gpu_arch) == "gfx11"


def test_gfx1100_no_longer_reports_as_mi325x():
"""gfx1100 is Navi31 (RX 7900); MI325X is gfx942 silicon."""
assert ImageSelector().get_runner_type("gfx1100") != "mi325x"


def test_instinct_runner_types_unchanged():
selector = ImageSelector()
assert selector.get_runner_type("gfx942") == "mi300x"
assert selector.get_runner_type("gfx950") == "mi355x"


def test_vllm_gfx11_script_is_a_builtin():
"""server_lifecycle rejects any script outside MAGPIE_BUILTIN_SCRIPTS."""
from Magpie.modes.benchmark.benchmarker import MAGPIE_BUILTIN_SCRIPTS

assert "vllm_gfx11.sh" in MAGPIE_BUILTIN_SCRIPTS


def test_gfx11_runner_defers_tracelens_platform_selection():
"""A family runner cannot identify a per-SKU TraceLens spec, so defer."""
assert trace_arch_platform_from_runner("gfx11") is None
# Instinct runners still resolve as before.
assert trace_arch_platform_from_runner("mi300x") == "MI300X"
assert trace_arch_platform_from_runner("mi355x") == "MI355X"


@pytest.mark.parametrize(
"gpu_arch",
[
"gfx1100",
"gfx1101",
"gfx1102",
"gfx1103",
"gfx1150",
"gfx1151",
"gfx1152",
"gfx1153",
],
)
def test_gfx11_arch_resolves_to_the_shipped_script(tmp_path, gpu_arch):
"""arch -> runner -> filename must land on the script that actually ships.

get_runner_type() and MAGPIE_BUILTIN_SCRIPTS are asserted separately above,
but nothing tied the two ends together: _get_benchmark_script() derives
f"{framework}_{runner}.sh", so naming the file vllm_gfx1151.sh would keep
every other gfx11 test green while breaking every run.
"""
mode = BenchmarkMode(
BenchmarkConfig(framework="vllm", model="demo", inferencex_path=str(tmp_path)),
output_dir=str(tmp_path / "out"),
)
mode._prepare_benchmark_scripts()

runner = ImageSelector().get_runner_type(gpu_arch)
assert mode._get_benchmark_script(runner) == "benchmarks/vllm_gfx11.sh"


def test_gfx11_autodetected_arch_defers_tracelens_platform(monkeypatch):
"""The arch-keyed branch, reached when no runner_type is passed."""

def _arch(value):
monkeypatch.setattr(
"Magpie.modes.benchmark.tracelens_inference.detect_gpu",
lambda: (GPUVendor.AMD, value),
)

for arch in ("gfx1151", "gfx1100"):
_arch(arch)
assert trace_arch_platform_from_runner(None) is None

# Instinct arches still resolve; gfx1100 used to answer MI325X here.
_arch("gfx942")
assert trace_arch_platform_from_runner(None) == "MI300X"
_arch("gfx950")
assert trace_arch_platform_from_runner(None) == "MI355X"


def test_gfx11_has_no_sglang_or_atom_image():
"""No gfx11 build exists for either, so they must error, not fall back."""
selector = ImageSelector()
for framework in ("sglang", "atom"):
with pytest.raises(ValueError, match="No image found for GPU architecture"):
selector.select_image(framework, gpu_arch="gfx1151")


def test_unvalidated_gfx11_arch_has_a_runner_but_no_image():
"""Runners are family-level; image entries stay per-arch and opt-in."""
selector = ImageSelector()
assert selector.get_runner_type("gfx1103") == "gfx11"
with pytest.raises(ValueError, match="No image found for GPU architecture"):
selector.select_image("vllm", gpu_arch="gfx1103")


def test_runner_type_to_gpu_type_rejects_gfx11():
"""TraceLens ships no gfx11 build script; the sglang path must not guess."""
with pytest.raises(ValueError, match="MI300/MI350/MI355"):
runner_type_to_gpu_type("gfx11")
2 changes: 1 addition & 1 deletion tests/test_benchmark_unit_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def test_image_selector_loads_mapping_and_selects_images(tmp_path, monkeypatch):
[
("gfx942", "mi300x"),
("gfx950", "mi355x"),
("gfx1100", "gfx11"),
("gfx1100", "mi325x"),
("sm_80", "a100"),
("sm_90", "h100"),
("sm_90a", "h200"),
Expand Down
1 change: 0 additions & 1 deletion tests/test_eval_concurrency_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"sglang_mi355x.sh",
"vllm_mi300x.sh",
"vllm_mi355x.sh",
"vllm_gfx11.sh",
]
CONCURRENCY_EXPORT = (
'export EVAL_CONCURRENT_REQUESTS="${MAGPIE_EVAL_CONCURRENCY:-'
Expand Down