@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f5d1281c9d
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 14:00 UTC

[ROCm][CI] Expose tests to AMD production CI and fix amdsmi heap corruption (#35071)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>

Andreas Karatzas committed Feb 27, 2026 at 23:57 UTC f5d1281c9d1b96cb4f046f1ec2c53a525f319098
2 files changed +67 -42
.buildkite/test-amd.yaml
+57 -37
@@ -156,8 +156,9 @@ steps:
156
157 - label: Entrypoints Integration Test (API Server 1) # 100min
158 timeout_in_minutes: 130
159 - mirror_hardwares: [amdexperimental]
159 + mirror_hardwares: [amdexperimental, amdproduction]
160 agent_pool: mi325_1
161 + optional: true
162 # grade: Blocking
163 working_dir: "/vllm-workspace/tests"
164 fast_check: true
@@ -173,8 +174,9 @@ steps:
174
175 - label: Entrypoints Integration Test (API Server 2)
176 timeout_in_minutes: 50
176 - mirror_hardwares: [amdexperimental]
177 + mirror_hardwares: [amdexperimental, amdproduction]
178 agent_pool: mi325_1
179 + optional: true
180 # grade: Blocking
181 working_dir: "/vllm-workspace/tests"
182 fast_check: true
@@ -192,8 +194,9 @@ steps:
194
195 - label: Entrypoints Integration Test (Pooling)
196 timeout_in_minutes: 50
195 - mirror_hardwares: [amdexperimental]
197 + mirror_hardwares: [amdexperimental, amdproduction]
198 agent_pool: mi325_1
199 + optional: true
200 # grade: Blocking
201 working_dir: "/vllm-workspace/tests"
202 fast_check: true
@@ -207,8 +210,9 @@ steps:
210
211 - label: Entrypoints Integration Test (Responses API)
212 timeout_in_minutes: 50
210 - mirror_hardwares: [amdexperimental]
213 + mirror_hardwares: [amdexperimental, amdproduction]
214 agent_pool: mi325_1
215 + optional: true
216 # grade: Blocking
217 working_dir: "/vllm-workspace/tests"
218 fast_check: true
@@ -222,8 +226,9 @@ steps:
226
227 - label: Distributed Tests (4 GPUs) # 35min
228 timeout_in_minutes: 50
225 - mirror_hardwares: [amdexperimental]
229 + mirror_hardwares: [amdexperimental, amdproduction]
230 agent_pool: mi325_4
231 + optional: true
232 # grade: Blocking
233 working_dir: "/vllm-workspace/tests"
234 num_gpus: 4
@@ -285,8 +290,9 @@ steps:
290
291 - label: Distributed Tests (8 GPUs) # 4min
292 timeout_in_minutes: 10
288 - mirror_hardwares: [amdexperimental]
293 + mirror_hardwares: [amdexperimental, amdproduction]
294 agent_pool: mi325_8
295 + optional: true
296 # grade: Blocking
297 gpu: h100
298 num_gpus: 8
@@ -381,10 +387,11 @@ steps:
387
388 - label: V1 Test e2e + engine # 65min
389 timeout_in_minutes: 90
384 - mirror_hardwares: [amdexperimental]
390 + mirror_hardwares: [amdexperimental, amdproduction]
391 # The test uses 4 GPUs, but we schedule it on 8-GPU machines for stability.
392 # See discussion here: https://github.com/vllm-project/vllm/pull/31040
393 agent_pool: mi325_8
394 + optional: true
395 # grade: Blocking
396 source_file_dependencies:
397 - vllm/
@@ -408,8 +415,9 @@ steps:
415
416 - label: V1 Test others # 42min
417 timeout_in_minutes: 60
411 - mirror_hardwares: [amdexperimental]
418 + mirror_hardwares: [amdexperimental, amdproduction]
419 agent_pool: mi325_1
420 + optional: true
421 # grade: Blocking
422 source_file_dependencies:
423 - vllm/
@@ -436,8 +444,9 @@ steps:
444 # TODO: Add the "V1 Test attetion (MI300)" test group
445
446 - label: V1 Test attention (H100) # 10min
439 - mirror_hardwares: [amdexperimental]
447 + mirror_hardwares: [amdexperimental, amdproduction]
448 agent_pool: mi325_1
449 + optional: true
450 # grade: Blocking
451 timeout_in_minutes: 30
452 gpu: h100
@@ -541,8 +550,9 @@ steps:
550
551 - label: Samplers Test # 56min
552 timeout_in_minutes: 75
544 - mirror_hardwares: [amdexperimental]
553 + mirror_hardwares: [amdexperimental, amdproduction]
554 agent_pool: mi325_1
555 + optional: true
556 # grade: Blocking
557 source_file_dependencies:
558 - vllm/model_executor/layers
@@ -554,8 +564,9 @@ steps:
564
565 - label: LoRA Test %N # 20min each
566 timeout_in_minutes: 30
557 - mirror_hardwares: [amdexperimental]
567 + mirror_hardwares: [amdexperimental, amdproduction]
568 agent_pool: mi325_1
569 + optional: true
570 # grade: Blocking
571 source_file_dependencies:
572 - vllm/lora
@@ -665,8 +676,9 @@ steps:
676
677 - label: Kernels Quantization Test %N # 64min
678 timeout_in_minutes: 90
668 - mirror_hardwares: [amdexperimental]
679 + mirror_hardwares: [amdexperimental, amdproduction]
680 agent_pool: mi325_1
681 + optional: true
682 # grade: Blocking
683 source_file_dependencies:
684 - csrc/quantization/
@@ -799,8 +811,9 @@ steps:
811
812 - label: LM Eval Small Models # 53min
813 timeout_in_minutes: 75
802 - mirror_hardwares: [amdexperimental]
814 + mirror_hardwares: [amdexperimental, amdproduction]
815 agent_pool: mi325_1
816 + optional: true
817 # grade: Blocking
818 source_file_dependencies:
819 - csrc/
@@ -861,8 +874,9 @@ steps:
874
875 - label: Basic Models Tests (Other)
876 timeout_in_minutes: 45
864 - mirror_hardwares: [amdexperimental]
877 + mirror_hardwares: [amdexperimental, amdproduction]
878 agent_pool: mi325_1
879 + optional: true
880 # grade: Blocking
881 torch_nightly: true
882 source_file_dependencies:
@@ -903,8 +917,9 @@ steps:
917
918 - label: Language Models Tests (Extra Standard) %N
919 timeout_in_minutes: 45
906 - mirror_hardwares: [amdexperimental]
920 + mirror_hardwares: [amdexperimental, amdproduction]
921 agent_pool: mi325_1
922 + optional: true
923 # grade: Blocking
924 torch_nightly: true
925 source_file_dependencies:
@@ -924,8 +939,9 @@ steps:
939
940 - label: Language Models Tests (Hybrid) %N
941 timeout_in_minutes: 75
927 - mirror_hardwares: [amdexperimental]
942 + mirror_hardwares: [amdexperimental, amdproduction]
943 agent_pool: mi325_1
944 + optional: true
945 # grade: Blocking
946 torch_nightly: true
947 source_file_dependencies:
@@ -945,7 +961,7 @@ steps:
961
962 - label: Language Models Test (Extended Generation) # 80min
963 timeout_in_minutes: 110
948 - mirror_hardwares: [amdexperimental]
964 + mirror_hardwares: [amdexperimental, amdproduction]
965 agent_pool: mi325_1
966 # grade: Blocking
967 optional: true
@@ -961,7 +977,7 @@ steps:
977
978 - label: Language Models Test (PPL)
979 timeout_in_minutes: 110
964 - mirror_hardwares: [amdexperimental]
980 + mirror_hardwares: [amdexperimental, amdproduction]
981 agent_pool: mi325_1
982 # grade: Blocking
983 optional: true
@@ -973,7 +989,7 @@ steps:
989
990 - label: Language Models Test (Extended Pooling) # 36min
991 timeout_in_minutes: 50
976 - mirror_hardwares: [amdexperimental]
992 + mirror_hardwares: [amdexperimental, amdproduction]
993 agent_pool: mi325_1
994 # grade: Blocking
995 optional: true
@@ -985,7 +1001,7 @@ steps:
1001
1002 - label: Language Models Test (MTEB)
1003 timeout_in_minutes: 110
988 - mirror_hardwares: [amdexperimental]
1004 + mirror_hardwares: [amdexperimental, amdproduction]
1005 agent_pool: mi325_1
1006 # grade: Blocking
1007 optional: true
@@ -997,7 +1013,7 @@ steps:
1013
1014 - label: Multi-Modal Processor Test (CPU)
1015 timeout_in_minutes: 60
1000 - mirror_hardwares: [amdexperimental]
1016 + mirror_hardwares: [amdexperimental, amdproduction]
1017 agent_pool: mi325_1
1018 source_file_dependencies:
1019 - vllm/
@@ -1009,7 +1025,7 @@ steps:
1025
1026 - label: Multi-Modal Processor Test # 44min
1027 timeout_in_minutes: 60
1012 - mirror_hardwares: [amdexperimental]
1028 + mirror_hardwares: [amdexperimental, amdproduction]
1029 agent_pool: mi325_1
1030 # grade: Blocking
1031 source_file_dependencies:
@@ -1021,7 +1037,7 @@ steps:
1037
1038 - label: Multi-Modal Models Test (Standard) # 60min
1039 timeout_in_minutes: 100
1024 - mirror_hardwares: [amdexperimental]
1040 + mirror_hardwares: [amdexperimental, amdproduction]
1041 agent_pool: mi325_1
1042 # grade: Blocking
1043 torch_nightly: true
@@ -1054,7 +1070,7 @@ steps:
1070
1071 - label: Multi-Modal Models Test (Extended) 1 # 60min
1072 timeout_in_minutes: 120
1057 - mirror_hardwares: [amdexperimental]
1073 + mirror_hardwares: [amdexperimental, amdproduction]
1074 agent_pool: mi325_1
1075 # grade: Blocking
1076 optional: true
@@ -1069,7 +1085,7 @@ steps:
1085
1086 - label: Multi-Modal Models Test (Extended) 2 #60min
1087 timeout_in_minutes: 120
1072 - mirror_hardwares: [amdexperimental]
1088 + mirror_hardwares: [amdexperimental, amdproduction]
1089 agent_pool: mi325_1
1090 # grade: Blocking
1091 optional: true
@@ -1084,7 +1100,7 @@ steps:
1100
1101 - label: Multi-Modal Models Test (Extended) 3 # 75min
1102 timeout_in_minutes: 150
1087 - mirror_hardwares: [amdexperimental]
1103 + mirror_hardwares: [amdexperimental, amdproduction]
1104 agent_pool: mi325_1
1105 # grade: Blocking
1106 optional: true
@@ -1109,7 +1125,7 @@ steps:
1125 - pytest -v -s models/quantization
1126
1127 - label: Transformers Nightly Models Test
1112 - mirror_hardwares: [amdexperimental]
1128 + mirror_hardwares: [amdexperimental, amdproduction]
1129 agent_pool: mi325_1
1130 # grade: Blocking
1131 working_dir: "/vllm-workspace/"
@@ -1264,8 +1280,9 @@ steps:
1280
1281 - label: 2 Node Tests (4 GPUs in total) # 16min
1282 timeout_in_minutes: 30
1267 - mirror_hardwares: [amdexperimental, amdmultinode]
1283 + mirror_hardwares: [amdexperimental, amdproduction, amdmultinode]
1284 agent_pool: mi325_4
1285 + optional: true
1286 # grade: Blocking
1287 working_dir: "/vllm-workspace/tests"
1288 num_gpus: 2
@@ -1291,8 +1308,9 @@ steps:
1308
1309 - label: Distributed Tests (2 GPUs) # 68min
1310 timeout_in_minutes: 90
1294 - mirror_hardwares: [amdexperimental]
1311 + mirror_hardwares: [amdexperimental, amdproduction]
1312 agent_pool: mi325_2
1313 + optional: true
1314 # grade: Blocking
1315 working_dir: "/vllm-workspace/tests"
1316 num_gpus: 2
@@ -1331,8 +1349,9 @@ steps:
1349
1350 - label: Distributed Model Tests (2 GPUs) # 37min
1351 timeout_in_minutes: 50
1334 - mirror_hardwares: [amdexperimental]
1352 + mirror_hardwares: [amdexperimental, amdproduction]
1353 agent_pool: mi325_2
1354 + optional: true
1355 # grade: Blocking
1356 working_dir: "/vllm-workspace/tests"
1357 num_gpus: 2
@@ -1442,7 +1461,7 @@ steps:
1461 - bash weight_loading/run_model_weight_loading_test.sh -c weight_loading/models-amd.txt
1462
1463 - label: Weight Loading Multiple GPU Test - Large Models # optional
1445 - mirror_hardwares: [amdexperimental]
1464 + mirror_hardwares: [amdexperimental, amdproduction]
1465 agent_pool: mi325_2
1466 # grade: Blocking
1467 working_dir: "/vllm-workspace/tests"
@@ -1486,7 +1505,7 @@ steps:
1505 ##### A100 test #####
1506
1507 - label: Distributed Tests (A100) # optional
1489 - mirror_hardwares: [amdexperimental]
1508 + mirror_hardwares: [amdexperimental, amdproduction]
1509 agent_pool: mi325_4
1510 # grade: Blocking
1511 gpu: a100
@@ -1509,7 +1528,7 @@ steps:
1528 - label: LM Eval Large Models # optional
1529 gpu: a100
1530 optional: true
1512 - mirror_hardwares: [amdexperimental]
1531 + mirror_hardwares: [amdexperimental, amdproduction]
1532 agent_pool: mi325_4
1533 # grade: Blocking
1534 num_gpus: 4
@@ -1525,7 +1544,7 @@ steps:
1544 - label: LM Eval Large Models (H100) # optional
1545 gpu: h100
1546 optional: true
1528 - mirror_hardwares: [amdexperimental]
1547 + mirror_hardwares: [amdexperimental, amdproduction]
1548 agent_pool: mi325_4
1549 # grade: Blocking
1550 num_gpus: 4
@@ -1540,7 +1559,7 @@ steps:
1559
1560 ##### H200 test #####
1561 - label: Distributed Tests (H200) # optional
1543 - mirror_hardwares: [amdexperimental]
1562 + mirror_hardwares: [amdexperimental, amdproduction]
1563 agent_pool: mi325_2
1564 # grade: Blocking
1565 gpu: h200
@@ -1600,8 +1619,9 @@ steps:
1619 - pytest -s -v test_lm_eval_correctness.py --config-list-file=configs/models-large.txt --tp-size=4
1620
1621 - label: ROCm LM Eval Large Models (8 Card)
1603 - mirror_hardwares: [amdproduction]
1622 + mirror_hardwares: [amdexperimental, amdproduction]
1623 agent_pool: mi325_8
1624 + optional: true
1625 num_gpus: 8
1626 working_dir: "/vllm-workspace/.buildkite/lm-eval-harness"
1627 commands:
@@ -1660,7 +1680,7 @@ steps:
1680
1681 - label: Qwen3-Next-80B-A3B-Instruct MTP Async EPLB Accuracy
1682 timeout_in_minutes: 60
1663 - mirror_hardwares: [amdexperimental]
1683 + mirror_hardwares: [amdexperimental, amdproduction]
1684 agent_pool: mi325_4
1685 # grade: Blocking
1686 optional: true
tests/utils.py
+10 -5
@@ -65,6 +65,8 @@ from vllm.utils.torch_utils import (
65 FP8_DTYPE = current_platform.fp8_dtype()
66
67 if current_platform.is_rocm():
68 + import threading
69 +
70 from amdsmi import (
71 amdsmi_get_gpu_vram_usage,
72 amdsmi_get_processor_handles,
@@ -72,13 +74,16 @@ if current_platform.is_rocm():
74 amdsmi_shut_down,
75 )
76
77 + _amdsmi_lock = threading.Lock()
78 +
79 @contextmanager
80 def _nvml():
77 - try:
78 - amdsmi_init()
79 - yield
80 - finally:
81 - amdsmi_shut_down()
81 + with _amdsmi_lock:
82 + try:
83 + amdsmi_init()
84 + yield
85 + finally:
86 + amdsmi_shut_down()
87 elif current_platform.is_cuda():
88 from vllm.third_party.pynvml import (
89 nvmlDeviceGetHandleByIndex,