[CI/Build][ROCm] Stabilize R2-01 platform selection (#8561)
Signed-off-by: haic0 <149741444+haic0@users.noreply.github.com> Signed-off-by: andyluo7 <andy.luo@amd.com> Co-authored-by: andyluo7 <andy.luo@amd.com>
This commit is contained in:
1 parent
e54e185593
commit
c8e69c08fb
5 files changed
+54
-16
No files matched your search
@@ -6,15 +6,17 @@ from shlex import split
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
from _pytest.mark.expression import Expression
|
||||
|
||||
pytestmark = [pytest.mark.core_model, pytest.mark.cpu]
|
||||
|
||||
AMD_READY_PIPELINE = Path(".buildkite/amd/test-amd-ready.yml")
|
||||
R2_01_LABEL = "ROCm · Engine & Model Executor GPU Coverage (R2-01)"
|
||||
R2_01_LABEL = "ROCm · Model Executor GPU Coverage (R2-01)"
|
||||
ENGINE_LABEL = "Engine Test"
|
||||
SINGLE_GPU_MARKERS = (
|
||||
"core_model and cuda and not (cards_2 or cards_3 or cards_4 or cards_5 or cards_6 or cards_7 or cards_8)"
|
||||
"core_model and cuda and not nvidia_only and not "
|
||||
"(cards_2 or cards_3 or cards_4 or cards_5 or cards_6 or cards_7 or cards_8)"
|
||||
)
|
||||
EXCLUDED_TEST = "test_code2wav_streaming_batch_matches_ragged_flow_numerics"
|
||||
|
||||
|
||||
def _find_step(label: str) -> dict:
|
||||
@@ -35,14 +37,28 @@ def _find_step(label: str) -> dict:
|
||||
|
||||
def _assert_single_gpu_selection(command: str) -> None:
|
||||
argv = split(command)
|
||||
assert "tests/engine/" in argv
|
||||
assert "tests/engine/" not in argv
|
||||
assert "tests/model_executor/" in argv
|
||||
assert "tests/worker/test_batched_omni_output.py" not in argv
|
||||
assert argv[argv.index("-m") + 1] == SINGLE_GPU_MARKERS
|
||||
assert argv[argv.index("-k") + 1] == f"not {EXCLUDED_TEST}"
|
||||
assert "-k" not in argv
|
||||
assert argv[argv.index("--run-level") + 1] == "core_model"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("marks", "selected"),
|
||||
[
|
||||
({"core_model", "cuda", "nvidia_only", "L4", "cards_1"}, False),
|
||||
({"core_model", "cuda"}, True),
|
||||
({"core_model", "cuda", "L4", "MI325", "cards_1"}, True),
|
||||
({"core_model", "cuda", "cards_2"}, False),
|
||||
],
|
||||
)
|
||||
def test_r2_01_marker_selection_contract(marks: set[str], selected: bool) -> None:
|
||||
expression = Expression.compile(SINGLE_GPU_MARKERS)
|
||||
assert expression.evaluate(marks.__contains__) is selected
|
||||
|
||||
|
||||
def test_r2_01_is_nonblocking_single_gpu_coverage() -> None:
|
||||
step = _find_step(R2_01_LABEL)
|
||||
|
||||
@@ -53,6 +69,11 @@ def test_r2_01_is_nonblocking_single_gpu_coverage() -> None:
|
||||
assert step["artifact_paths"] == ["artifacts/rocm-r2-01/**/*"]
|
||||
|
||||
|
||||
def test_dedicated_engine_job_preserves_r2_01_engine_coverage() -> None:
|
||||
commands = "\n".join(_find_step(ENGINE_LABEL)["commands"])
|
||||
assert "tests/engine/test_async_omni_engine_abort.py" in commands
|
||||
|
||||
|
||||
def test_r2_01_runs_once_fails_closed_and_publishes_results() -> None:
|
||||
commands = _find_step(R2_01_LABEL)["commands"]
|
||||
pytest_commands = [command for command in commands if command.lstrip().startswith("pytest ")]
|
||||
|
||||
Reference in new issue
Block a user