Skip to content

ATOM vLLM Benchmark

ATOM vLLM Benchmark #4

name: ATOM vLLM Benchmark
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event_name }}-${{ github.ref_name }}
# Keep long-running nightly jobs alive; the next nightly run can queue behind them.
cancel-in-progress: false
on:
schedule:
# Nightly at 21:00 Beijing time (13:00 UTC)
- cron: '0 13 * * 0-4'
workflow_dispatch:
inputs:
benchmark_client:
description: "Benchmark client command. `InferenceMax bench` uses the repo benchmark script. `vLLM bench` uses the vLLM CLI benchmark command."
type: choice
default: InferenceMax bench
options:
- InferenceMax bench
- vLLM bench
model_slot_1:
description: "Manual selection slot 1: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_2:
description: "Manual selection slot 2: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_3:
description: "Manual selection slot 3: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_4:
description: "Manual selection slot 4: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_5:
description: "Manual selection slot 5: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_6:
description: "Manual selection slot 6: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_7:
description: "Manual selection slot 7: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
model_slot_8:
description: "Manual selection slot 8: choose a model + TP size candidate."
type: choice
default: none
options:
- none
- DeepSeek-R1 FP8 TP8 (MET)
- DeepSeek-R1 MXFP4 TP8 (MET)
- gpt-oss-120b TP1 (MET)
- GLM-5.1-FP8 TP8 (OOB)
- Kimi-K2-Thinking-MXFP4 TP4 (MET)
- Kimi-K2-Thinking-MXFP4 TP8 (MET)
- Kimi-K2.5-MXFP4 TP4 (MET)
- Qwen3.5-397B-A17B-FP8 TP4 (OOB)
- Qwen3.5-397B-A17B-FP8 TP8 (OOB)
- Qwen3.5-397B-A17B TP8 (OOB)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (MET)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8-MTP TP4 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP1 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP2 (AW)
- Qwen3-Next-80B-A3B-Instruct-FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP4 (AW)
- DeepSeek-V3.2 FP8 TP8 (AW)
- GLM-4.7-FP8 TP4 (AW)
- GLM-4.7-FP8 TP8 (AW)
- gpt-oss-120b TP1 (AW)
- gpt-oss-120b TP2 (AW)
- gpt-oss-120b TP8 (AW)
- Kimi-K2.5-MXFP4 TP4 (AW)
- Kimi-K2.5-MXFP4 TP8 (AW)
- MiniMax-M2.5 TP2 (AW)
- MiniMax-M2.5 TP4 (AW)
- MiniMax-M2.5 TP8 (AW)
isl_osl_pairs:
description: |
Benchmark ISL/OSL pairs.
Input as semicolon-separated `input_length,output_length` pairs.
Example: 1024,1024;1024,8192;8192,1024
Additional copy-ready example: 1000,100;5000,500;10000,1000
type: string
default: "1024,1024;1024,8192;8192,1024"
concurrency_values:
description: "Benchmark concurrency values. Use comma-separated values from 4,8,16,32,64,128,256,512. The workflow will benchmark exactly the values you provide."
type: string
default: "4,8,16,32,64,128,256,512"
random_range_ratios:
description: "Benchmark random range ratios. Use comma-separated values like 0.8,1.0."
type: string
default: "0.8"
oot_image:
description: "Optional OOT benchmark image override. Leave empty to resolve main to the same-digest published nightly tag behind vllm-latest, or rebuild from the selected non-main branch."
type: string
default: ""
publish_to_dashboard:
description: "Upload benchmark results to the dashboard"
type: boolean
default: true
upload_to_custom_dashboard:
description: "Upload benchmark results to the LLM-Booster dashboard"
type: boolean
default: true
jobs:
wait-for-older-manual-runs:
name: Wait for older manual benchmark runs
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
steps:
- name: Wait for older workflow_dispatch runs
env:
GITHUB_TOKEN: ${{ github.token }}
MAX_WAIT_MINUTES: "2880"
run: |
python3 - <<'PY'
import json
import os
import sys
import time
from datetime import datetime
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
event = os.environ["GITHUB_EVENT_NAME"]
if event != "schedule":
print("Not a scheduled run; skipping manual-run wait gate.")
raise SystemExit(0)
api_url = os.environ.get("GITHUB_API_URL", "https://api.github.com")
repository = os.environ["GITHUB_REPOSITORY"]
run_id = os.environ["GITHUB_RUN_ID"]
token = os.environ.get("GITHUB_TOKEN", "")
max_wait_minutes = int(os.environ.get("MAX_WAIT_MINUTES", "2880"))
pending_statuses = {"queued", "in_progress", "waiting", "pending"}
def api_json(url: str) -> dict:
request = Request(
url,
headers={
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer {token}",
"User-Agent": "atom-vllm-benchmark-manual-priority-gate",
},
)
try:
with urlopen(request, timeout=30) as response:
return json.load(response)
except HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace").strip()
raise RuntimeError(
f"GitHub API returned HTTP {exc.code} while reading workflow runs: {detail}"
) from exc
except URLError as exc:
raise RuntimeError(
f"Failed to reach GitHub API while reading workflow runs: {exc}"
) from exc
current_run = api_json(f"{api_url}/repos/{repository}/actions/runs/{run_id}")
current_created_at = datetime.fromisoformat(
current_run["created_at"].replace("Z", "+00:00")
)
print(
f"Scheduled run #{run_id} created at {current_run['created_at']} will wait for older manual runs."
)
deadline = time.time() + max_wait_minutes * 60
poll_seconds = 300
while True:
runs = api_json(
f"{api_url}/repos/{repository}/actions/workflows/atom-vllm-benchmark.yaml/runs"
"?event=workflow_dispatch&per_page=100"
).get("workflow_runs", [])
blockers = []
for run in runs:
if str(run.get("id")) == str(run_id):
continue
status = run.get("status")
created_at = run.get("created_at")
if status not in pending_statuses or not created_at:
continue
run_created_at = datetime.fromisoformat(created_at.replace("Z", "+00:00"))
if run_created_at >= current_created_at:
continue
blockers.append(
(
run_created_at,
run.get("id"),
status,
run.get("head_branch", ""),
run.get("display_title") or run.get("name", ""),
)
)
blockers.sort()
if not blockers:
print("No older manual ATOM vLLM Benchmark runs are queued or in progress.")
break
print("Waiting for older manual benchmark runs to finish before starting scheduled benchmarks:")
for created_at, blocker_id, status, branch, title in blockers:
print(
f" - run #{blocker_id} status={status} branch={branch} created_at={created_at.isoformat()} title={title}"
)
if time.time() >= deadline:
raise SystemExit(
f"Timed out after {max_wait_minutes} minutes waiting for older manual benchmark runs."
)
print(f"Sleeping {poll_seconds} seconds before re-checking blockers...")
time.sleep(poll_seconds)
PY
resolve-atom-source:
name: Resolve ATOM benchmark source
needs: [wait-for-older-manual-runs]
runs-on: ubuntu-latest
outputs:
atom_repository: ${{ steps.resolve.outputs.atom_repository }}
atom_ref: ${{ steps.resolve.outputs.atom_ref }}
normalized_ref: ${{ steps.resolve.outputs.normalized_ref }}
rebuild_oot_image: ${{ steps.resolve.outputs.rebuild_oot_image }}
prebuilt_oot_image: ${{ steps.resolve.outputs.prebuilt_oot_image }}
selected_vllm_commit: ${{ steps.resolve.outputs.selected_vllm_commit }}
selected_vllm_version: ${{ steps.resolve.outputs.selected_vllm_version }}
oot_base_image: ${{ steps.resolve.outputs.oot_base_image }}
oot_image_source: ${{ steps.resolve.outputs.oot_image_source }}
publish_to_dashboard: ${{ steps.resolve.outputs.publish_to_dashboard }}
upload_to_custom_dashboard: ${{ steps.resolve.outputs.upload_to_custom_dashboard }}
benchmark_client: ${{ steps.resolve.outputs.benchmark_client }}
steps:
- name: Checkout selected branch
uses: actions/checkout@v6
- name: Resolve benchmark source
id: resolve
env:
INPUT_OOT_IMAGE: ${{ inputs.oot_image || '' }}
INPUT_PUBLISH_TO_DASHBOARD: ${{ inputs.publish_to_dashboard }}
INPUT_UPLOAD_TO_CUSTOM_DASHBOARD: ${{ inputs.upload_to_custom_dashboard }}
INPUT_BENCHMARK_CLIENT: ${{ inputs.benchmark_client || 'InferenceMax bench' }}
run: |
set -euo pipefail
ATOM_REPOSITORY="${GITHUB_REPOSITORY}"
ATOM_REF="${GITHUB_REF_NAME}"
OOT_BASE_IMAGE="rocm/atom-dev:latest"
NORMALIZED_REF="${ATOM_REF#refs/heads/}"
NORMALIZED_REF="${NORMALIZED_REF#refs/tags/}"
PREBUILT_OOT_IMAGE=""
REBUILD_OOT_IMAGE=false
OOT_IMAGE_SOURCE="prebuilt"
USER_PROVIDED_OOT_IMAGE=false
RESOLVED_PREBUILT_ALIAS=""
RESOLVED_PREBUILT_DIGEST=""
PREBUILT_RESOLUTION_TYPE=""
RESOLVED_NIGHTLY_TAG=""
if [[ "${GITHUB_EVENT_NAME}" == "schedule" ]]; then
PUBLISH_TO_DASHBOARD=true
UPLOAD_TO_CUSTOM_DASHBOARD=true
else
PUBLISH_TO_DASHBOARD="${INPUT_PUBLISH_TO_DASHBOARD:-true}"
UPLOAD_TO_CUSTOM_DASHBOARD="${INPUT_UPLOAD_TO_CUSTOM_DASHBOARD:-true}"
fi
BENCHMARK_CLIENT="${INPUT_BENCHMARK_CLIENT:-InferenceMax bench}"
mapfile -t VLLM_META < <(python3 - <<'PY'
import re
from pathlib import Path
text = Path(".github/workflows/docker-release.yaml").read_text(encoding="utf-8")
commit_match = re.search(r'^\s*VLLM_COMMIT:\s*"([^"]+)"', text, re.MULTILINE)
version_match = re.search(r'^\s*VLLM_VERSION:\s*"([^"]+)"', text, re.MULTILINE)
if not commit_match or not version_match:
raise SystemExit("Failed to read VLLM_COMMIT/VLLM_VERSION from .github/workflows/docker-release.yaml")
print(commit_match.group(1))
print(version_match.group(1))
PY
)
SELECTED_VLLM_COMMIT="${VLLM_META[0]}"
SELECTED_VLLM_VERSION="${VLLM_META[1]}"
if [[ -n "${INPUT_OOT_IMAGE}" ]]; then
PREBUILT_OOT_IMAGE="${INPUT_OOT_IMAGE}"
OOT_IMAGE_SOURCE="user-provided"
USER_PROVIDED_OOT_IMAGE=true
elif [[ "${NORMALIZED_REF}" == "main" ]]; then
if RESOLUTION_JSON="$(
python3 .github/scripts/resolve_atom_image.py \
--repository rocm/atom-dev \
--reference-tag vllm-latest \
--preferred-version "${SELECTED_VLLM_VERSION}"
)"; then
mapfile -t RESOLVED_IMAGE_META < <(
RESOLUTION_JSON="${RESOLUTION_JSON}" python3 - <<'PY'
import json
import os
resolution = json.loads(os.environ["RESOLUTION_JSON"])
print(resolution["resolved_image"])
print(resolution["reference_image"])
print(resolution["reference_digest"])
print(resolution["match_type"])
print(resolution.get("matched_tag", ""))
PY
)
PREBUILT_OOT_IMAGE="${RESOLVED_IMAGE_META[0]}"
RESOLVED_PREBUILT_ALIAS="${RESOLVED_IMAGE_META[1]}"
RESOLVED_PREBUILT_DIGEST="${RESOLVED_IMAGE_META[2]}"
PREBUILT_RESOLUTION_TYPE="${RESOLVED_IMAGE_META[3]}"
RESOLVED_NIGHTLY_TAG="${RESOLVED_IMAGE_META[4]}"
else
echo "::warning::Failed to resolve or digest-pin rocm/atom-dev:vllm-latest; falling back to the floating tag."
PREBUILT_OOT_IMAGE="rocm/atom-dev:vllm-latest"
RESOLVED_PREBUILT_ALIAS="rocm/atom-dev:vllm-latest"
PREBUILT_RESOLUTION_TYPE="resolution-failed"
fi
OOT_IMAGE_SOURCE="prebuilt"
else
REBUILD_OOT_IMAGE=true
OOT_IMAGE_SOURCE="rebuild"
fi
{
echo "atom_repository=${ATOM_REPOSITORY}"
echo "atom_ref=${ATOM_REF}"
echo "normalized_ref=${NORMALIZED_REF}"
echo "rebuild_oot_image=${REBUILD_OOT_IMAGE}"
echo "prebuilt_oot_image=${PREBUILT_OOT_IMAGE}"
echo "selected_vllm_commit=${SELECTED_VLLM_COMMIT}"
echo "selected_vllm_version=${SELECTED_VLLM_VERSION}"
echo "oot_base_image=${OOT_BASE_IMAGE}"
echo "oot_image_source=${OOT_IMAGE_SOURCE}"
echo "publish_to_dashboard=${PUBLISH_TO_DASHBOARD}"
echo "upload_to_custom_dashboard=${UPLOAD_TO_CUSTOM_DASHBOARD}"
echo "benchmark_client=${BENCHMARK_CLIENT}"
} >> "$GITHUB_OUTPUT"
printf '### OOT benchmark source\n- Repository: `%s`\n- Ref: `%s`\n- Image mode: `%s`\n' \
"${ATOM_REPOSITORY}" \
"${ATOM_REF}" \
"${OOT_IMAGE_SOURCE}" >> "$GITHUB_STEP_SUMMARY"
if [[ "${USER_PROVIDED_OOT_IMAGE}" == "true" ]]; then
printf -- '- User-provided image: `%s`\n- Expected vLLM version: `%s`\n- Expected vLLM commit: `%s`\n' \
"${PREBUILT_OOT_IMAGE}" \
"${SELECTED_VLLM_VERSION}" \
"${SELECTED_VLLM_COMMIT}" >> "$GITHUB_STEP_SUMMARY"
printf -- '\nBecause an explicit `oot_image` input was provided, this run uses that image directly and skips branch-based rebuild logic.\n' \
>> "$GITHUB_STEP_SUMMARY"
elif [[ "${REBUILD_OOT_IMAGE}" == "true" ]]; then
printf -- '- Base image: `%s`\n- vLLM version: `%s`\n- vLLM commit: `%s`\n- vLLM source: `.github/workflows/docker-release.yaml`\n' \
"${OOT_BASE_IMAGE}" \
"${SELECTED_VLLM_VERSION}" \
"${SELECTED_VLLM_COMMIT}" >> "$GITHUB_STEP_SUMMARY"
printf -- '\nBecause branch `%s` is not `main` and no `oot_image` override was provided, a custom OOT docker is rebuilt from the selected branch.\n' \
"${ATOM_REF}" >> "$GITHUB_STEP_SUMMARY"
else
printf -- '- Prebuilt image: `%s`\n- Expected vLLM version: `%s`\n- Expected vLLM commit: `%s`\n' \
"${PREBUILT_OOT_IMAGE}" \
"${SELECTED_VLLM_VERSION}" \
"${SELECTED_VLLM_COMMIT}" >> "$GITHUB_STEP_SUMMARY"
if [[ -n "${RESOLVED_PREBUILT_ALIAS}" ]]; then
printf -- '- Floating alias: `%s`\n' \
"${RESOLVED_PREBUILT_ALIAS}" >> "$GITHUB_STEP_SUMMARY"
fi
if [[ -n "${RESOLVED_PREBUILT_DIGEST}" ]]; then
printf -- '- Resolved digest: `%s`\n' \
"${RESOLVED_PREBUILT_DIGEST}" >> "$GITHUB_STEP_SUMMARY"
fi
case "${PREBUILT_RESOLUTION_TYPE}" in
matched-nightly-tag)
printf -- '- Resolution: reverse-matched same digest to nightly tag `%s`\n' \
"${RESOLVED_NIGHTLY_TAG}" >> "$GITHUB_STEP_SUMMARY"
;;
digest-pinned-latest)
printf -- '- Resolution: no nightly tag with the same digest was found, so this run pins `vllm-latest` to its current digest instead.\n' \
>> "$GITHUB_STEP_SUMMARY"
;;
reverse-lookup-failed-digest-pinned-latest)
printf -- '- Resolution: reverse lookup could not complete, so this run pins `vllm-latest` to its current digest instead of falling back to the floating tag.\n' \
>> "$GITHUB_STEP_SUMMARY"
;;
resolution-failed)
printf -- '- Resolution: digest pinning itself failed, so this run falls back to floating `vllm-latest`.\n' \
>> "$GITHUB_STEP_SUMMARY"
;;
esac
fi
printf -- '- Benchmark client: `%s`\n- Upload to dashboard: `%s`\n- Upload to custom dashboard: `%s`\n' \
"${BENCHMARK_CLIENT}" \
"${PUBLISH_TO_DASHBOARD}" \
"${UPLOAD_TO_CUSTOM_DASHBOARD}" >> "$GITHUB_STEP_SUMMARY"
if [[ "${PUBLISH_TO_DASHBOARD}" != "true" ]]; then
printf '\nDashboard upload is disabled by workflow input, so results are kept in artifacts and run summaries only.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
if [[ "${UPLOAD_TO_CUSTOM_DASHBOARD}" != "true" ]]; then
printf 'Custom dashboard payload upload is disabled by workflow input.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
parse-param-lists:
name: Parse benchmark parameter inputs
needs: [wait-for-older-manual-runs]
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.parse-benchmark-params.outputs.matrix_json }}
isl_osl_pairs: ${{ steps.parse-benchmark-params.outputs.isl_osl_pairs }}
concurrency_values: ${{ steps.parse-benchmark-params.outputs.concurrency_values }}
random_range_ratios: ${{ steps.parse-benchmark-params.outputs.random_range_ratios }}
steps:
- name: Parse benchmark parameter inputs
id: parse-benchmark-params
env:
ISL_OSL_PAIRS: ${{ inputs.isl_osl_pairs || '1024,1024;1024,8192;8192,1024' }}
CONCURRENCY_VALUES: ${{ inputs.concurrency_values || '4,8,16,32,64,128,256,512' }}
RANDOM_RANGE_RATIOS: ${{ inputs.random_range_ratios || '0.8' }}
run: |
set -euo pipefail
echo "Using isl_osl_pairs: ${ISL_OSL_PAIRS}"
echo "Using concurrency_values: ${CONCURRENCY_VALUES}"
echo "Using random_range_ratios: ${RANDOM_RANGE_RATIOS:-<default 0.8>}"
printf 'isl_osl_pairs=%s\n' "${ISL_OSL_PAIRS}" >> "$GITHUB_OUTPUT"
printf 'concurrency_values=%s\n' "${CONCURRENCY_VALUES}" >> "$GITHUB_OUTPUT"
printf 'random_range_ratios=%s\n' "${RANDOM_RANGE_RATIOS}" >> "$GITHUB_OUTPUT"
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import json
import os
allowed_concurrencies = {4, 8, 16, 32, 64, 128, 256, 512}
def dedupe_preserve_order(values):
deduped = []
seen = set()
for value in values:
marker = (
json.dumps(value, sort_keys=True) if isinstance(value, dict) else value
)
if marker in seen:
continue
seen.add(marker)
deduped.append(value)
return deduped
pairs = []
for raw_pair in os.environ["ISL_OSL_PAIRS"].split(";"):
pair = raw_pair.strip()
if not pair:
continue
parts = [part.strip() for part in pair.split(",")]
if len(parts) != 2 or not all(part.isdigit() for part in parts):
raise SystemExit(
f"Invalid ISL/OSL pair {pair!r}. Use semicolon-separated pairs like 1024,1024;2048,1024."
)
pairs.append(
{
"input_length": int(parts[0]),
"output_length": int(parts[1]),
}
)
if not pairs:
raise SystemExit("At least one ISL/OSL pair is required.")
pairs = dedupe_preserve_order(pairs)
concurrencies = []
for raw_value in os.environ["CONCURRENCY_VALUES"].split(","):
value = raw_value.strip()
if not value:
continue
if not value.isdigit():
raise SystemExit(
f"Invalid concurrency {value!r}. Allowed values: 4,8,16,32,64,128,256,512"
)
parsed = int(value)
if parsed not in allowed_concurrencies:
raise SystemExit(
f"Unsupported concurrency: {parsed}. Allowed values: 4,8,16,32,64,128,256,512"
)
concurrencies.append(parsed)
if not concurrencies:
raise SystemExit("At least one concurrency value is required.")
concurrencies = dedupe_preserve_order(concurrencies)
ratio_text = os.environ["RANDOM_RANGE_RATIOS"].strip()
if not ratio_text:
ratios = ["0.8"]
else:
ratios = []
for raw_ratio in ratio_text.split(","):
ratio = raw_ratio.strip()
if not ratio:
continue
try:
float(ratio)
except ValueError as exc:
raise SystemExit(
f"Invalid random range ratio {ratio!r}. Use values like 0.8 or 1.0."
) from exc
ratios.append(ratio)
ratios = dedupe_preserve_order(ratios) or ["0.8"]
matrix = []
for pair in pairs:
for concurrency in concurrencies:
for ratio in ratios:
matrix.append(
{
"input_length": pair["input_length"],
"output_length": pair["output_length"],
"concurrency": concurrency,
"random_range_ratio": ratio,
}
)
print(f"matrix_json={json.dumps(matrix, separators=(',', ':'))}")
PY
- name: Print benchmark parameter matrix JSON
run: |
echo "Matrix JSON: ${{ steps.parse-benchmark-params.outputs.matrix_json }}"
load-models:
name: Load OOT model configs
needs: [wait-for-older-manual-runs]
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
outputs:
models_json: ${{ steps.load.outputs.models_json }}
has_enabled_models: ${{ steps.load.outputs.has_enabled_models }}
selected_group: ${{ steps.load.outputs.selected_group }}
steps:
- uses: actions/checkout@v6
- id: load
env:
MODEL_SLOT_1: ${{ inputs.model_slot_1 || 'none' }}
MODEL_SLOT_2: ${{ inputs.model_slot_2 || 'none' }}
MODEL_SLOT_3: ${{ inputs.model_slot_3 || 'none' }}
MODEL_SLOT_4: ${{ inputs.model_slot_4 || 'none' }}
MODEL_SLOT_5: ${{ inputs.model_slot_5 || 'none' }}
MODEL_SLOT_6: ${{ inputs.model_slot_6 || 'none' }}
MODEL_SLOT_7: ${{ inputs.model_slot_7 || 'none' }}
MODEL_SLOT_8: ${{ inputs.model_slot_8 || 'none' }}
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
if [[ "${GITHUB_EVENT_NAME}" == "schedule" ]]; then
SCHEDULE_CREATED_AT="$(
python3 - <<'PY'
import json
import os
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
api_url = os.environ.get("GITHUB_API_URL", "https://api.github.com")
repository = os.environ["GITHUB_REPOSITORY"]
run_id = os.environ["GITHUB_RUN_ID"]
token = os.environ.get("GITHUB_TOKEN", "")
request = Request(
f"{api_url}/repos/{repository}/actions/runs/{run_id}",
headers={
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer {token}",
"User-Agent": "atom-vllm-benchmark-nightly-rotation",
},
)
try:
with urlopen(request, timeout=30) as response:
payload = json.load(response)
except HTTPError as exc:
detail = exc.read().decode("utf-8", errors="replace").strip()
raise RuntimeError(
f"Failed to fetch workflow run metadata: HTTP {exc.code} {detail}"
) from exc
except URLError as exc:
raise RuntimeError(
f"Failed to reach GitHub API for workflow run metadata: {exc}"
) from exc
created_at = payload.get("created_at")
if not created_at:
raise RuntimeError("Workflow run metadata did not include created_at")
print(created_at)
PY
)"
export SCHEDULE_CREATED_AT
else
export SCHEDULE_CREATED_AT=""
fi
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import json
import os
import sys
from datetime import datetime, timedelta, timezone
from pathlib import Path
none_choice = "none"
catalog = json.loads(
Path(".github/benchmark/oot_benchmark_models.json").read_text(
encoding="utf-8"
)
)
families = catalog.get("families")
if not isinstance(families, list):
raise SystemExit("Benchmark catalog must define a 'families' list.")
def flatten_variant(family, variant):
flattened = {
key: value
for key, value in family.items()
if key not in {"choice_label", "variants"}
}
flattened.update(variant)
return flattened
selected_group = ""
event = os.environ["GITHUB_EVENT_NAME"]
selected = []
all_variants = []
for family in families:
for variant in family["variants"]:
all_variants.append(flatten_variant(family, variant))
if event == "schedule":
created_at = os.environ.get("SCHEDULE_CREATED_AT", "")
if not created_at:
raise SystemExit(
"Scheduled selection requires a run creation timestamp."
)
beijing_tz = timezone(timedelta(hours=8))
run_date = datetime.fromisoformat(created_at.replace("Z", "+00:00"))
beijing_dt = run_date.astimezone(beijing_tz)
beijing_weekday = beijing_dt.weekday()
if beijing_weekday in (0, 2):
selected_group = "A-MET"
selected = [
m for m in all_variants
if str(m.get("prefix", "")).endswith("-met")
]
elif beijing_weekday in (1, 3):
selected_group = "B-AW"
selected = [
m for m in all_variants
if "-aw-" in str(m.get("prefix", ""))
]
elif beijing_weekday == 4:
selected_group = "C-ALL"
selected = list(all_variants)
else:
selected_group = "SKIP-WEEKEND"
selected = []
print(
f"Weekend schedule in Beijing ({beijing_dt.date()}); no benchmark group configured.",
file=sys.stderr,
)
else:
variant_map = {}
for family in families:
for variant in family["variants"]:
variant_map[str(variant["display"])] = flatten_variant(
family, variant
)
seen_prefixes = set()
for slot_idx in range(1, 9):
label = os.environ.get(f"MODEL_SLOT_{slot_idx}", "").strip()
if not label or label == none_choice:
continue
selected_variant = variant_map.get(label)
if selected_variant is None:
available = ", ".join(sorted(variant_map))
raise SystemExit(
f"Unknown benchmark model variant choice {label!r}. Available choices: {available}"
)
prefix = str(selected_variant["prefix"])
if prefix in seen_prefixes:
continue
selected.append(selected_variant)
seen_prefixes.add(prefix)
if selected_group:
print(
f"Scheduled nightly benchmark group: {selected_group}",
file=sys.stderr,
)
if not selected:
print("No benchmark model variants were selected.", file=sys.stderr)
else:
print("Selected benchmark model variants:", file=sys.stderr)
for model in selected:
print(
f" - {model['display']} ({model['prefix']})",
file=sys.stderr,
)
print(f"models_json={json.dumps(selected, separators=(',', ':'))}")
print(f"selected_group={selected_group}")
print(f"has_enabled_models={'true' if selected else 'false'}")
PY
- name: Print selected models
env:
SELECTED_GROUP: ${{ steps.load.outputs.selected_group }}
MODELS_JSON: ${{ steps.load.outputs.models_json }}
run: |
if [[ -n "${SELECTED_GROUP}" ]]; then
echo "Scheduled nightly benchmark group: ${SELECTED_GROUP}"
fi
printf 'Selected models: %s\n' "${MODELS_JSON}"
build-benchmark-matrix:
name: Build OOT benchmark matrix
needs: [parse-param-lists, load-models]
if: >-
needs.parse-param-lists.result == 'success'
&& needs.load-models.result == 'success'
&& needs.load-models.outputs.has_enabled_models == 'true'
runs-on: ubuntu-latest
outputs:
benchmark_matrix: ${{ steps.build.outputs.benchmark_matrix }}
has_benchmark_cells: ${{ steps.build.outputs.has_benchmark_cells }}
steps:
- name: Combine models and params
id: build
env:
MODELS_JSON: ${{ needs.load-models.outputs.models_json }}
PARAMS_JSON: ${{ needs.parse-param-lists.outputs.matrix_json }}
run: |
BENCHMARK_MATRIX="$(python3 - <<'PY'
import json
import os
models = json.loads(os.environ["MODELS_JSON"])
params = json.loads(os.environ["PARAMS_JSON"])
include = []
for model in models:
prefix = str(model.get("prefix", ""))
is_aw_model = "-aw-" in prefix
aw_pairs = (
(1000, 100),
(5000, 500),
(10000, 1000),
)
supported_pairs = set(model.get("supported_input_output_pairs", []))
excluded_pairs = set(model.get("excluded_input_output_pairs", []))
model_params = []
seen = set()
extra_concurrency = (128, 256)
for param in params:
base_params = [param]
if is_aw_model:
base_params = []
for input_length, output_length in aw_pairs:
aws_param = dict(param)
aws_param["input_length"] = input_length
aws_param["output_length"] = output_length
aws_param["random_range_ratio"] = ""
base_params.append(aws_param)
variants = []
for base_param in base_params:
variants.append(base_param)
for concurrency in extra_concurrency:
variant = dict(base_param)
variant["concurrency"] = concurrency
variants.append(variant)
for variant in variants:
key = (
int(variant["input_length"]),
int(variant["output_length"]),
int(variant["concurrency"]),
str(variant["random_range_ratio"]),
)
if key in seen:
continue
seen.add(key)
model_params.append(variant)
for param in model_params:
pair = f'{param["input_length"]}x{param["output_length"]}'
if supported_pairs and pair not in supported_pairs:
continue
if pair in excluded_pairs:
continue
include.append({"model": model, "params": param})
print(json.dumps({"include": include}, separators=(",", ":")))
PY
)"
echo "benchmark_matrix=${BENCHMARK_MATRIX}" >> "$GITHUB_OUTPUT"
if [ "${BENCHMARK_MATRIX}" = '{"include":[]}' ]; then
echo "has_benchmark_cells=false" >> "$GITHUB_OUTPUT"
echo "No eligible benchmark cases remain after model-specific parameter filtering."
else
echo "has_benchmark_cells=true" >> "$GITHUB_OUTPUT"
echo "Benchmark matrix: ${BENCHMARK_MATRIX}"
fi
build-oot-image:
name: Build custom OOT benchmark image
needs: [resolve-atom-source, build-benchmark-matrix]
if: >-
needs.resolve-atom-source.outputs.rebuild_oot_image == 'true'
&& needs.build-benchmark-matrix.result == 'success'
&& needs.build-benchmark-matrix.outputs.has_benchmark_cells == 'true'
runs-on: build-only-atom
outputs:
oot_image_tag: ${{ steps.image-meta.outputs.oot_image_tag }}
atom_source_sha: ${{ steps.source-meta.outputs.atom_source_sha }}
env:
ATOM_SOURCE_REPOSITORY: ${{ needs.resolve-atom-source.outputs.atom_repository }}
ATOM_SOURCE_REF: ${{ needs.resolve-atom-source.outputs.atom_ref }}
OOT_BASE_IMAGE: ${{ needs.resolve-atom-source.outputs.oot_base_image }}
VLLM_COMMIT: ${{ needs.resolve-atom-source.outputs.selected_vllm_commit }}
VLLM_VERSION: ${{ needs.resolve-atom-source.outputs.selected_vllm_version }}
OOT_IMAGE_REPO: rocm/atom-dev
steps:
- name: Checkout benchmark ATOM source
uses: actions/checkout@v6
with:
repository: ${{ env.ATOM_SOURCE_REPOSITORY }}
ref: ${{ env.ATOM_SOURCE_REF }}
fetch-depth: 1
- name: Record source metadata
id: source-meta
run: |
ATOM_SOURCE_SHA="$(git rev-parse HEAD)"
echo "atom_source_sha=${ATOM_SOURCE_SHA}" >> "$GITHUB_OUTPUT"
printf '### Building custom OOT image\n- Repository: `%s`\n- Ref: `%s`\n- Commit: `%s`\n- Base image: `%s`\n- vLLM version: `%s`\n- vLLM commit: `%s`\n' \
"${ATOM_SOURCE_REPOSITORY}" \
"${ATOM_SOURCE_REF}" \
"${ATOM_SOURCE_SHA}" \
"${OOT_BASE_IMAGE}" \
"${VLLM_VERSION}" \
"${VLLM_COMMIT}" >> "$GITHUB_STEP_SUMMARY"
- name: Docker Login
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login docker.io -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Generate custom OOT base Dockerfile
run: |
cat > Dockerfile.oot-base <<EOF
FROM ${OOT_BASE_IMAGE}
RUN pip install -U lm-eval[api]
RUN pip show lm-eval || true
RUN pip install hf_transfer
RUN pip show hf_transfer || true
RUN echo "=== Aiter version BEFORE uninstall ===" && pip show amd-aiter || true
RUN pip uninstall -y amd-aiter
RUN pip install --upgrade "pybind11>=3.0.1"
RUN pip show pybind11
RUN rm -rf /app/aiter-test
RUN git clone --depth 1 https://github.com/ROCm/aiter.git /app/aiter-test && \\
cd /app/aiter-test && \\
git checkout HEAD && \\
git submodule sync && git submodule update --init --recursive && \\
MAX_JOBS=64 PREBUILD_KERNELS=0 GPU_ARCHS=gfx950 python3 setup.py develop
RUN echo "=== Aiter version AFTER installation ===" && pip show amd-aiter || true
RUN echo "=== ATOM version BEFORE uninstall ===" && pip show atom || true
RUN pip uninstall -y atom || true
RUN rm -rf /app/ATOM
COPY . /app/ATOM
RUN cd /app/ATOM && pip install -e .
RUN echo "=== ATOM version AFTER installation ===" && pip show atom || true
EOF
- name: Build custom OOT base image
run: |
docker build --pull --network=host \
--no-cache \
-t atom_oot_base:ci \
-f Dockerfile.oot-base .
- name: Build custom OOT vLLM image
id: image-meta
run: |
SHORT_SHA="$(git rev-parse --short HEAD)"
SHORT_VLLM="$(printf '%s' "${VLLM_COMMIT}" | cut -c1-12)"
SAFE_VLLM_VERSION="$(printf '%s' "${VLLM_VERSION}" | tr '/:' '--')"
OOT_IMAGE_TAG="${OOT_IMAGE_REPO}:oot-benchmark-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${SHORT_SHA}-${SAFE_VLLM_VERSION}-${SHORT_VLLM}"
docker build --network=host \
--no-cache \
-t "${OOT_IMAGE_TAG}" \
--target atom_oot \
--build-arg OOT_BASE_IMAGE="atom_oot_base:ci" \
--build-arg MAX_JOBS=64 \
--build-arg VLLM_COMMIT="${VLLM_COMMIT}" \
--build-arg INSTALL_LM_EVAL=1 \
--build-arg INSTALL_FASTSAFETENSORS=1 \
-f docker/Dockerfile .
echo "oot_image_tag=${OOT_IMAGE_TAG}" >> "$GITHUB_OUTPUT"
- name: Push custom OOT image
run: |
docker push "${{ steps.image-meta.outputs.oot_image_tag }}"
- name: Clean up build images
if: always()
run: |
docker rmi "${{ steps.image-meta.outputs.oot_image_tag }}" || true
docker rmi atom_oot_base:ci || true
benchmark:
name: OOT ${{ matrix.model.display }} ${{ matrix.params.input_length }}/${{ matrix.params.output_length }} c=${{ matrix.params.concurrency }}
needs: [resolve-atom-source, build-benchmark-matrix, build-oot-image]
if: >-
always()
&& needs.resolve-atom-source.result == 'success'
&& needs.build-benchmark-matrix.result == 'success'
&& (needs.build-oot-image.result == 'success' || needs.build-oot-image.result == 'skipped')
&& needs.build-benchmark-matrix.outputs.has_benchmark_cells == 'true'
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-benchmark-matrix.outputs.benchmark_matrix) }}
runs-on: ${{ matrix.model.runner }}
timeout-minutes: 240
permissions:
actions: read
contents: write
env:
MODEL_NAME: ${{ matrix.model.display }}
DASHBOARD_MODEL_NAME: ${{ matrix.model.dashboard_model || '' }}
MODEL_SOURCE_PATH: ${{ matrix.model.source_path || matrix.model.path }}
MODEL_PATH: ${{ matrix.model.path || matrix.model.source_path }}
OOT_EXTRA_ARGS: ${{ matrix.model.extra_args }}
BENCH_EXTRA_ARGS: ${{ matrix.model.bench_args }}
RESULT_PREFIX: ${{ matrix.model.prefix }}
ISL: ${{ matrix.params.input_length }}
OSL: ${{ matrix.params.output_length }}
CONC: ${{ matrix.params.concurrency }}
RANDOM_RANGE_RATIO: ${{ matrix.params.random_range_ratio }}
RESULT_FILENAME: ${{ matrix.model.prefix }}-${{ matrix.params.input_length }}-${{ matrix.params.output_length }}-${{ matrix.params.concurrency }}-${{ matrix.params.random_range_ratio }}
CONTAINER_NAME: atom_vllm_oot_benchmark_${{ strategy.job-index }}
CONTAINER_RESULT_DIR: /tmp/oot-benchmark-results
CONTAINER_BENCH_SERVING_DIR: /tmp/oot-benchmark/bench_serving
OOT_IMAGE_TAG: ${{ needs.build-oot-image.outputs.oot_image_tag || needs.resolve-atom-source.outputs.prebuilt_oot_image }}
OOT_IMAGE_SOURCE: ${{ needs.resolve-atom-source.outputs.oot_image_source }}
BENCH_SERVING_REPO_URL: https://github.com/kimbochen/bench_serving.git
ATOM_SOURCE_REPOSITORY: ${{ needs.resolve-atom-source.outputs.atom_repository }}
ATOM_SOURCE_REF: ${{ needs.resolve-atom-source.outputs.atom_ref }}
VLLM_COMMIT_USED: ${{ needs.resolve-atom-source.outputs.selected_vllm_commit }}
VLLM_VERSION_USED: ${{ needs.resolve-atom-source.outputs.selected_vllm_version }}
PUBLISH_TO_DASHBOARD: ${{ needs.resolve-atom-source.outputs.publish_to_dashboard }}
UPLOAD_TO_CUSTOM_DASHBOARD: ${{ needs.resolve-atom-source.outputs.upload_to_custom_dashboard }}
BENCHMARK_CLIENT: ${{ contains(matrix.model.prefix, '-aw-') && 'vLLM bench' || needs.resolve-atom-source.outputs.benchmark_client }}
steps:
- name: Detect container engine
run: |
if docker info > /dev/null 2>&1; then
echo "CONTAINER_ENGINE=docker" >> "$GITHUB_ENV"
echo "Container engine: docker"
elif command -v podman > /dev/null 2>&1; then
echo "CONTAINER_ENGINE=podman" >> "$GITHUB_ENV"
echo "Container engine: podman"
else
echo "ERROR: Neither docker nor podman is available on this runner."
exit 1
fi
- name: Clean up containers and workspace
run: |
echo "=== Cleaning up containers on $(hostname) ==="
containers=$($CONTAINER_ENGINE ps -q)
if [ -n "$containers" ]; then
$CONTAINER_ENGINE kill $containers || true
fi
$CONTAINER_ENGINE rm -f "$CONTAINER_NAME" 2>/dev/null || true
$CONTAINER_ENGINE run --rm -v "${GITHUB_WORKSPACE:-$PWD}":/workspace -w /workspace --privileged docker.io/rocm/pytorch:latest bash -lc "shopt -s dotglob && ls -la /workspace/ && rm -rf /workspace/*" || true
- name: Checkout benchmark ATOM source
uses: actions/checkout@v6
with:
repository: ${{ env.ATOM_SOURCE_REPOSITORY }}
ref: ${{ needs.build-oot-image.outputs.atom_source_sha || github.sha }}
fetch-depth: 1
- name: Record benchmark source revision
run: |
SOURCE_SHA="$(git rev-parse HEAD)"
echo "ATOM_SOURCE_SHA=${SOURCE_SHA}" >> "$GITHUB_ENV"
echo "Benchmarking ${ATOM_SOURCE_REPOSITORY}@${ATOM_SOURCE_REF} (${SOURCE_SHA}) with ${OOT_IMAGE_SOURCE} image ${OOT_IMAGE_TAG}"
- name: Container Engine Login
run: |
# Podman requires an explicit registry when registries.conf has no search list;
# Docker Hub short names (e.g. rocm/foo) must use docker.io here.
REG="${OOT_IMAGE_TAG%%/*}"
if [[ "$REG" != *.* && "$REG" != localhost* && "$REG" != *:* ]]; then
REG="docker.io"
fi
echo "Logging in to registry: ${REG}"
echo "${{ secrets.DOCKER_PASSWORD }}" | $CONTAINER_ENGINE login "$REG" -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Set HF_TOKEN
run: echo "HF_TOKEN=${HF_TOKEN:-${{ secrets.AMD_HF_TOKEN }}}" >> "$GITHUB_ENV"
- name: Pull OOT benchmark image
run: |
set -euo pipefail
IMG="${OOT_IMAGE_TAG}"
if [[ "${CONTAINER_ENGINE}" == "podman" ]]; then
if [[ "${IMG}" != */* ]]; then
IMG="docker.io/library/${IMG}"
else
reg="${IMG%%/*}"
if [[ "${reg}" != *.* && "${reg}" != localhost* && "${reg}" != *:* ]]; then
IMG="docker.io/${IMG}"
fi
fi
fi
echo "OOT_IMAGE_REF=${IMG}" >> "$GITHUB_ENV"
echo "Pulling OOT benchmark image: ${IMG} (workflow tag: ${OOT_IMAGE_TAG})"
$CONTAINER_ENGINE pull "${IMG}"
- name: Prepare model cache mount
run: |
MODEL_CACHE_MOUNT=""
MODEL_CACHE_DESC="container-local /models (no host cache mount)"
if [ -d "/it-share/models" ]; then
MODEL_CACHE_MOUNT="-v /it-share/models:/models"
MODEL_CACHE_DESC="/it-share/models (shared host path)"
elif [ -d "/models" ]; then
MODEL_CACHE_MOUNT="-v /models:/models"
MODEL_CACHE_DESC="/models (shared host path)"
elif [ -d "/data/models" ]; then
MODEL_CACHE_MOUNT="-v /data/models:/models"
MODEL_CACHE_DESC="/data/models (shared host path)"
else
echo "No shared host model cache found; using container-local /models."
fi
echo "Using model cache backend: ${MODEL_CACHE_DESC}"
echo "MODEL_CACHE_MOUNT=${MODEL_CACHE_MOUNT}" >> "$GITHUB_ENV"
echo "MODEL_CACHE_DESC=${MODEL_CACHE_DESC}" >> "$GITHUB_ENV"
- name: Start OOT benchmark container
run: |
if [ -f "/etc/podinfo/gha-render-devices" ]; then
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
else
DEVICE_FLAG="--device /dev/dri"
fi
MODEL_MOUNT="${MODEL_CACHE_MOUNT}"
echo "Using model cache backend: ${MODEL_CACHE_DESC}"
{
printf '%s\n' "${{ matrix.model.env_vars }}"
printf '%s\n' \
"AITER_LOG_LEVEL=ERROR" \
"AITER_TRITON_LOG_LEVEL=CRITICAL" \
"AITER_LOG_MORE=0"
} | sed '/^[[:space:]]*$/d; s/^[[:space:]]*//' > /tmp/oot_env_file.txt
$CONTAINER_ENGINE run -dt --device=/dev/kfd $DEVICE_FLAG \
-v "${GITHUB_WORKSPACE:-$PWD}":/workspace \
$MODEL_MOUNT \
-w /workspace \
--ipc=host --group-add video \
--privileged \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--ulimit memlock=-1 \
--ulimit stack=67108864 \
--env-file /tmp/oot_env_file.txt \
-e HF_TOKEN="${HF_TOKEN:-}" \
--name "$CONTAINER_NAME" \
"${OOT_IMAGE_REF:-${OOT_IMAGE_TAG}}"
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
- name: Collect GPU info (inside container)
id: gpu-info
run: bash .github/scripts/collect_gpu_info.sh "$CONTAINER_NAME" "$CONTAINER_ENGINE" "${{ matrix.model.runner }}"
- name: Download model if needed
run: |
model_dir="${MODEL_PATH}"
if [[ "${model_dir}" = /models/* ]]; then
model_dir="/models/${model_dir#/models/}"
elif [[ "${model_dir}" = /it-share/models/* ]]; then
model_dir="/models/${model_dir#/it-share/models/}"
elif [[ "${model_dir}" = /data/models/* ]]; then
model_dir="/models/${model_dir#/data/models/}"
elif [[ "${model_dir}" != /* ]]; then
model_dir="/models/${model_dir}"
fi
if [ -n "${MODEL_CACHE_MOUNT}" ]; then
echo "/models directory found, downloading model to ${model_dir}"
if ! $CONTAINER_ENGINE exec -e HF_TOKEN="${HF_TOKEN:-}" "$CONTAINER_NAME" bash -lc "hf download \"${MODEL_SOURCE_PATH}\" --local-dir \"$model_dir\""; then
echo "Model download failed for '${MODEL_SOURCE_PATH}'. Aborting."
exit 1
fi
else
echo "/models directory not mounted; skipping model download"
fi
- name: Resolve OOT model path
run: |
model_dir="${MODEL_PATH}"
if [[ "${model_dir}" = /models/* ]]; then
model_dir="/models/${model_dir#/models/}"
elif [[ "${model_dir}" = /it-share/models/* ]]; then
model_dir="/models/${model_dir#/it-share/models/}"
elif [[ "${model_dir}" = /data/models/* ]]; then
model_dir="/models/${model_dir#/data/models/}"
elif [[ "${model_dir}" != /* ]]; then
model_dir="/models/${model_dir}"
fi
if [ -n "${MODEL_CACHE_MOUNT}" ]; then
echo "OOT_RESOLVED_MODEL_PATH=${model_dir}" >> "$GITHUB_ENV"
echo "Using mounted model path: ${model_dir}"
else
echo "OOT_RESOLVED_MODEL_PATH=${MODEL_SOURCE_PATH}" >> "$GITHUB_ENV"
echo "Using model id: ${MODEL_SOURCE_PATH}"
fi
- name: Prepare benchmark client in container
run: |
if [[ "${BENCHMARK_CLIENT}" == "InferenceMax bench" ]]; then
$CONTAINER_ENGINE exec "$CONTAINER_NAME" bash -lc "
set -euo pipefail
rm -rf \"${CONTAINER_BENCH_SERVING_DIR%/bench_serving}\"
mkdir -p \"${CONTAINER_BENCH_SERVING_DIR%/bench_serving}\"
git clone --depth 1 \"${BENCH_SERVING_REPO_URL}\" \"${CONTAINER_BENCH_SERVING_DIR}\"
test -f \"${CONTAINER_BENCH_SERVING_DIR}/benchmark_serving.py\"
"
else
$CONTAINER_ENGINE exec "$CONTAINER_NAME" bash -lc "
set -euo pipefail
command -v vllm
"
fi
- name: Launch OOT benchmark server
env:
MAX_WAIT_RETRIES: "120"
STREAM_VLLM_LOGS: "1"
run: |
set -euo pipefail
$CONTAINER_ENGINE exec \
-e OOT_MODEL_NAME="${MODEL_NAME}" \
-e OOT_MODEL_PATH="${OOT_RESOLVED_MODEL_PATH:-$MODEL_PATH}" \
-e OOT_EXTRA_ARGS="${OOT_EXTRA_ARGS}" \
-e MAX_WAIT_RETRIES="${MAX_WAIT_RETRIES}" \
-e STREAM_VLLM_LOGS="${STREAM_VLLM_LOGS}" \
-e KEEP_SERVER_ALIVE_ON_EXIT=1 \
"$CONTAINER_NAME" bash -lc "
set -euo pipefail
bash .github/scripts/atom_oot_test.sh launch full
"
- name: Run OOT benchmark client
id: run_benchmark_client
timeout-minutes: 240
continue-on-error: true
run: |
set -euo pipefail
TRUST_REMOTE_CODE_ARG=""
if [[ "${OOT_EXTRA_ARGS}" == *"--trust-remote-code"* ]]; then
if [[ "${BENCHMARK_CLIENT}" == "vLLM bench" ]]; then
TRUST_REMOTE_CODE_ARG="--trust_remote_code"
else
TRUST_REMOTE_CODE_ARG="--trust-remote-code"
fi
fi
{
echo "=== Benchmark config: ${MODEL_NAME} CLIENT=${BENCHMARK_CLIENT} ISL=${ISL} OSL=${OSL} CONC=${CONC} RANDOM_RANGE_RATIO=${RANDOM_RANGE_RATIO} ==="
if [[ "${BENCHMARK_CLIENT}" == "InferenceMax bench" ]]; then
$CONTAINER_ENGINE exec \
-e ISL="${ISL}" \
-e OSL="${OSL}" \
-e CONC="${CONC}" \
-e RANDOM_RANGE_RATIO="${RANDOM_RANGE_RATIO}" \
-e RESULT_FILENAME="${RESULT_FILENAME}" \
-e BENCH_EXTRA_ARGS="${BENCH_EXTRA_ARGS}" \
"$CONTAINER_NAME" bash -lc "
set -euo pipefail
rm -rf \"${CONTAINER_RESULT_DIR}\"
mkdir -p \"${CONTAINER_RESULT_DIR}\"
PYTHONDONTWRITEBYTECODE=1 python \"${CONTAINER_BENCH_SERVING_DIR}/benchmark_serving.py\" \
--model=\"${OOT_RESOLVED_MODEL_PATH:-$MODEL_PATH}\" \
--backend=vllm \
--base-url=http://127.0.0.1:8000 \
--dataset-name=random \
--random-input-len=\"${ISL}\" \
--random-output-len=\"${OSL}\" \
--random-range-ratio \"${RANDOM_RANGE_RATIO}\" \
--num-prompts=\"$(( CONC * 10 ))\" \
--max-concurrency=\"${CONC}\" \
${TRUST_REMOTE_CODE_ARG} \
--num-warmups=\"$(( 2 * CONC ))\" \
--request-rate=inf \
--ignore-eos \
--save-result \
--percentile-metrics=\"ttft,tpot,itl,e2el\" \
--result-dir=\"${CONTAINER_RESULT_DIR}\" \
--result-filename=\"${RESULT_FILENAME}.json\" \
${BENCH_EXTRA_ARGS:-}
"
else
$CONTAINER_ENGINE exec \
-e ISL="${ISL}" \
-e OSL="${OSL}" \
-e CONC="${CONC}" \
-e RANDOM_RANGE_RATIO="${RANDOM_RANGE_RATIO}" \
-e RESULT_FILENAME="${RESULT_FILENAME}" \
-e BENCH_EXTRA_ARGS="${BENCH_EXTRA_ARGS}" \
"$CONTAINER_NAME" bash -lc "
set -euo pipefail
rm -rf \"${CONTAINER_RESULT_DIR}\"
mkdir -p \"${CONTAINER_RESULT_DIR}\"
vllm bench serve \
--backend vllm \
--base-url http://127.0.0.1:8000 \
--endpoint /v1/completions \
--model \"${OOT_RESOLVED_MODEL_PATH:-$MODEL_PATH}\" \
--dataset-name random \
--random-input-len \"${ISL}\" \
--random-output-len \"${OSL}\" \
${RANDOM_RANGE_RATIO:+--random-range-ratio \"${RANDOM_RANGE_RATIO}\"} \
--temperature 0.0 \
--num-prompts \"$(( CONC * 10 ))\" \
--max-concurrency \"${CONC}\" \
${TRUST_REMOTE_CODE_ARG} \
--num-warmups \"$(( 2 * CONC ))\" \
--request-rate inf \
--ignore-eos \
--disable-tqdm \
--save-result \
--percentile-metrics ttft,tpot,itl,e2el \
--result-dir \"${CONTAINER_RESULT_DIR}\" \
--result-filename \"${RESULT_FILENAME}.json\" \
${BENCH_EXTRA_ARGS:-}
"
fi
} > "./${RESULT_FILENAME}.client.log" 2>&1
- name: Copy OOT benchmark outputs
if: always()
run: |
set -euo pipefail
if $CONTAINER_ENGINE exec "$CONTAINER_NAME" bash -lc "test -f \"${CONTAINER_RESULT_DIR}/${RESULT_FILENAME}.json\"" >/dev/null 2>&1; then
$CONTAINER_ENGINE cp "${CONTAINER_NAME}:${CONTAINER_RESULT_DIR}/${RESULT_FILENAME}.json" "./${RESULT_FILENAME}.json" || true
fi
if $CONTAINER_ENGINE exec "$CONTAINER_NAME" bash -lc "test -f /tmp/vllm_oot.log" >/dev/null 2>&1; then
$CONTAINER_ENGINE cp "${CONTAINER_NAME}:/tmp/vllm_oot.log" "./${RESULT_FILENAME}.vllm.log" || true
fi
- name: Enrich copied benchmark result
if: always()
run: |
set -euo pipefail
if [ ! -f "${RESULT_FILENAME}.json" ]; then
echo "No benchmark result JSON found to enrich."
exit 0
fi
RESULT_PATH="${RESULT_FILENAME}.json" \
ISL="${ISL}" \
OSL="${OSL}" \
EXTRA_ARGS_TEXT="${OOT_EXTRA_ARGS}" \
DASHBOARD_MODEL_NAME="${DASHBOARD_MODEL_NAME}" \
ATOM_SOURCE_REPOSITORY="${ATOM_SOURCE_REPOSITORY}" \
ATOM_SOURCE_REF="${ATOM_SOURCE_REF}" \
ATOM_SOURCE_SHA="${ATOM_SOURCE_SHA}" \
VLLM_COMMIT_USED="${VLLM_COMMIT_USED}" \
VLLM_VERSION_USED="${VLLM_VERSION_USED}" \
OOT_IMAGE_SOURCE="${OOT_IMAGE_SOURCE}" \
OOT_IMAGE_TAG_USED="${OOT_IMAGE_TAG}" \
PUBLISH_TO_DASHBOARD="${PUBLISH_TO_DASHBOARD}" \
UPLOAD_TO_CUSTOM_DASHBOARD="${UPLOAD_TO_CUSTOM_DASHBOARD}" \
BENCHMARK_CLIENT="${BENCHMARK_CLIENT}" \
python3 - <<'PY'
import json
import os
import re
result_path = os.environ["RESULT_PATH"]
with open(result_path, encoding="utf-8") as f:
data = json.load(f)
data["random_input_len"] = int(os.environ["ISL"])
data["random_output_len"] = int(os.environ["OSL"])
data["benchmark_backend"] = "ATOM-vLLM"
display_name = os.environ.get("DASHBOARD_MODEL_NAME", "")
if display_name:
data["benchmark_model_name"] = display_name
tp_match = re.search(
r"--tensor-parallel-size\s+(\d+)",
os.environ.get("EXTRA_ARGS_TEXT", ""),
)
if tp_match:
data["tensor_parallel_size"] = int(tp_match.group(1))
data["atom_source_repository"] = os.environ.get("ATOM_SOURCE_REPOSITORY", "")
data["atom_source_ref"] = os.environ.get("ATOM_SOURCE_REF", "")
data["atom_source_sha"] = os.environ.get("ATOM_SOURCE_SHA", "")
data["vllm_commit"] = os.environ.get("VLLM_COMMIT_USED", "")
data["vllm_version"] = os.environ.get("VLLM_VERSION_USED", "")
data["oot_image_source"] = os.environ.get("OOT_IMAGE_SOURCE", "")
data["oot_image_tag"] = os.environ.get("OOT_IMAGE_TAG_USED", "")
data["benchmark_client"] = os.environ.get("BENCHMARK_CLIENT", "")
data["dashboard_publish_allowed"] = (
os.environ.get("PUBLISH_TO_DASHBOARD", "false").lower() == "true"
)
data["custom_dashboard_publish_allowed"] = (
os.environ.get("UPLOAD_TO_CUSTOM_DASHBOARD", "false").lower() == "true"
)
with open(result_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
PY
- name: Dump OOT benchmark diagnostics
if: always()
run: |
set -euo pipefail
RESULT_PATH="${RESULT_FILENAME}.json"
CLIENT_LOG="${RESULT_FILENAME}.client.log"
VLLM_LOG="${RESULT_FILENAME}.vllm.log"
BENCH_OUTCOME="${{ steps.run_benchmark_client.outcome }}"
COMPLETED=""
NUM_PROMPTS=""
if [ -f "${RESULT_PATH}" ]; then
mapfile -t RESULT_COUNTS < <(
RESULT_PATH="${RESULT_PATH}" python3 - <<'PY'
import json
import os
result_path = os.environ["RESULT_PATH"]
try:
with open(result_path, encoding="utf-8") as f:
data = json.load(f)
except (OSError, ValueError, json.JSONDecodeError):
print("")
print("")
else:
print(data.get("completed", ""))
print(data.get("num_prompts", ""))
PY
)
COMPLETED="${RESULT_COUNTS[0]:-}"
NUM_PROMPTS="${RESULT_COUNTS[1]:-}"
fi
if [[ "${BENCH_OUTCOME}" == "success" && -f "${RESULT_PATH}" && -n "${NUM_PROMPTS}" && "${COMPLETED}" == "${NUM_PROMPTS}" ]]; then
echo "Benchmark finished without triggering diagnostic dump."
exit 0
fi
echo "::warning::Dumping benchmark diagnostics for ${MODEL_NAME} (benchmark outcome=${BENCH_OUTCOME}, completed=${COMPLETED:-missing}, num_prompts=${NUM_PROMPTS:-missing})."
echo "::group::Benchmark client log"
if [ -f "${CLIENT_LOG}" ]; then
cat "${CLIENT_LOG}"
else
echo "Benchmark client log not found: ${CLIENT_LOG}"
fi
echo "::endgroup::"
echo "::group::vLLM log tail"
if [ -f "${VLLM_LOG}" ]; then
tail -n 400 "${VLLM_LOG}"
else
echo "vLLM log not found: ${VLLM_LOG}"
fi
echo "::endgroup::"
- name: Inject GPU metadata into benchmark results
run: |
shopt -s nullglob
for f in "${RESULT_PREFIX}"-*.json; do
GPU_NAME="${{ steps.gpu-info.outputs.gpu_name }}" \
GPU_VRAM_GB="${{ steps.gpu-info.outputs.gpu_vram_gb }}" \
ROCM_VERSION="${{ steps.gpu-info.outputs.rocm_version }}" \
RESULT_PATH="$f" \
python3 -c "
import json, os
p = os.environ['RESULT_PATH']
with open(p) as f:
d = json.load(f)
d['gpu_name'] = os.environ.get('GPU_NAME', '')
d['gpu_vram_gb'] = int(os.environ.get('GPU_VRAM_GB') or 0)
d['rocm_version'] = os.environ.get('ROCM_VERSION', '')
with open(p, 'w') as f:
json.dump(d, f, indent=2)
"
done
- name: Validate benchmark result completeness
id: validate_benchmark_result
run: |
set -euo pipefail
RESULT_PATH="${RESULT_FILENAME}.json"
RESULT_PATH="${RESULT_PATH}" MODEL_NAME="${MODEL_NAME}" python3 - <<'PY'
import json
import os
import sys
result_path = os.environ["RESULT_PATH"]
model_name = os.environ["MODEL_NAME"]
if not os.path.exists(result_path):
print(
f"::error::Benchmark result file {result_path} was not generated for {model_name}.",
file=sys.stderr,
)
sys.exit(1)
try:
with open(result_path, encoding="utf-8") as f:
data = json.load(f)
except (OSError, ValueError, json.JSONDecodeError) as exc:
print(
f"::error::Failed to read benchmark result file {result_path}: {exc}",
file=sys.stderr,
)
sys.exit(1)
num_prompts = data.get("num_prompts")
completed = data.get("completed")
try:
num_prompts = int(num_prompts)
completed = int(completed)
except (TypeError, ValueError):
print(
f"::error::Invalid benchmark result in {result_path}: "
f"num_prompts={num_prompts!r}, completed={completed!r}.",
file=sys.stderr,
)
sys.exit(1)
if completed != num_prompts:
print(
f"::error::Invalid benchmark result in {result_path}: "
f"successful requests ({completed}) did not match num_prompts ({num_prompts}). "
"Skipping artifact upload and dashboard publishing.",
file=sys.stderr,
)
sys.exit(1)
print(
f"Validated benchmark result for {model_name}: "
f"successful requests ({completed}) matched num_prompts ({num_prompts})."
)
PY
- name: Upload benchmark artifacts
if: always() && steps.validate_benchmark_result.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: oot-benchmark-${{ env.RESULT_FILENAME }}
if-no-files-found: warn
path: |
${{ env.RESULT_FILENAME }}.json
${{ env.RESULT_FILENAME }}.client.log
${{ env.RESULT_FILENAME }}.vllm.log
- name: Clean up OOT benchmark container
if: always()
run: |
$CONTAINER_ENGINE exec "$CONTAINER_NAME" bash -lc "if [ -f /tmp/vllm_oot.pid ]; then kill \$(cat /tmp/vllm_oot.pid) || true; fi" || true
$CONTAINER_ENGINE stop "$CONTAINER_NAME" || true
$CONTAINER_ENGINE rm "$CONTAINER_NAME" || true
if [[ "${OOT_IMAGE_SOURCE}" == "rebuild" ]]; then
$CONTAINER_ENGINE rmi "${OOT_IMAGE_REF:-${OOT_IMAGE_TAG}}" || true
else
echo "Keeping prebuilt OOT image cached on runner: ${OOT_IMAGE_TAG}"
fi
summarize-benchmark-result:
if: >-
always()
&& needs.resolve-atom-source.result == 'success'
&& needs.build-benchmark-matrix.result == 'success'
&& needs.build-benchmark-matrix.outputs.has_benchmark_cells == 'true'
name: Summarize OOT benchmark result
needs: [resolve-atom-source, build-benchmark-matrix, benchmark]
runs-on: ubuntu-latest
steps:
- name: Checkout ATOM repo
uses: actions/checkout@v6
- name: Download all benchmark results
uses: actions/download-artifact@v8
with:
pattern: 'oot-benchmark-*'
merge-multiple: true
path: .
continue-on-error: true
- name: Count downloaded benchmark results
id: downloaded
run: |
shopt -s nullglob
json_files=(*.json)
echo "downloaded_count=${#json_files[@]}" >> "$GITHUB_OUTPUT"
printf 'Downloaded %s benchmark result files\n' "${#json_files[@]}"
- name: Note summary behavior
run: |
printf '### Summary mode\nResults from `%s@%s` using `%s` OOT image mode are shown below as a workflow summary table.\n- Benchmark client: `%s`\n- Upload to dashboard: `%s`\n- Upload to custom dashboard: `%s`\n' \
"${{ needs.resolve-atom-source.outputs.atom_repository }}" \
"${{ needs.resolve-atom-source.outputs.atom_ref }}" \
"${{ needs.resolve-atom-source.outputs.oot_image_source }}" \
"${{ needs.resolve-atom-source.outputs.benchmark_client }}" \
"${{ needs.resolve-atom-source.outputs.publish_to_dashboard }}" \
"${{ needs.resolve-atom-source.outputs.upload_to_custom_dashboard }}" >> "$GITHUB_STEP_SUMMARY"
if [[ "${{ needs.resolve-atom-source.outputs.publish_to_dashboard }}" == "true" ]]; then
printf '\nDashboard upload is enabled for this run, so this final Ubuntu summary job also reconciles the completed run for regression comparison and publishes dashboard data.\n' \
>> "$GITHUB_STEP_SUMMARY"
else
printf '\nDashboard upload is disabled for this run.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
if [[ "${{ needs.resolve-atom-source.outputs.upload_to_custom_dashboard }}" == "true" ]]; then
printf 'LLM-Booster dashboard publish is enabled for this run.\n' \
>> "$GITHUB_STEP_SUMMARY"
else
printf 'LLM-Booster dashboard publish is disabled for this run.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
- name: Generate OOT benchmark summary table
env:
BENCHMARK_MATRIX: ${{ needs.build-benchmark-matrix.outputs.benchmark_matrix }}
RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
python3 .github/scripts/plugin_benchmark_summary.py \
--result-dir . \
--matrix-json "${BENCHMARK_MATRIX}" \
--run-url "${RUN_URL}" \
--output-json oot_benchmark_summary.json \
--title "ATOM-vLLM Benchmark Summary" \
>> "$GITHUB_STEP_SUMMARY"
- name: Read summary stats
id: summary-stats
run: |
PASSED_CASES=$(python3 -c "import json; print(json.load(open('oot_benchmark_summary.json', encoding='utf-8'))['passed_cases'])")
FAILED_CASES=$(python3 -c "import json; print(json.load(open('oot_benchmark_summary.json', encoding='utf-8'))['failed_cases'])")
echo "passed_cases=${PASSED_CASES}" >> "$GITHUB_OUTPUT"
echo "failed_cases=${FAILED_CASES}" >> "$GITHUB_OUTPUT"
echo "Summary stats: passed=${PASSED_CASES}, failed=${FAILED_CASES}"
- name: Upload OOT benchmark summary artifact
uses: actions/upload-artifact@v7
with:
name: oot-benchmark-summary
path: oot_benchmark_summary.json
- name: Note skipped LLM-Booster dashboard publish
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases == '0'
run: |
printf '\nNo successful benchmark result JSONs were produced, so LLM-Booster dashboard publish was skipped.\n' \
>> "$GITHUB_STEP_SUMMARY"
- name: Check LLM-Booster deploy key
id: llmbooster-key
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
env:
LLM_BOOSTER_DEPLOY_KEY: ${{ secrets.LLM_BOOSTER_DEPLOY_KEY }}
run: |
if [[ -n "${LLM_BOOSTER_DEPLOY_KEY}" ]]; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
echo "::warning::LLM_BOOSTER_DEPLOY_KEY is not configured; skipping LLM-Booster dashboard publish."
printf '\nLLM-Booster dashboard publish skipped because secret `LLM_BOOSTER_DEPLOY_KEY` is not configured.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
- name: Checkout LLM-Booster dashboard repo
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0' && steps.llmbooster-key.outputs.available == 'true'
uses: actions/checkout@v6
with:
repository: ROCm/LLM-Booster
ref: main
path: llm-booster-repo
ssh-key: ${{ secrets.LLM_BOOSTER_DEPLOY_KEY }}
fetch-depth: 1
- name: Build LLM-Booster dashboard files
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0' && steps.llmbooster-key.outputs.available == 'true'
env:
RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
ATOM_SOURCE_REPOSITORY: ${{ needs.resolve-atom-source.outputs.atom_repository }}
ATOM_SOURCE_REF: ${{ needs.resolve-atom-source.outputs.atom_ref }}
OOT_IMAGE_SOURCE: ${{ needs.resolve-atom-source.outputs.oot_image_source }}
BENCHMARK_CLIENT: ${{ needs.resolve-atom-source.outputs.benchmark_client }}
run: |
python3 - <<'PY'
import json
import os
import re
import sys
import time
from collections import defaultdict
from datetime import datetime, timezone
from pathlib import Path
root = Path(".")
llm_booster_dashboard = root / "llm-booster-repo" / "dashboard"
llm_booster_data_dir = llm_booster_dashboard / "data" / "vllm-atom"
llm_booster_data_dir.mkdir(parents=True, exist_ok=True)
sys.path.insert(0, str(llm_booster_dashboard))
from update_data import index_root_for, rebuild_index # noqa: E402
catalog = json.loads(
(root / ".github" / "benchmark" / "oot_benchmark_models.json").read_text(
encoding="utf-8"
)
)
def slugify(text: str) -> str:
return re.sub(r"[^a-z0-9]+", "-", text.lower()).strip("-") or "unknown"
def precision_from_model(model: str):
upper = model.upper()
if "MXFP4" in upper or "FP4" in upper:
return "fp4"
if "FP8" in upper:
return "fp8"
return None
def model_name_for_variant(variant: dict) -> str:
if variant.get("dashboard_model"):
return str(variant["dashboard_model"])
display = str(variant["display"])
return display.replace(" TP", "-tp").replace(" ", "-")
prefix_map = {}
for family in catalog["families"]:
base = {k: v for k, v in family.items() if k not in {"choice_label", "variants"}}
for variant in family["variants"]:
item = dict(base)
item.update(variant)
prefix_map[str(variant["prefix"])] = item
def parse_result_filename(path: Path):
stem = path.stem
prefix, isl, osl, concurrency, ratio = stem.rsplit("-", 4)
return prefix, int(isl), int(osl), int(concurrency), float(ratio) if ratio else 0.0
default_benchmark_client = os.environ["BENCHMARK_CLIENT"]
def resolve_client(payload):
bc = str(payload.get("benchmark_client", default_benchmark_client))
slug = "vllmbench" if bc == "vLLM bench" else "inferencemax"
label = "vllm bench" if bc == "vLLM bench" else "inferencemax"
return slug, label
grouped = defaultdict(list)
for path in sorted(root.glob("*.json")):
if path.name in {"oot_benchmark_summary.json", "regression_report.json"}:
continue
try:
payload = json.loads(path.read_text(encoding="utf-8"))
except (OSError, UnicodeDecodeError, json.JSONDecodeError):
continue
if "output_throughput" not in payload:
continue
custom_dashboard_flag = str(
payload.get("custom_dashboard_publish_allowed", True)
).strip().lower()
if custom_dashboard_flag in {"0", "false", "no"}:
continue
prefix, isl, osl, concurrency, ratio = parse_result_filename(path)
variant = prefix_map.get(prefix)
if variant is None:
raise SystemExit(f"Unknown benchmark prefix in result file {path.name}: {prefix}")
model = model_name_for_variant(variant)
precision = precision_from_model(model)
atom_source_sha = str(payload.get("atom_source_sha", "")) or "unknown"
sha7 = atom_source_sha[:7] if atom_source_sha else "unknown"
day = time.strftime("%Y-%m-%d", time.gmtime())
client_slug, _ = resolve_client(payload)
grouped[(day, sha7, model, isl, osl, client_slug)].append((path, payload, precision, concurrency, ratio))
written_files = set()
for (day, sha7, model, isl, osl, client_slug), entries in sorted(grouped.items()):
entries.sort(key=lambda item: (item[3], item[4]))
client_label = "vllm bench" if client_slug == "vllmbench" else "inferencemax"
timestamp_ms = int(time.time() * 1000)
precision = entries[0][2]
first_payload = entries[0][1]
tp = first_payload.get("tensor_parallel_size")
tp_label = f"_tp{int(tp)}" if tp not in (None, "", 0) else ""
model_slug = slugify(model)
run_id = (
f"atom_vllm_{day.replace('-', '')}_{model_slug}_isl{isl}_osl{osl}_"
f"{sha7}_{os.environ['GITHUB_RUN_ID']}_{client_slug}"
)
config_label = f"atom-vllm_{model_slug}"
if precision:
config_label += f"_{precision}"
if tp not in (None, "", 0):
config_label += tp_label
if client_slug == "inferencemax":
config_label += "_inferencemax"
points = []
for _, payload, precision, concurrency, ratio in entries:
output_tput = payload.get("output_throughput")
total_tput = payload.get("total_token_throughput")
total_gpu = payload.get("tensor_parallel_size")
try:
total_gpu = int(total_gpu) if total_gpu is not None else None
except (TypeError, ValueError):
total_gpu = None
points.append(
{
"isl": isl,
"osl": osl,
"concurrency": concurrency,
"ratio": ratio,
"client_bench": client_label,
"ttft_ms": payload.get("mean_ttft_ms"),
"ttft_p99": payload.get("p99_ttft_ms"),
"tpot_ms": payload.get("mean_tpot_ms"),
"tpot_p99": payload.get("p99_tpot_ms"),
"itl_ms": payload.get("mean_itl_ms"),
"e2el_ms": payload.get("mean_e2el_ms"),
"interactivity": (output_tput / concurrency) if output_tput and concurrency else None,
"tput_per_gpu": (total_tput / total_gpu) if total_tput and total_gpu else None,
"output_tput_per_gpu": (output_tput / total_gpu) if output_tput and total_gpu else None,
"input_tput_per_gpu": None,
"output_tput": output_tput,
"total_tput": total_tput,
"req_tput": payload.get("request_throughput"),
"completed": payload.get("completed"),
"duration": payload.get("duration"),
"num_prompts": payload.get("num_prompts"),
"prefill_tp": None,
"decode_tp": None,
"tensor_parallel_size": total_gpu,
"num_prefill_gpu": None,
"num_decode_gpu": None,
"total_gpu": total_gpu,
"gpu_name": payload.get("gpu_name"),
"image": payload.get("oot_image_tag") or payload.get("docker_image"),
"rocm": payload.get("rocm_version"),
"run_url": os.environ["RUN_URL"],
"model_path": payload.get("model_id"),
"point_date": day,
"precision": precision,
"hardware": "mi355x",
}
)
run = {
"run_id": run_id,
"date": day,
"timestamp": timestamp_ms,
"model": model,
"backend": "vLLM-ATOM",
"config_label": config_label,
"precision": precision,
"source": "ATOM Dashboard",
"client_bench": client_label,
"hardware": "mi355x",
"commit": {
"id": first_payload.get("atom_source_sha"),
"message": f"ATOM benchmark run {os.environ['GITHUB_RUN_ID']}",
"timestamp": datetime.now(timezone.utc).isoformat(),
"url": f"https://github.com/{os.environ['ATOM_SOURCE_REPOSITORY']}/commit/{first_payload.get('atom_source_sha', '')}",
"author": {},
"committer": {},
},
"points": points,
"gsm8k": None,
}
run_file = llm_booster_data_dir / f"{run_id}.json"
run_file.write_text(json.dumps(run, indent=2) + "\n", encoding="utf-8")
written_files.add(run_file)
rebuild_index(index_root_for(llm_booster_data_dir))
print(f"Wrote {len(written_files)} LLM-Booster ATOM vLLM run files.")
PY
- name: Upload LLM-Booster dashboard preview artifact
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0' && steps.llmbooster-key.outputs.available == 'true'
uses: actions/upload-artifact@v7
with:
name: oot-benchmark-llm-booster-preview
path: |
llm-booster-repo/dashboard/data/index.json
llm-booster-repo/dashboard/data/vllm-atom/*.json
- name: Push LLM-Booster dashboard data
if: needs.resolve-atom-source.outputs.upload_to_custom_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0' && steps.llmbooster-key.outputs.available == 'true'
working-directory: llm-booster-repo
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
run: |
git add dashboard/data/index.json dashboard/data/vllm-atom
if git diff --cached --quiet; then
echo "No LLM-Booster dashboard data changes to push."
exit 0
fi
git commit -m "Update ATOM vLLM benchmark dashboard data"
git push origin HEAD:main
- name: Download baseline from previous successful main run
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
id: baseline
env:
GH_TOKEN: ${{ github.token }}
run: |
mapfile -t CANDIDATE_RUN_IDS < <(
{
gh run list \
--workflow="ATOM vLLM Benchmark" \
--branch=main \
--event=workflow_dispatch \
--status=success \
--limit=10 \
--json databaseId \
--jq '.[].databaseId // empty' || true
}
)
BASELINE_DIR=""
for PREV_RUN_ID in "${CANDIDATE_RUN_IDS[@]}"; do
if [ -z "$PREV_RUN_ID" ] || [ "$PREV_RUN_ID" = "${{ github.run_id }}" ]; then
continue
fi
echo "Checking baseline candidate run #$PREV_RUN_ID"
rm -rf /tmp/baseline_candidate /tmp/baseline
mkdir -p /tmp/baseline_candidate
if ! gh run download "$PREV_RUN_ID" --dir /tmp/baseline_candidate; then
echo "::warning::Failed to download baseline artifacts from run #$PREV_RUN_ID"
continue
fi
if python3 .github/scripts/plugin_benchmark_validate_baseline.py /tmp/baseline_candidate; then
mv /tmp/baseline_candidate /tmp/baseline
BASELINE_DIR="/tmp/baseline"
echo "Using baseline from run #$PREV_RUN_ID"
break
fi
echo "Skipping run #$PREV_RUN_ID because it is not a dashboard-eligible baseline."
done
echo "baseline_dir=${BASELINE_DIR}" >> "$GITHUB_OUTPUT"
- name: Note skipped dashboard processing
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases == '0'
run: |
printf '\nNo successful benchmark result JSONs were produced, so regression comparison and dashboard upload were skipped.\n' \
>> "$GITHUB_STEP_SUMMARY"
- name: Summarize regression against baseline
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
id: check-regression
run: |
BASELINE_ARG=""
if [ -n "${{ steps.baseline.outputs.baseline_dir }}" ]; then
BASELINE_ARG="--baseline-dir ${{ steps.baseline.outputs.baseline_dir }}"
else
printf '\nNo eligible baseline run was found. Showing current successful results without regression deltas.\n' \
>> "$GITHUB_STEP_SUMMARY"
fi
python3 .github/scripts/plugin_benchmark_regression.py \
--result-dir . \
$BASELINE_ARG \
--output-json regression_report.json \
>> "$GITHUB_STEP_SUMMARY" || true
if [ -f regression_report.json ]; then
REG_COUNT=$(python3 -c "import json; print(json.load(open('regression_report.json', encoding='utf-8'))['regression_count'])")
if [ "$REG_COUNT" -gt 0 ]; then
echo "has_regression=true" >> "$GITHUB_OUTPUT"
else
echo "has_regression=false" >> "$GITHUB_OUTPUT"
fi
else
echo "has_regression=false" >> "$GITHUB_OUTPUT"
fi
- name: Upload regression report
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0' && steps.check-regression.outputs.has_regression == 'true'
uses: actions/upload-artifact@v7
with:
name: oot-benchmark-regression-report
path: regression_report.json
- name: Transform results for benchmark dashboard
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
run: |
python3 .github/scripts/plugin_benchmark_to_dashboard.py \
. \
--output benchmark-action-input.json \
--run-url "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--default-backend "ATOM-vLLM"
- name: Store benchmark result to dashboard
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
uses: benchmark-action/github-action-benchmark@v1
with:
tool: customBiggerIsBetter
output-file-path: benchmark-action-input.json
gh-pages-branch: gh-pages
benchmark-data-dir-path: benchmark-dashboard
auto-push: false
alert-threshold: "80%"
comment-on-alert: true
fail-on-alert: false
max-items-in-chart: 90
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Push dashboard data to gh-pages
if: needs.resolve-atom-source.outputs.publish_to_dashboard == 'true' && steps.summary-stats.outputs.passed_cases != '0'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin gh-pages
git checkout gh-pages
if [ ! -f benchmark-dashboard/data.js ]; then
echo "::error::benchmark-dashboard/data.js was not produced by github-action-benchmark"
exit 1
fi
cp benchmark-dashboard/data.js /tmp/oot-benchmark-data.js
# Rebuild the publish branch from origin/gh-pages so only dashboard data is updated.
git checkout -B gh-pages-data-only origin/gh-pages
mkdir -p benchmark-dashboard
cp /tmp/oot-benchmark-data.js benchmark-dashboard/data.js
git add benchmark-dashboard/data.js
git diff --cached --quiet || git commit -m "Update OOT benchmark dashboard data"
git push origin HEAD:gh-pages