Skip to content
Merged

update #2944

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
a34234d
CI: surface runner-config mapping in AMD CI job monitor (#2711)
gyohuangxin Apr 13, 2026
2446746
CI: auto-update split test FILE_TIMES (#2709)
github-actions[bot] Apr 13, 2026
222b655
CI: add standalone OPUS test workflow (#2716)
gyohuangxin Apr 13, 2026
842a164
add signature and refine lru cache (#2710)
solinzby1 Apr 13, 2026
655d944
CI: separate Aiter Test concurrency for push and schedule (#2718)
gyohuangxin Apr 13, 2026
0f6aede
fix split module jit and retune (#2719)
lalala-sh Apr 13, 2026
1a8fb17
[TRITON] Prevent NUM_KSPLIT from reducing K dim below GROUP_K (#2661)
vgokhale Apr 13, 2026
b633fba
CI: Enable Deepseek ATOM tests on MI35X (#2667)
gyohuangxin Apr 13, 2026
857f4d1
feat: _flash_attn_forward add out args (#2648)
RuibinCheung Apr 14, 2026
d87e599
Replace CK/CK_TILE in MLA Reduce and Metadata Kernel with OPUS (#2717)
ruanjm Apr 14, 2026
bbdc066
docs: add ISA-level kernel optimization guide (#2708)
sunway513 Apr 14, 2026
303a583
Add run_config and compare in tuner (#2375)
yzhou103 Apr 14, 2026
d098ae5
Revert "fix(car): craph capture err (#2638)" (#2735)
TennyWang1223 Apr 14, 2026
7eeb950
[TRITON] Swiglu and reduce refactor (#2583)
nsusanto Apr 14, 2026
9a9f684
[aiter] type hints mismatch (#2728)
amd-ruitang3 Apr 15, 2026
6107fd6
fix: silence false warning in fmha_fwd_v3 when use_asm_v3 is disabled…
suachong Apr 15, 2026
e2ab304
Add FlyDSL GEMM AOT precompile support (#2741)
zhiding512 Apr 15, 2026
267a450
gather support qk_nope_head_dim != v_head_dim (#2739)
jiayyu Apr 15, 2026
47b0966
feat: add/retune BF16 GEMM configs with FlyDSL backend for 6 models (…
sunway513 Apr 15, 2026
f326553
Hoist introspection out of per-call ctype dispatch (#2742)
gronsti-amd Apr 15, 2026
daa8e94
Make FlyDSL LDS checks architecture-aware and reduce tuner failure no…
yzhou103 Apr 15, 2026
70c2030
16x256 kernel (#2722)
JohnNikolay84 Apr 15, 2026
fde73e1
rebase linear attn for new flydsl version (#2746)
xytpai Apr 15, 2026
016ead3
Replace unsafe uses of std::unordered_map with SynchronizedCache (#2221)
draganmladjenovic Apr 15, 2026
954c837
Fix Triton MoE GEMM shared memory exhaustion by reducing stage count …
nidal567 Apr 15, 2026
a4e9890
Annotate moe_sorting_dispatch_policy as int for fused_moe (#2639)
nholmber Apr 16, 2026
c70476c
fix moe splitk aot and jit (#2738)
lalala-sh Apr 16, 2026
0e34d8d
Update quant.pyfix: add pack_dim to per_1x32_f4_quant for tl.dot_scal…
GeisYaO Apr 16, 2026
8090820
Flydsl align if else usage to be compatible with all versions (#2740)
xudoyuan Apr 16, 2026
c849fd5
Add bf16 MLA decode kernel for gqa_ratio=64, qseqlen=1 (non-persisten…
fangche123 Apr 16, 2026
c7bed71
CI: scope check signal artifact downloads to matching run (#2757)
gyohuangxin Apr 16, 2026
0b69f6b
feat: aiter whls nightly (#2514)
kiran-thumma Apr 16, 2026
caca38c
CI: reduce retention for workflow artifacts (#2758)
gyohuangxin Apr 16, 2026
da90169
CI: upgrade sglang downstream to v0.5.10 (#2753)
gyohuangxin Apr 16, 2026
fab6ef3
fix(car): sglang prefill launch error kernel (#2745)
TennyWang1223 Apr 16, 2026
4c3db2c
Add unified attention support to bench_models (#2724)
lucas-santos-amd Apr 16, 2026
4211777
Use AITER_CONFIGS for FlyDSL AOT defaults (#2756)
zhiding512 Apr 16, 2026
1bbd58c
fix fused_dynamic_mxfp4_quant_moe_sort_hip err in EP (#2759)
junhaha666 Apr 16, 2026
cba1303
Fix `test_moe_routing_sigmoid_top1_fused` reference implementation ti…
brunomazzottiamd Apr 16, 2026
ad68fe0
[fix](cache): add eps to avoid diving zero (#2763)
PerryZhang01 Apr 16, 2026
e991be1
[FlyDSL MOE] update a8w4 moe (#2726)
Zzz9990 Apr 16, 2026
fea695b
MI350 mla ps mode suppport nhead128,1 128,2 128,3 128,4 64,4 64,2 32,…
minmengdie Apr 17, 2026
3e8a773
update config (#2771)
lalala-sh Apr 17, 2026
727253a
fix(ck_gemm): fix multi-arch build targeting and kernel dispatch acro…
eppaneamd Apr 17, 2026
67f3217
add triton fallback for mi455 gptoss & dsfp4 (#2657)
HaonanWang98 Apr 17, 2026
73ad002
fix recompile issue (#2777)
xytpai Apr 17, 2026
1bcab14
Fix fused_gemm_a8w8_blockscale_a16w16 unit test failures (#2766)
nidal567 Apr 17, 2026
cf12b13
walkaround invalid kernels in moe tunner (#2785)
lalala-sh Apr 18, 2026
afddcbf
CI: auto-update split test FILE_TIMES (#2795)
github-actions[bot] Apr 20, 2026
0dad434
[fix] remove glm5 triton tuned gemm (#2803)
HaonanWang98 Apr 20, 2026
d3a1e52
add tuned bf16 gemm for qwen3next and qwen3.5 (#2799)
ganyi1996ppo Apr 20, 2026
c5e14ff
[Perf][WIP]update qwen fmoe tuned configs (#2812)
lalala-sh Apr 20, 2026
a3f54e3
CI: run SGLang downstream tests on MI355 (#2807)
gyohuangxin Apr 20, 2026
e3225be
CI: allow nightly check-signal to reuse Checks push runs (#2819)
gyohuangxin Apr 20, 2026
8830d77
[fix] fix compare error (#2805)
yzhou103 Apr 21, 2026
207cd7d
CI: log in to Docker before building aiter image (#2824)
gyohuangxin Apr 21, 2026
02fb8fa
[FLYDSL]: aiter flydsl if const_expr (#2776)
xudoyuan Apr 21, 2026
6792cbf
add tuner test suite (#2734)
yzhou103 Apr 21, 2026
fb770f7
fix lse address compute (#2810)
JaxChen29 Apr 21, 2026
5408edb
Add vcs_versioning as transitive dependency of setuptools_scm>=10 (#2…
kurapov-peter Apr 21, 2026
e19bda6
Revert kimi2.5 fp4 tp4 moe tuned result on bs 32,64 (#2836)
junhaha666 Apr 21, 2026
58ee7e9
remove gemm tuning (#2838)
ganyi1996ppo Apr 21, 2026
7890e4b
disable import flydsl_gdr_decode (#2840)
valarLip Apr 21, 2026
ca33757
Xiaobing/gptoss small m (#2775)
XiaobingSuper Apr 22, 2026
0630232
[CK_TILE] Fix bpreshuffle compile failure due to stale CShuffleEpilog…
DDEle Apr 22, 2026
e60583c
update flydsl version (#2802)
coderfeli Apr 22, 2026
79a0593
CI: fix pre-check signal artifact lookup for PR reruns (#2848)
gyohuangxin Apr 22, 2026
6890159
[Fix]fix moe tunner (#2831)
lalala-sh Apr 22, 2026
95ea3b7
CI: To fix prebuild image issue (#2847)
gyohuangxin Apr 22, 2026
f8a0971
Fix a8w8 flydsl tune (#2809)
solinzby1 Apr 22, 2026
65d737f
fix other lse addr compute issue (#2833)
JaxChen29 Apr 22, 2026
6f72b96
CI: align tuning test workflow with README (#2849)
gyohuangxin Apr 22, 2026
bf4cd5b
gqa ratio support in mha test (#2798)
slippedJim Apr 22, 2026
0814370
ci(release): add manylinux2_28+ROCm builder path with auditwheel gate…
sunway513 Apr 22, 2026
27b9edb
add asm load kernel log (#2800)
yzhou103 Apr 22, 2026
6ac02c5
Update gfx942&gfx950 PA PS kernels and write stride_scale_page in asm…
fangche123 Apr 22, 2026
9522c04
clean code and reduce num_stages to 1 for large tile configs in fused…
nidal567 Apr 22, 2026
863d0e6
[TRITON] Add Gluon-optimized MoE Int8 SmoothQuant kernel for small K …
jwu10003 Apr 22, 2026
0f57b19
[TRITON] Reduce MHA UTs (#2612)
vgokhale Apr 22, 2026
5162472
Add gfx942 Triton A8W8 blockscale GEMM configs for GLM-5 shapes for 7…
amd-pedghazi Apr 22, 2026
09282b3
docs: polish README with ecosystem, news, and performance highlights …
carlushuang Apr 23, 2026
d72c1f9
make rmsnorm quant fusion support gemma (#2853)
ganyi1996ppo Apr 23, 2026
a16a677
ci(release): add torch_pin + torch_index_url inputs for ABI-targeted …
sunway513 Apr 23, 2026
23a0ae8
Revert "CI: run SGLang downstream tests on MI355" (#2873)
gyohuangxin Apr 23, 2026
375252a
ci: rename aiter MI300X runners (#2872)
gyohuangxin Apr 23, 2026
6f31a36
CI: raise atom-test accuracy step timeout to 90 minutes (#2876)
gyohuangxin Apr 23, 2026
6379a3f
Add torch in gemm a16w16 tune (#2860)
yzhou103 Apr 23, 2026
0f463f9
CI: run Triton workflow on MI35X only (#2871)
gyohuangxin Apr 23, 2026
e039817
MLA PS mode support nhead8,2 in MI308 (#2852)
minmengdie Apr 23, 2026
7c4cc6c
Merge pull request #2875 from ROCm/pensun/release-workflow-torch-pin
sunway513 Apr 23, 2026
cc31a1a
Dev/aot fix (#2856)
zhiding512 Apr 24, 2026
8432ff3
Update kimik2 FP4 tuned fMoE config (#2845)
okorzh-amd Apr 24, 2026
6b8ce4e
Fix sliding window mtp (#2829)
fsx950223 Apr 24, 2026
0f059ac
[DO NOT MERGE] CI TESTS (#2894)
gyohuangxin Apr 24, 2026
ed2db5e
CI: Temporarily running the build jobs on linux-aiter-mi300x-1 due to…
gyohuangxin Apr 24, 2026
4858b76
CI: Fix Aiter installation issues in sglang downstream test (#2897)
gyohuangxin Apr 24, 2026
f1f5e06
CI: add opt-in MI300X Triton jobs for PRs and main (#2883)
gyohuangxin Apr 24, 2026
5dda33b
Revert "CI: Temporarily running the aiter build on linux-aiter-mi300x…
gyohuangxin Apr 24, 2026
d9073af
add optimized prefill gdn kernels for qwen3_5 (#2686)
yiijin Apr 24, 2026
f4179e8
Introduce asm fmoe kernels that do not require bf16->fp8 quantization…
JohnNikolay84 Apr 24, 2026
2b2d1b7
Revert "Fix sliding window mtp (#2829)" (#2909)
PerryZhang01 Apr 24, 2026
2b042db
fix(fmha): support >4GB KV cache in batch prefill via runtime dispatc…
Jeff-Huang Apr 24, 2026
08f0e05
Fix top_k_per_row_prefill err when batched_token_numm > 4096 (#2901)
junhaha666 Apr 24, 2026
e50e721
retune a8w8_blockscale_bpreshuffle_gemm for MI308 (#2896)
chuanbowang2026 Apr 24, 2026
033d8b9
revert gptoss tuned config (#2904)
XiaobingSuper Apr 24, 2026
dcb0639
mHC: Optimize mhc_pre performance in small M (#2915)
junhaha666 Apr 25, 2026
059c778
fix(mha_bwd): pass independent strides for do in _bwd_preprocess (#2808)
RuibinCheung Apr 27, 2026
269357c
Fix batched_gemm_a8w8 correctness for ASYNC_COPY + gfx950 UT (#2867)
nidal567 Apr 27, 2026
dde1703
[Triton]: Add MoE a16w4 (#2770)
rahulbatra85 Apr 27, 2026
7dc3026
test(moe_2stage): add csv-driven mode covering model_configs fmoe csv…
zhiding512 Apr 28, 2026
8c27e66
fix mhc device (#2916)
valarLip Apr 28, 2026
b240286
CI: add standalone OPUS test workflow (#2928)
gyohuangxin Apr 28, 2026
f9880ea
CI: add docker login before ATOM base image pull (#2931)
gyohuangxin Apr 28, 2026
6a7df20
CI: Use build-only-aiter runner to build Triton wheels (#2934)
gyohuangxin Apr 28, 2026
d0f5f76
fea(car): support custom group device (#2703)
TennyWang1223 Apr 28, 2026
4de5759
[FLYDSL]: update version to 0.1.5.dev504, fix bug in if-else dynamic …
xudoyuan Apr 28, 2026
2a46a69
[CK] Add StreamLLM sink token support for batch_prefill pipeline (#2794)
LJ-underdog Apr 28, 2026
f6cfcfa
Set RNG seed in Triton tests (#2921)
brunomazzottiamd Apr 28, 2026
c1c65e6
[quant] refactor hip kernels (#2932)
amd-ruitang3 Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 12 additions & 4 deletions .github/runner-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# Used by frameworks-devops-dashboard to display GPU architecture
# Update this when runners are added/changed in CI workflows
runners:
aiter-1gpu-runner:
gpu_arch: MI325
linux-aiter-mi300x-1:
gpu_arch: MI300X
gpu_count: 1

aiter-8gpu-runner:
gpu_arch: MI325
linux-aiter-mi300x-8:
gpu_arch: MI300X
gpu_count: 8

linux-aiter-mi355-1:
Expand All @@ -17,3 +17,11 @@ runners:
linux-aiter-mi355-8:
gpu_arch: MI355
gpu_count: 8

linux-aiter-mi35x-1:
gpu_arch: MI35X
gpu_count: 1

linux-aiter-mi35x-8:
gpu_arch: MI35X
gpu_count: 8
178 changes: 152 additions & 26 deletions .github/scripts/check_signal.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,160 @@
#!/bin/bash

# This script attempts to download a pre-checks artifact from a GitHub workflow up to 5 times.
# If the artifact is found and the signal indicates success, the workflow continues.
# If the signal indicates failure, the workflow is skipped with details printed.
# If the artifact cannot be downloaded after all retries, the workflow exits with an error.

set -e

ARTIFACT_NAME="checks-signal-${GITHUB_SHA:-${1}}"
MAX_RETRIES=5

for i in $(seq 1 $MAX_RETRIES); do
echo "Attempt $i: Downloading artifact..."
if gh run download --name "$ARTIFACT_NAME"; then
if [ -f checks_signal.txt ]; then
echo "Artifact $ARTIFACT_NAME downloaded successfully."
SIGNAL=$(head -n 1 checks_signal.txt)
if [ "$SIGNAL" = "success" ]; then
echo "Pre-checks passed, continuing workflow."
exit 0
else
echo "Pre-checks failed, skipping workflow. Details:"
tail -n +2 checks_signal.txt
exit 78 # 78 = neutral/skip
# This script downloads the pre-checks artifact produced by the Checks workflow.
# It scopes artifact lookup to the matching workflow run for the current branch and
# head SHA, which avoids repo-wide artifact pagination and GitHub API rate limits.

set -euo pipefail

CHECKS_WORKFLOW_NAME="${CHECKS_WORKFLOW_NAME:-Checks}"
CHECKS_SIGNAL_ARTIFACT_PREFIX="${CHECKS_SIGNAL_ARTIFACT_PREFIX:-checks-signal}"
MAX_RETRIES="${MAX_RETRIES:-5}"
RETRY_INTERVAL_SECONDS="${RETRY_INTERVAL_SECONDS:-30}"
REPO="${GITHUB_REPOSITORY:-}"

get_target_branch() {
if [ -n "${GITHUB_HEAD_REF:-}" ]; then
printf '%s\n' "${GITHUB_HEAD_REF}"
return
fi

if [ -n "${GITHUB_REF_NAME:-}" ]; then
printf '%s\n' "${GITHUB_REF_NAME}"
return
fi

python3 - <<'PY'
import json
import os

event_path = os.environ.get("GITHUB_EVENT_PATH")
if event_path and os.path.exists(event_path):
with open(event_path, encoding="utf-8") as fh:
data = json.load(fh)
print(data.get("pull_request", {}).get("head", {}).get("ref", ""))
else:
print("")
PY
}

get_target_head_sha() {
case "${GITHUB_EVENT_NAME:-}" in
pull_request|pull_request_target)
python3 - <<'PY'
import json
import os

event_path = os.environ.get("GITHUB_EVENT_PATH")
if event_path and os.path.exists(event_path):
with open(event_path, encoding="utf-8") as fh:
data = json.load(fh)
print(data.get("pull_request", {}).get("head", {}).get("sha", ""))
else:
print("")
PY
;;
*)
printf '%s\n' "${GITHUB_SHA:-}"
;;
esac
}

find_checks_run_id() {
local target_branch target_head_sha
target_branch="$(get_target_branch)"
target_head_sha="$(get_target_head_sha)"

if [ -z "${REPO}" ]; then
echo "GITHUB_REPOSITORY is required to locate the Checks workflow run." >&2
return 1
fi

if [ -z "${target_head_sha}" ]; then
echo "Could not determine the target head SHA for the Checks workflow run." >&2
return 1
fi

local -a gh_args=(
run list
--repo "${REPO}"
--workflow "${CHECKS_WORKFLOW_NAME}"
--limit 20
--json databaseId,headSha,headBranch,event,createdAt,status
)

if [ -n "${target_branch}" ]; then
gh_args+=(--branch "${target_branch}")
fi

# Nightly workflows reuse the Checks result from the push run on the same SHA.
if [ -n "${GITHUB_EVENT_NAME:-}" ] && [ "${GITHUB_EVENT_NAME}" != "schedule" ]; then
gh_args+=(--event "${GITHUB_EVENT_NAME}")
fi

gh "${gh_args[@]}" \
--jq "(map(select(.headSha == \"${target_head_sha}\")) | first | .databaseId) // empty"
}

find_signal_artifact_name() {
local run_id="$1"

gh api "repos/${REPO}/actions/runs/${run_id}/artifacts" | python3 -c '
import json
import sys

prefix = sys.argv[1]
data = json.load(sys.stdin)

matching = sorted(
(
artifact
for artifact in data.get("artifacts", [])
if not artifact.get("expired")
and (
artifact.get("name") == prefix
or artifact.get("name", "").startswith(f"{prefix}-")
)
),
key=lambda artifact: artifact.get("created_at", ""),
)

print(matching[-1]["name"] if matching else "")
' "${CHECKS_SIGNAL_ARTIFACT_PREFIX}"
}

for i in $(seq 1 "${MAX_RETRIES}"); do
echo "Attempt ${i}: Locating ${CHECKS_WORKFLOW_NAME} workflow run..."
rm -f checks_signal.txt

RUN_ID="$(find_checks_run_id || true)"
if [ -n "${RUN_ID}" ]; then
ARTIFACT_NAME="$(find_signal_artifact_name "${RUN_ID}" || true)"
if [ -z "${ARTIFACT_NAME}" ]; then
echo "Attempt ${i}: No ${CHECKS_SIGNAL_ARTIFACT_PREFIX} artifact found in run ${RUN_ID} yet."
else
echo "Attempt ${i}: Downloading artifact '${ARTIFACT_NAME}' from run ${RUN_ID}..."
if gh run download "${RUN_ID}" --repo "${REPO}" --name "${ARTIFACT_NAME}"; then
if [ -f checks_signal.txt ]; then
echo "Artifact ${ARTIFACT_NAME} downloaded successfully."
SIGNAL="$(head -n 1 checks_signal.txt)"
if [ "${SIGNAL}" = "success" ]; then
echo "Pre-checks passed, continuing workflow."
exit 0
fi

echo "Pre-checks failed, skipping workflow. Details:"
tail -n +2 checks_signal.txt
exit 78 # 78 = neutral/skip
fi
fi
fi
else
echo "Attempt ${i}: Matching ${CHECKS_WORKFLOW_NAME} run not found yet."
fi
echo "Artifact not found, retrying in 30s..."
sleep 30

echo "Artifact not ready yet, retrying in ${RETRY_INTERVAL_SECONDS}s..."
sleep "${RETRY_INTERVAL_SECONDS}"
done

echo "Failed to download pre-checks artifact after $MAX_RETRIES attempts. Exiting workflow."
echo "Failed to download pre-checks artifact after ${MAX_RETRIES} attempts. Exiting workflow."
exit 1
148 changes: 148 additions & 0 deletions .github/scripts/generate_summary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#!/usr/bin/env python3
"""Generate GitHub Actions job summaries for Aiter CI.

Usage:
python3 .github/scripts/generate_summary.py build
python3 .github/scripts/generate_summary.py promote

Each mode reads its inputs from environment variables and appends
Markdown to $GITHUB_STEP_SUMMARY.
"""

import os
import sys
from pathlib import Path

DOMAIN_MAP = {
"nightlies": "rocm.frameworks-nightlies.amd.com",
"devreleases": "rocm.frameworks-devreleases.amd.com",
"prereleases": "rocm.frameworks-prereleases.amd.com",
"release": "rocm.frameworks.amd.com",
}


def _out(path: Path, line: str = "") -> None:
with open(path, "a") as f:
f.write(line + "\n")


def _table(path: Path, headers: list[str], rows: list[list[str]]) -> None:
_out(path, "| " + " | ".join(headers) + " |")
_out(path, "| " + " | ".join("---" for _ in headers) + " |")
for row in rows:
_out(path, "| " + " | ".join(row) + " |")
_out(path)


# ── Build summary ───────────────────────────────────────────────────────────


def _get_index_url(release_type: str, gpu_archs: str = "gfx942-gfx950") -> str | None:
domain = DOMAIN_MAP.get(release_type)
if not domain:
return None
return f"https://{domain}/whl/{gpu_archs}/"


def build_summary(summary: Path) -> None:
docker_image = os.environ.get("SUMMARY_DOCKER_IMAGE", "unknown")
python_version = os.environ.get("SUMMARY_PYTHON_VERSION", "unknown")
release_type = os.environ.get("SUMMARY_RELEASE_TYPE", "unknown")
gpu_archs = os.environ.get("SUMMARY_GPU_ARCHS", "unknown")
wheel_dir = os.environ.get("SUMMARY_WHEEL_DIR", "dist")
index_url = _get_index_url(release_type, gpu_archs.replace(";", "-"))

_out(summary, f"## Build Summary - Python {python_version}")
_out(summary)
rows = [
["Python version", f"`{python_version}`"],
["Docker image", f"`{docker_image}`"],
["Release type", f"`{release_type}`"],
["GPU architectures", f"`{gpu_archs}`"],
]
if index_url:
rows.append(["Index URL", index_url])
_table(summary, ["Item", "Value"], rows)

_out(summary, "### Wheels")
_out(summary, "```")
whl_dir = Path(wheel_dir)
wheels = sorted(whl_dir.glob("*.whl")) if whl_dir.is_dir() else []
if wheels:
for w in wheels:
size_mb = w.stat().st_size / (1024 * 1024)
_out(summary, f" {w.name} ({size_mb:.1f} MB)")
else:
_out(summary, " No wheels found")
_out(summary, "```")


# ── Promote summary ─────────────────────────────────────────────────────────


def promote_summary(summary: Path) -> None:
release_type = os.environ.get("SUMMARY_RELEASE_TYPE", "unknown")
s3_dest = os.environ.get("SUMMARY_S3_DEST", "")
wheel_names = os.environ.get("SUMMARY_WHEEL_NAMES", "").strip()

url_path = (
"/".join(s3_dest.split("/")[3:])
if s3_dest.startswith("s3://")
else "whl/gfx942-gfx950"
)
domain = DOMAIN_MAP.get(release_type)
index_url = f"https://{domain}/{url_path}/" if domain else None

_out(summary, "## Promote Summary")
_out(summary)
rows = [["Release type", f"`{release_type}`"]]
if index_url:
rows.append(["Index URL", index_url])
_table(summary, ["Item", "Value"], rows)

if wheel_names:
_out(summary, "### Promoted Wheels")
_out(summary, "```")
for whl in wheel_names.split():
_out(summary, f" {whl}")
_out(summary, "```")
_out(summary)

if index_url:
_out(summary, "### Install Instructions")
_out(summary)
_out(summary, "**Using pip:**")
_out(summary, "```bash")
_out(summary, f"pip install --extra-index-url {index_url} amd-aiter")
_out(summary, "```")
_out(summary)
_out(summary, "**Using uv:**")
_out(summary, "```bash")
_out(summary, f"uv pip install --extra-index-url {index_url} amd-aiter")
_out(summary, "```")
_out(summary)


# ── Main ────────────────────────────────────────────────────────────────────

MODES = {
"build": build_summary,
"promote": promote_summary,
}


def main() -> None:
if len(sys.argv) != 2 or sys.argv[1] not in MODES:
print(f"Usage: {sys.argv[0]} {{{','.join(MODES)}}}", file=sys.stderr)
sys.exit(1)

summary_path = os.environ.get("GITHUB_STEP_SUMMARY")
if not summary_path:
print("GITHUB_STEP_SUMMARY is not set", file=sys.stderr)
sys.exit(1)

MODES[sys.argv[1]](Path(summary_path))


if __name__ == "__main__":
main()
Loading
Loading