Repository navigation
1696 lines (1555 loc) · 77.8 KB
/
Copy pathatom-sglang-benchmark.yaml
File metadata and controls
1696 lines (1555 loc) · 77.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: ATOM SGLang Benchmark
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
schedule:
# Nightly at 23:00 Beijing time (15:00 UTC). MI308 runs Mon-Sat; MI355 tiers run Tue/Thu/Sat.
- cron: '0 15 * * 1,3,5' # Mon/Wed/Fri: MI308 only
- cron: '0 15 * * 2,4' # Tue/Thu: SGLang-OOB P0 + P1 on MI355, plus MI308
- cron: '0 15 * * 6' # Sat only: SGLang-OOB P0 + P1 + P2 on MI355, plus MI308
workflow_dispatch:
inputs:
benchmark_suite:
description: "Benchmark suite"
type: choice
options:
- SGLang-OOB
default: SGLang-OOB
model_mi355:
description: "Manual MI355 benchmark model selection"
required: false
type: choice
default: none
options:
- none
- all
- OOB_P0
- OOB_P1
- OOB_P2
- OOB_P0+OOB_P1
- DeepSeek-V4-Pro TP8
- DeepSeek-V4-Pro MTP1 TP8
- DeepSeek-V4-Pro MTP3 TP8
- DeepSeek-V4-Pro Prefix Cache TP8
- DeepSeek-V3.2 FP8 TP4
- DeepSeek-V3.2 FP8 TP4 DP4 EP4
- DeepSeek-V3.2 FP8 TP8
- DeepSeek-V3.2 FP8 TP8 DP8 EP8
- DeepSeek-R1 FP8 TP4
- DeepSeek-R1 FP8 TP8
- DeepSeek-R1 FP4 TP4
- DeepSeek-R1 FP4 TP4 DP4 EP4
- DeepSeek-R1 FP4 TP8
- DeepSeek-R1 FP4 TP8 EP8
- DeepSeek-R1 FP4 TP8 DP8 EP8
- DeepSeek-R1 FP4 TP8 MTP1
- DeepSeek-R1 FP4 TP8 MTP3
- DeepSeek-R1 FP4 MTP3 TP4 DP4 EP4
- DeepSeek-R1 FP4 MTP3 TP8 DP8 EP8
- Qwen3.5-397B-A17B-FP8 TP4
- Qwen3.5-397B-A17B-FP8 TP8
- Qwen3.8-2.4T-A95B-Quark-MXFP4 TP8
- Qwen3.8-Flash-Next-FP8 TP2
- GLM-5.1 FP8 TP8
- GLM-5.2 FP8 TP4
- GLM-5.2 FP8 TP4 PCP4
- GLM-5.2 FP4 TP4
- Kimi-K3 TP8
- GLM-5.2 FP4 TP4 MTP3
- MiniMax-M3-MXFP4 TP4
- MiniMax-M3-MXFP8 EAGLE3 TP4 MTP3
model_mi308:
description: "Manual MI308 benchmark model selection"
required: false
type: choice
default: none
options:
- none
- all
- MI308 Qwen3.5-397B-A17B-FP8 TP4
- MI308 Qwen3.5-397B-A17B-FP8 TP8
- MI308 Qwen3.5-35B-A3B-FP8 TP1
- MI308 Qwen3.5-35B-A3B-PTPC-FP8 TP1
- MI308 Qwen3.8-Flash-Next-FP8 TP2
- MI308 DeepSeek-V4-Flash
docker_image:
description: "Optional Docker image override."
type: string
default: ""
publish_to_dashboard:
description: "Upload SGLang-OOB results to the ATOM dashboard (off by default for manual runs; schedule always publishes)"
type: boolean
default: false
upload_to_custom_dashboard:
description: "Upload benchmark results to the LLM-Booster dashboard (off by default for manual runs)"
type: boolean
default: false
param_lists:
description: |
"Optional benchmark parameter lists.
Input as a single or multiple sets (comma-separated, semicolon between sets),
format: input_length,output_length,concurrency,random_range_ratio.
Leave empty to use workload_label defaults.
Example (single set): 1024,1024,64,0.8
Example (multiple sets): 1024,1024,64,0.8;2048,1024,32,0.7"
type: string
default: ""
jobs:
wait-for-scheduled-sglang-image:
name: Wait for scheduled SGLang Docker image
runs-on: ubuntu-latest
outputs:
scheduled_sglang_image: ${{ steps.wait.outputs.scheduled_sglang_image }}
scheduled_sglang_tag: ${{ steps.wait.outputs.scheduled_sglang_tag }}
scheduled_sglang_digest: ${{ steps.wait.outputs.scheduled_sglang_digest }}
scheduled_sglang_resolution: ${{ steps.wait.outputs.scheduled_sglang_resolution }}
steps:
- name: Checkout selected branch
uses: actions/checkout@v6
- name: Wait for today's SGLang nightly tag
id: wait
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
WAIT_FOR_SGLANG_IMAGE: ${{ github.event_name == 'schedule' && github.ref_name == 'main' && 'true' || 'false' }}
run: |
set -euo pipefail
if [[ "${WAIT_FOR_SGLANG_IMAGE}" != "true" ]]; then
echo "Not a scheduled main run; skipping SGLang nightly image wait."
{
echo "scheduled_sglang_image="
echo "scheduled_sglang_tag="
echo "scheduled_sglang_digest="
echo "scheduled_sglang_resolution="
} >> "$GITHUB_OUTPUT"
exit 0
fi
python3 - <<'PY'
import base64
import json
import os
import re
import sys
import time
from datetime import datetime, timedelta
from pathlib import Path
from urllib.error import HTTPError, URLError
from urllib.parse import quote, urlencode
from urllib.parse import urljoin
from urllib.request import Request, urlopen
from zoneinfo import ZoneInfo
repository = "rocm/atom-dev"
auth_url = "https://auth.docker.io/token"
registry_url = "https://registry-1.docker.io"
manifest_accept = ", ".join(
(
"application/vnd.oci.image.index.v1+json",
"application/vnd.docker.distribution.manifest.list.v2+json",
"application/vnd.oci.image.manifest.v1+json",
"application/vnd.docker.distribution.manifest.v2+json",
)
)
text = Path(".github/workflows/docker-release.yaml").read_text(encoding="utf-8")
version_match = re.search(r'^\s*SGLANG_VERSION:\s*"([^"]+)"', text, re.MULTILINE)
if not version_match:
raise SystemExit("Failed to read SGLANG_VERSION from .github/workflows/docker-release.yaml")
today_date = datetime.now(ZoneInfo("Asia/Shanghai")).date()
today = today_date.strftime("%Y%m%d")
version = version_match.group(1)
tag = f"sglang-v{version}-nightly_{today}"
nightly_pattern = re.compile(r"^sglang-v(?P<version>.+)-nightly_(?P<date>\d{8})$")
def request(url, *, headers=None):
req = Request(url, headers=headers or {})
with urlopen(req, timeout=30) as response:
return response.read(), response.headers
def get_token():
query = urlencode(
{
"service": "registry.docker.io",
"scope": f"repository:{repository}:pull",
}
)
headers = {"User-Agent": "ATOM SGLang Benchmark Image Gate/1.0"}
username = os.environ.get("DOCKER_USERNAME")
password = os.environ.get("DOCKER_PASSWORD")
if username and password:
creds = base64.b64encode(f"{username}:{password}".encode("utf-8")).decode("ascii")
headers["Authorization"] = f"Basic {creds}"
body, _ = request(f"{auth_url}?{query}", headers=headers)
token = json.loads(body.decode("utf-8")).get("token")
if not token:
raise RuntimeError(f"Registry token response did not include a token for {repository}")
return token
def get_digest(token, image_tag):
manifest_url = f"{registry_url}/v2/{repository}/manifests/{quote(image_tag, safe='')}"
_, headers = request(
manifest_url,
headers={
"Authorization": f"Bearer {token}",
"Accept": manifest_accept,
"User-Agent": "ATOM SGLang Benchmark Image Gate/1.0",
},
)
digest = headers.get("Docker-Content-Digest") or headers.get("docker-content-digest")
if not digest:
raise RuntimeError(f"Registry did not return Docker-Content-Digest for {repository}:{image_tag}")
return str(digest).strip()
def next_page_url(base_url, link_header):
if not link_header:
return None
for part in link_header.split(","):
match = re.match(r'\s*<([^>]+)>\s*;\s*rel="next"\s*', part)
if match:
return urljoin(base_url, match.group(1))
return None
def list_tags(token):
tags = []
url = f"{registry_url}/v2/{repository}/tags/list?n=1000"
while url:
body, headers = request(
url,
headers={
"Authorization": f"Bearer {token}",
"User-Agent": "ATOM SGLang Benchmark Image Gate/1.0",
},
)
payload = json.loads(body.decode("utf-8"))
tags.extend(payload.get("tags") or [])
url = next_page_url(url, headers.get("Link"))
return tags
def latest_recent_nightly_tag(token, max_age_days=1):
allowed_dates = {
(today_date - timedelta(days=offset)).strftime("%Y%m%d")
for offset in range(max_age_days + 1)
}
candidates = []
for candidate in list_tags(token):
match = nightly_pattern.match(candidate)
if not match:
continue
if match.group("version") != version:
continue
if match.group("date") not in allowed_dates:
continue
candidates.append(
(
match.group("date"),
candidate,
)
)
if not candidates:
allowed = ", ".join(sorted(allowed_dates))
raise RuntimeError(
f"No SGLang nightly tags for version {version} were found in {repository} "
f"within allowed dates: {allowed}"
)
return max(candidates)[1]
def write_selected_image(image_tag, digest, resolution):
image = f"{repository}:{image_tag}@{digest}"
output_path = os.environ["GITHUB_OUTPUT"]
with open(output_path, "a", encoding="utf-8") as fh:
fh.write(f"scheduled_sglang_image={image}\n")
fh.write(f"scheduled_sglang_tag={image_tag}\n")
fh.write(f"scheduled_sglang_digest={digest}\n")
fh.write(f"scheduled_sglang_resolution={resolution}\n")
with open(os.environ["GITHUB_STEP_SUMMARY"], "a", encoding="utf-8") as fh:
fh.write("### Scheduled SGLang image\n")
fh.write(f"- Image: `{image}`\n")
fh.write(f"- Tag: `{image_tag}`\n")
fh.write(f"- Digest: `{digest}`\n")
fh.write(f"- Resolution: `{resolution}`\n")
return image
token = get_token()
timeout_seconds = 2 * 60 * 60
interval_seconds = 5 * 60
deadline = time.monotonic() + timeout_seconds
last_error = ""
print(f"Waiting up to {timeout_seconds // 60} minutes for {repository}:{tag}")
while True:
try:
digest = get_digest(token, tag)
image = write_selected_image(tag, digest, "scheduled-nightly-tag")
print(f"Found scheduled SGLang image: {image}")
break
except HTTPError as exc:
last_error = f"HTTP {exc.code}"
if exc.code in (401, 403):
token = get_token()
elif exc.code != 404:
print(f"Warning: failed to check {repository}:{tag}: {last_error}", file=sys.stderr)
except (RuntimeError, URLError) as exc:
last_error = str(exc)
print(f"Warning: failed to check {repository}:{tag}: {last_error}", file=sys.stderr)
try:
fallback_tag = latest_recent_nightly_tag(token, max_age_days=1)
if fallback_tag != tag:
digest = get_digest(token, fallback_tag)
image = write_selected_image(fallback_tag, digest, "recent-nightly-tag")
print(
f"{repository}:{tag} is not available yet; "
f"using recent SGLang nightly image: {image}"
)
break
except (HTTPError, RuntimeError, URLError) as exc:
last_error = str(exc)
remaining = deadline - time.monotonic()
if remaining <= 0:
print(
f"Timed out waiting for scheduled SGLang image {repository}:{tag}. "
f"Falling back to a same-version nightly tag from today/yesterday. "
f"Last error: {last_error or 'not found'}"
)
fallback_tag = latest_recent_nightly_tag(token, max_age_days=1)
digest = get_digest(token, fallback_tag)
image = write_selected_image(fallback_tag, digest, "recent-nightly-tag")
print(f"Using latest recent SGLang image: {image}")
break
sleep_for = min(interval_seconds, remaining)
print(f"{repository}:{tag} is not available yet; retrying in {int(sleep_for)} seconds.")
time.sleep(sleep_for)
PY
resolve-atom-source:
name: Resolve ATOM benchmark source
needs: [wait-for-scheduled-sglang-image]
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_sglang_image: ${{ steps.resolve.outputs.rebuild_sglang_image }}
prebuilt_sglang_image: ${{ steps.resolve.outputs.prebuilt_sglang_image }}
selected_sglang_ref: ${{ steps.resolve.outputs.selected_sglang_ref }}
selected_sglang_version: ${{ steps.resolve.outputs.selected_sglang_version }}
sglang_base_image: ${{ steps.resolve.outputs.sglang_base_image }}
sglang_image_source: ${{ steps.resolve.outputs.sglang_image_source }}
publish_to_dashboard: ${{ steps.resolve.outputs.publish_to_dashboard }}
upload_to_custom_dashboard: ${{ steps.resolve.outputs.upload_to_custom_dashboard }}
workload_label: ${{ steps.resolve.outputs.workload_label }}
use_workspace_atom: ${{ steps.resolve.outputs.use_workspace_atom }}
steps:
- name: Checkout selected branch
uses: actions/checkout@v6
- name: Resolve benchmark source
id: resolve
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
INPUT_DOCKER_IMAGE: ${{ inputs.docker_image || '' }}
INPUT_PUBLISH_TO_DASHBOARD: ${{ inputs.publish_to_dashboard }}
INPUT_UPLOAD_TO_CUSTOM_DASHBOARD: ${{ inputs.upload_to_custom_dashboard }}
SCHEDULE_CRON: ${{ github.event.schedule || '' }}
SCHEDULED_SGLANG_IMAGE: ${{ needs.wait-for-scheduled-sglang-image.outputs.scheduled_sglang_image }}
SCHEDULED_SGLANG_TAG: ${{ needs.wait-for-scheduled-sglang-image.outputs.scheduled_sglang_tag }}
SCHEDULED_SGLANG_DIGEST: ${{ needs.wait-for-scheduled-sglang-image.outputs.scheduled_sglang_digest }}
SCHEDULED_SGLANG_RESOLUTION: ${{ needs.wait-for-scheduled-sglang-image.outputs.scheduled_sglang_resolution }}
run: |
set -euo pipefail
ATOM_REPOSITORY="${GITHUB_REPOSITORY}"
ATOM_REF="${GITHUB_REF_NAME}"
SGLANG_BASE_IMAGE="rocm/atom-dev:latest"
NORMALIZED_REF="${ATOM_REF#refs/heads/}"
NORMALIZED_REF="${NORMALIZED_REF#refs/tags/}"
PREBUILT_SGLANG_IMAGE=""
REBUILD_SGLANG_IMAGE=false
SGLANG_IMAGE_SOURCE="prebuilt"
USER_PROVIDED_SGLANG_IMAGE=false
USE_WORKSPACE_ATOM=true
RESOLVED_PREBUILT_ALIAS=""
RESOLVED_PREBUILT_DIGEST=""
PREBUILT_RESOLUTION_TYPE=""
RESOLVED_NIGHTLY_TAG=""
if [[ -n "${INPUT_DOCKER_IMAGE}" ]]; then
PREBUILT_SGLANG_IMAGE="${INPUT_DOCKER_IMAGE}"
SGLANG_IMAGE_SOURCE="user-provided"
USER_PROVIDED_SGLANG_IMAGE=true
elif [[ "${GITHUB_EVENT_NAME}" == "schedule" && "${NORMALIZED_REF}" == "main" && -n "${SCHEDULED_SGLANG_IMAGE}" ]]; then
PREBUILT_SGLANG_IMAGE="${SCHEDULED_SGLANG_IMAGE}"
SGLANG_IMAGE_SOURCE="prebuilt-scheduled-nightly"
USE_WORKSPACE_ATOM=false
RESOLVED_PREBUILT_ALIAS="rocm/atom-dev:${SCHEDULED_SGLANG_TAG}"
RESOLVED_PREBUILT_DIGEST="${SCHEDULED_SGLANG_DIGEST}"
PREBUILT_RESOLUTION_TYPE="${SCHEDULED_SGLANG_RESOLUTION:-scheduled-nightly-tag}"
RESOLVED_NIGHTLY_TAG="${SCHEDULED_SGLANG_TAG}"
elif [[ "${NORMALIZED_REF}" == "main" ]]; then
PREBUILT_SGLANG_IMAGE="rocm/atom-dev:sglang-latest"
SGLANG_IMAGE_SOURCE="prebuilt"
else
REBUILD_SGLANG_IMAGE=true
SGLANG_IMAGE_SOURCE="rebuild"
fi
WORKLOAD_LABEL="SGLang-OOB"
if [[ "${GITHUB_EVENT_NAME}" == "schedule" ]]; then
case "${SCHEDULE_CRON}" in
"0 15 * * 1,3,5"|"0 15 * * 2,4"|"0 15 * * 6") WORKLOAD_LABEL="SGLang-OOB" ;;
*) WORKLOAD_LABEL="SGLang-OOB" ;;
esac
fi
case "${WORKLOAD_LABEL}" in
SGLang-OOB) ;;
*)
echo "Unsupported workload_label: ${WORKLOAD_LABEL}. Expected SGLang-OOB."
exit 1
;;
esac
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
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*SGLANG_REF:\s*"([^"]+)"', text, re.MULTILINE)
version_match = re.search(r'^\s*SGLANG_VERSION:\s*"([^"]+)"', text, re.MULTILINE)
if not commit_match or not version_match:
raise SystemExit("Failed to read SGLANG_REF/SGLANG_VERSION from .github/workflows/docker-release.yaml")
print(commit_match.group(1))
print(version_match.group(1))
PY
)
SELECTED_SGLANG_REF="${VLLM_META[0]}"
SELECTED_SGLANG_VERSION="${VLLM_META[1]}"
if [[ "${SGLANG_IMAGE_SOURCE}" == "prebuilt" ]]; then
if RESOLUTION_JSON="$(
python3 .github/scripts/resolve_atom_image.py \
--repository rocm/atom-dev \
--reference-tag sglang-latest \
--preferred-version "${SELECTED_SGLANG_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_SGLANG_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 rocm/atom-dev:sglang-latest to an immutable digest; falling back to the floating tag."
PREBUILT_SGLANG_IMAGE="rocm/atom-dev:sglang-latest"
RESOLVED_PREBUILT_ALIAS="rocm/atom-dev:sglang-latest"
PREBUILT_RESOLUTION_TYPE="resolution-failed"
fi
fi
{
echo "atom_repository=${ATOM_REPOSITORY}"
echo "atom_ref=${ATOM_REF}"
echo "normalized_ref=${NORMALIZED_REF}"
echo "rebuild_sglang_image=${REBUILD_SGLANG_IMAGE}"
echo "prebuilt_sglang_image=${PREBUILT_SGLANG_IMAGE}"
echo "selected_sglang_ref=${SELECTED_SGLANG_REF}"
echo "selected_sglang_version=${SELECTED_SGLANG_VERSION}"
echo "sglang_base_image=${SGLANG_BASE_IMAGE}"
echo "sglang_image_source=${SGLANG_IMAGE_SOURCE}"
echo "publish_to_dashboard=${PUBLISH_TO_DASHBOARD}"
echo "upload_to_custom_dashboard=${UPLOAD_TO_CUSTOM_DASHBOARD}"
echo "workload_label=${WORKLOAD_LABEL}"
echo "use_workspace_atom=${USE_WORKSPACE_ATOM}"
} >> "$GITHUB_OUTPUT"
printf '### SGLang benchmark source\n- Repository: `%s`\n- Ref: `%s`\n- Image mode: `%s`\n' \
"${ATOM_REPOSITORY}" \
"${ATOM_REF}" \
"${SGLANG_IMAGE_SOURCE}" >> "$GITHUB_STEP_SUMMARY"
if [[ "${USER_PROVIDED_SGLANG_IMAGE}" == "true" ]]; then
printf -- '- User-provided image: `%s`\n- Expected SGLang version: `%s`\n- Expected SGLang commit: `%s`\n' \
"${PREBUILT_SGLANG_IMAGE}" \
"${SELECTED_SGLANG_VERSION}" \
"${SELECTED_SGLANG_REF}" >> "$GITHUB_STEP_SUMMARY"
printf -- '\nBecause an explicit `docker_image` input was provided, this run uses that image directly and skips branch-based rebuild logic.\n' \
>> "$GITHUB_STEP_SUMMARY"
elif [[ "${REBUILD_SGLANG_IMAGE}" == "true" ]]; then
printf -- '- Base image: `%s`\n- SGLang version: `%s`\n- SGLang commit: `%s`\n- SGLang source: `.github/workflows/docker-release.yaml`\n' \
"${SGLANG_BASE_IMAGE}" \
"${SELECTED_SGLANG_VERSION}" \
"${SELECTED_SGLANG_REF}" >> "$GITHUB_STEP_SUMMARY"
printf -- '\nBecause branch `%s` is not `main` and no `docker_image` override was provided, a custom SGLang docker is rebuilt from the selected branch.\n' \
"${ATOM_REF}" >> "$GITHUB_STEP_SUMMARY"
else
printf -- '- Prebuilt image: `%s`\n- Expected SGLang version: `%s`\n- Expected SGLang commit: `%s`\n' \
"${PREBUILT_SGLANG_IMAGE}" \
"${SELECTED_SGLANG_VERSION}" \
"${SELECTED_SGLANG_REF}" >> "$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 `sglang-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 `sglang-latest` to its current digest instead of falling back to the floating tag.\n' \
>> "$GITHUB_STEP_SUMMARY"
;;
scheduled-nightly-tag)
printf -- '- Resolution: scheduled run waited for today'\''s nightly tag `%s` and pinned it to digest `%s`.\n' \
"${RESOLVED_NIGHTLY_TAG}" \
"${RESOLVED_PREBUILT_DIGEST}" >> "$GITHUB_STEP_SUMMARY"
;;
recent-nightly-tag)
{
printf -- '- Resolution: today'\''s nightly tag was not available before the wait timeout, '
printf -- 'so this run uses the latest recent SGLang nightly tag `%s` pinned to digest `%s`.\n' \
"${RESOLVED_NIGHTLY_TAG}" \
"${RESOLVED_PREBUILT_DIGEST}"
} >> "$GITHUB_STEP_SUMMARY"
;;
resolution-failed)
printf -- '- Resolution: digest pinning itself failed, so this run falls back to floating `sglang-latest`.\n' \
>> "$GITHUB_STEP_SUMMARY"
;;
esac
fi
printf -- '- Workload label: `%s`\n- Upload to dashboard: `%s`\n- Upload to LLM-Booster: `%s`\n' \
"${WORKLOAD_LABEL}" \
"${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
parse-param-lists:
name: Parse parameter lists
needs: [resolve-atom-source]
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.parse-param-lists.outputs.matrix_json }}
param_lists: ${{ steps.parse-param-lists.outputs.param_lists }}
steps:
- name: Parse parameter lists
id: parse-param-lists
env:
INPUT_PARAM_LISTS: ${{ inputs.param_lists || '' }}
WORKLOAD_LABEL: ${{ needs.resolve-atom-source.outputs.workload_label }}
run: |
DEFAULT_OOB_PARAMS="1024,1024,4,0.8;1024,1024,8,0.8;1024,1024,16,0.8;1024,1024,32,0.8;1024,1024,64,0.8;8192,1024,4,0.8;8192,1024,8,0.8;8192,1024,16,0.8;8192,1024,32,0.8;8192,1024,64,0.8;61440,600,64,1.0"
if [[ -n "${INPUT_PARAM_LISTS}" ]]; then
PARAM_LISTS="${INPUT_PARAM_LISTS}"
else
PARAM_LISTS="${DEFAULT_OOB_PARAMS}"
fi
echo "Using param_lists: ${PARAM_LISTS}"
printf 'param_lists=%s\n' "${PARAM_LISTS}" >> "$GITHUB_OUTPUT"
IFS=';' read -ra SETS <<< "${PARAM_LISTS}"
MATRIX_JSON="["
SEP=""
for SET in "${SETS[@]}"; do
IFS=',' read -ra PARAMS <<< "$SET"
INPUT_LEN="${PARAMS[0]}"
OUTPUT_LEN="${PARAMS[1]}"
CONCURRENCY="${PARAMS[2]}"
RANDOM_RANGE_RATIO="${PARAMS[3]}"
if ! [[ "${CONCURRENCY}" =~ ^[1-9][0-9]*$ ]]; then
echo "Unsupported concurrency: ${CONCURRENCY}. Expected a positive integer."
exit 1
fi
MATRIX_JSON="${MATRIX_JSON}${SEP}{\"input_length\":${INPUT_LEN},\"output_length\":${OUTPUT_LEN},\"concurrency\":${CONCURRENCY},\"random_range_ratio\":${RANDOM_RANGE_RATIO}}"
SEP=","
done
MATRIX_JSON="${MATRIX_JSON}]"
echo "matrix_json=${MATRIX_JSON}" >> "$GITHUB_OUTPUT"
- name: Print matrix JSON
run: |
echo "Matrix JSON: ${{ steps.parse-param-lists.outputs.matrix_json }}"
load-models:
name: Load SGLang model configs
needs: [resolve-atom-source]
runs-on: ubuntu-latest
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_MI355: ${{ inputs.model_mi355 || 'none' }}
MODEL_MI308: ${{ inputs.model_mi308 || 'none' }}
WORKLOAD_LABEL: ${{ needs.resolve-atom-source.outputs.workload_label }}
SCHEDULE_CRON: ${{ github.event.schedule || '' }}
run: |
set -euo pipefail
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import json
import os
import sys
from pathlib import Path
def expand_template_parts(value, templates, separator):
if isinstance(value, str):
return templates.get(value, value)
if isinstance(value, list):
return separator.join(
templates.get(str(part), str(part))
for part in value
if str(part)
)
return value
def load_model_catalog(path):
catalog = json.loads(path.read_text(encoding="utf-8"))
if isinstance(catalog, list):
return catalog
templates = catalog.get("templates", {})
extra_arg_templates = templates.get("extra_args", {})
env_var_templates = templates.get("env_vars", {})
models = []
for model in catalog.get("models", []):
expanded = dict(model)
expanded["extra_args"] = expand_template_parts(
expanded.get("extra_args", ""), extra_arg_templates, " "
)
expanded["env_vars"] = expand_template_parts(
expanded.get("env_vars", ""), env_var_templates, "\n"
)
models.append(expanded)
return models
models = load_model_catalog(Path(".github/benchmark/sglang_benchmark_models.json"))
event = os.environ["GITHUB_EVENT_NAME"]
workload_label = os.environ.get("WORKLOAD_LABEL") or "SGLang-OOB"
selected_group = ""
def model_workload(model):
return str(model.get("workload_label") or "SGLang-OOB")
def matches_workload(model):
return model_workload(model) == workload_label
MODEL_SELECTION_ALIASES = {
"DeepSeek-V4-Pro TP8": "deepseek-v4-pro-tp8",
"DeepSeek-V4-Pro MTP1 TP8": "deepseek-v4-pro-mtp1-tp8",
"DeepSeek-V4-Pro MTP3 TP8": "deepseek-v4-pro-mtp3-tp8",
"DeepSeek-V4-Pro Prefix Cache TP8": "deepseek-v4-pro-prefix-cache-tp8",
"DeepSeek-V3.2 FP8 TP4": "deepseek-v3-2-fp8-tp4",
"DeepSeek-V3.2 FP8 TP4 DP4 EP4": "deepseek-v3-2-fp8-tp4-dp4-ep4",
"DeepSeek-V3.2 FP8 TP8": "deepseek-v3-2-fp8-tp8",
"DeepSeek-V3.2 FP8 TP8 DP8 EP8": "deepseek-v3-2-fp8-tp8-dp8-ep8",
"DeepSeek-R1 FP8 TP4": "deepseek-r1-fp8-tp4",
"DeepSeek-R1 FP8 TP8": "deepseek-r1-fp8-tp8",
"DeepSeek-R1 FP4 TP4": "deepseek-r1-fp4-tp4",
"DeepSeek-R1 FP4 TP4 DP4 EP4": "deepseek-r1-fp4-tp4-dp4-ep4",
"DeepSeek-R1 FP4 TP8": "deepseek-r1-fp4-tp8",
"DeepSeek-R1 FP4 TP8 EP8": "deepseek-r1-fp4-tp8-ep8",
"DeepSeek-R1 FP4 TP8 DP8 EP8": "deepseek-r1-fp4-tp8-dp8-ep8",
"DeepSeek-R1 FP4 TP8 MTP1": "deepseek-r1-fp4-tp8-mtp1",
"DeepSeek-R1 FP4 TP8 MTP3": "deepseek-r1-fp4-tp8-mtp3",
"DeepSeek-R1 FP4 MTP3 TP4 DP4 EP4": "deepseek-r1-fp4-mtp3-tp4-dp4-ep4",
"DeepSeek-R1 FP4 MTP3 TP8 DP8 EP8": "deepseek-r1-fp4-mtp3-tp8-dp8-ep8",
"Qwen3.5-397B-A17B-FP8 TP4": "qwen3-5-397b-a17b-fp8-tp4",
"Qwen3.5-397B-A17B-FP8 TP8": "qwen3-5-397b-a17b-fp8-tp8",
"Qwen3.8-2.4T-A95B-Quark-MXFP4 TP8": "qwen3-8-2-4t-a95b-quark-mxfp4-tp8",
"Qwen3.8-Flash-Next-FP8 TP2": "qwen3-8-flash-next-fp8-tp2",
"GLM-5.1 FP8 TP8": "glm-5-1-fp8-tp8",
"GLM-5.2 FP8 TP4": "glm-5-2-fp8-tp4",
"GLM-5.2 FP8 TP4 PCP4": "glm-5-2-fp8-tp4-pcp4",
"GLM-5.2 FP4 TP4": "glm-5-2-fp4-tp4",
"GLM-5.2 FP4 TP4 MTP3": "glm-5-2-fp4-tp4-mtp3",
"MiniMax-M3-MXFP4 TP4": "minimax-m3-mxfp4-tp4",
"MiniMax-M3-MXFP8 EAGLE3 TP4 MTP3": "minimax-m3-mxfp8-eagle3-tp4-mtp3",
"MI308 Qwen3.5-397B-A17B-FP8 TP4": "qwen3-5-397b-a17b-fp8-tp4-mi308",
"MI308 Qwen3.5-397B-A17B-FP8 TP8": "qwen3-5-397b-a17b-fp8-tp8-mi308",
"MI308 Qwen3.5-35B-A3B-FP8 TP1": "qwen3-5-35b-a3b-fp8-tp1-mi308",
"MI308 Qwen3.5-35B-A3B-PTPC-FP8 TP1": "qwen3-5-35b-a3b-ptpc-fp8-tp1-mi308",
"MI308 Qwen3.8-Flash-Next-FP8 TP2": "qwen3-8-flash-next-fp8-tp2-mi308",
"MI308 DeepSeek-V4-Flash": "deepseek-v4-flash-fp8-mi308",
}
def is_mi308_model(model):
return "mi308" in str(model.get("runner", "")) or "mi308" in str(model.get("prefix", ""))
def manually_selected(model, selection, expected_mi308):
selection = (selection or "none").split(" (", 1)[0]
if selection == "none" or is_mi308_model(model) != expected_mi308:
return False
if selection == "all":
return True
prefix = str(model.get("prefix", ""))
display = str(model.get("display", ""))
return prefix == selection or display == selection or prefix == MODEL_SELECTION_ALIASES.get(selection)
OOB_P0_PREFIX_ORDER = [
"deepseek-v4-pro-tp8",
"deepseek-v4-pro-mtp1-tp8",
"deepseek-v4-pro-mtp3-tp8",
"glm-5-2-fp8-tp4",
"glm-5-2-fp8-tp4-pcp4",
"glm-5-2-fp4-tp4",
"glm-5-2-fp4-tp4-mtp3",
"minimax-m3-mxfp4-tp4",
]
OOB_P1_PREFIX_ORDER = [
"deepseek-v3-2-fp8-tp4",
"deepseek-v3-2-fp8-tp4-dp4-ep4",
"deepseek-v3-2-fp8-tp8",
"deepseek-v3-2-fp8-tp8-dp8-ep8",
"minimax-m3-mxfp8-eagle3-tp4-mtp3",
]
OOB_P2_PREFIX_ORDER = [
"deepseek-r1-fp8-tp8",
"deepseek-r1-fp8-tp4",
"deepseek-r1-fp4-tp8",
"deepseek-r1-fp4-tp8-ep8",
"deepseek-r1-fp4-tp8-dp8-ep8",
"deepseek-r1-fp4-tp8-mtp3",
"deepseek-r1-fp4-tp8-mtp1",
"deepseek-r1-fp4-tp4",
"deepseek-r1-fp4-tp4-dp4-ep4",
"deepseek-r1-fp4-mtp3-tp4-dp4-ep4",
"deepseek-r1-fp4-mtp3-tp8-dp8-ep8",
"qwen3-5-397b-a17b-fp8-tp4",
"qwen3-5-397b-a17b-fp8-tp8",
"qwen3-8-2-4t-a95b-quark-mxfp4-tp8",
"qwen3-8-flash-next-fp8-tp2",
"glm-5-1-fp8-tp8",
]
def is_oob_mi308(model):
return matches_workload(model) and "mi308" in str(model.get("prefix", ""))
def first_model_by_prefix(candidates):
"""Catalog may list the same prefix twice; keep first occurrence order."""
by_prefix = {}
for model in candidates:
if not matches_workload(model):
continue
prefix = str(model.get("prefix", ""))
if prefix not in by_prefix:
by_prefix[prefix] = model
return by_prefix
def scheduled_oob_selection(schedule_cron):
schedule_to_tiers = {
"0 15 * * 1,3,5": ("MI308-only", []),
"0 15 * * 2,4": (
"OOB-P0+P1",
OOB_P0_PREFIX_ORDER + OOB_P1_PREFIX_ORDER,
),
"0 15 * * 6": (
"OOB-P0+P1+P2",
OOB_P0_PREFIX_ORDER
+ OOB_P1_PREFIX_ORDER
+ OOB_P2_PREFIX_ORDER,
),
}
if schedule_cron not in schedule_to_tiers:
return "SKIP-UNKNOWN-DAY", []
selected_group, tier_order = schedule_to_tiers[schedule_cron]
return selected_group, select_oob_models([tier_order], include_mi308=True)
def select_oob_models(tier_orders, include_mi308):
by_prefix = first_model_by_prefix(models)
tier_prefixes = frozenset(
prefix
for tier_order in tier_orders
for prefix in tier_order
)
selected = []
seen_prefixes = set()
for tier_order in tier_orders:
for prefix in tier_order:
if prefix in seen_prefixes:
continue
seen_prefixes.add(prefix)
model = by_prefix.get(prefix)
if model is not None:
selected.append(model)
if not include_mi308:
return selected
for prefix in sorted(by_prefix):
if prefix in tier_prefixes:
continue
model = by_prefix[prefix]
if is_oob_mi308(model):
selected.append(model)
return selected
MANUAL_OOB_SELECTIONS = {
"OOB_P0": ("OOB_P0", [OOB_P0_PREFIX_ORDER]),
"OOB_P1": ("OOB_P1", [OOB_P1_PREFIX_ORDER]),
"OOB_P2": ("OOB_P2", [OOB_P2_PREFIX_ORDER]),
"OOB_P0+OOB_P1": ("OOB_P0+OOB_P1", [OOB_P0_PREFIX_ORDER, OOB_P1_PREFIX_ORDER]),
}
if event == "schedule":
schedule_cron = os.environ.get("SCHEDULE_CRON", "")
selected_group, selected = scheduled_oob_selection(schedule_cron)
else:
model_mi355 = os.environ.get("MODEL_MI355") or "none"
model_mi308 = os.environ.get("MODEL_MI308") or "none"
selected = []
manual_oob_selection = MANUAL_OOB_SELECTIONS.get(model_mi355)
if manual_oob_selection:
selected_group, tier_orders = manual_oob_selection
selected.extend(select_oob_models(tier_orders, include_mi308=False))
else:
selected.extend(
model
for model in models
if matches_workload(model)
and manually_selected(model, model_mi355, expected_mi308=False)
)
selected.extend(
model
for model in models
if matches_workload(model)
and manually_selected(model, model_mi308, expected_mi308=True)
)
print(f"SGLang workload label: {workload_label}", file=sys.stderr)
if selected_group:
print(f"SGLang benchmark group: {selected_group}", file=sys.stderr)
if not selected:
print("No models selected for SGLang benchmark.", file=sys.stderr)
else:
print("Selected SGLang benchmark models:", 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 "SGLang benchmark group: ${SELECTED_GROUP}"
fi
printf 'Selected models: %s\n' "${MODELS_JSON}"
build-benchmark-matrix:
name: Build SGLang 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_mi355: ${{ steps.build.outputs.benchmark_matrix_mi355 }}
benchmark_matrix_mi308: ${{ steps.build.outputs.benchmark_matrix_mi308 }}
has_benchmark_cells: ${{ steps.build.outputs.has_benchmark_cells }}
has_benchmark_cells_mi355: ${{ steps.build.outputs.has_benchmark_cells_mi355 }}
has_benchmark_cells_mi308: ${{ steps.build.outputs.has_benchmark_cells_mi308 }}
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: |
python3 - <<'PY'
import json
import os
import sys
models = json.loads(os.environ["MODELS_JSON"])
params = json.loads(os.environ["PARAMS_JSON"])
include = []
for model in models:
supported_pairs = set(model.get("supported_input_output_pairs", []))
excluded_pairs = set(model.get("excluded_input_output_pairs", []))
supported_concurrency_values = {
int(value) for value in model.get("supported_concurrency_values", [])
}
supported_concurrency_by_pair = {
str(pair): {int(value) for value in values}
for pair, values in model.get("supported_concurrency_values_by_pair", {}).items()
}
model_params = []
seen = set()
for param in params:
variants = [param]
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
pair_concurrency_values = supported_concurrency_by_pair.get(pair)
if pair_concurrency_values and int(param["concurrency"]) not in pair_concurrency_values:
continue
if supported_concurrency_values and int(param["concurrency"]) not in supported_concurrency_values:
continue
include.append({"model": model, "params": param})
def is_mi308_row(row):
return "mi308" in str(row["model"].get("runner", ""))
mi308_rows = [row for row in include if is_mi308_row(row)]
mi355_rows = [row for row in include if not is_mi308_row(row)]
sep = (",", ":")
j355 = json.dumps({"include": mi355_rows}, separators=sep)
j308 = json.dumps({"include": mi308_rows}, separators=sep)
gh_out = os.environ["GITHUB_OUTPUT"]
with open(gh_out, "a", encoding="utf-8") as fh:
fh.write(f"benchmark_matrix_mi355={j355}\n")
fh.write(f"benchmark_matrix_mi308={j308}\n")
fh.write("has_benchmark_cells=" + ("false" if not include else "true") + "\n")
fh.write("has_benchmark_cells_mi355=" + ("false" if not mi355_rows else "true") + "\n")
fh.write("has_benchmark_cells_mi308=" + ("false" if not mi308_rows else "true") + "\n")
if not include:
print("No eligible benchmark cases remain after model-specific parameter filtering.", file=sys.stderr)
else:
print(f"Benchmark cells: {len(include)}", file=sys.stderr)
print(f"MI355 shard cells: {len(mi355_rows)}, MI308 shard cells: {len(mi308_rows)}", file=sys.stderr)
PY
build-sglang-image:
name: Build custom SGLang benchmark image
needs: [resolve-atom-source, build-benchmark-matrix]
if: >-
needs.resolve-atom-source.outputs.rebuild_sglang_image == 'true'
&& needs.build-benchmark-matrix.result == 'success'
&& needs.build-benchmark-matrix.outputs.has_benchmark_cells == 'true'
runs-on: build-only-atom
outputs:
sglang_image_tag: ${{ steps.image-meta.outputs.sglang_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 }}
SGLANG_BASE_IMAGE: ${{ needs.resolve-atom-source.outputs.sglang_base_image }}