[AMD] Add AITER Custom All-Reduce (#13102)

Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca>
Co-authored-by: HaiShaw <hixiao@gmail.com>
This commit is contained in:
Hubert Lu
2025-11-12 21:53:44 -08:00
committed by GitHub
parent 7a8524b444
commit e4b2937017
7 changed files with 370 additions and 6 deletions

View File

@@ -7,8 +7,11 @@ import time
import numpy as np
import sglang as sgl
from sglang.srt.utils import is_hip
from sglang.utils import download_and_cache_file, read_jsonl
_is_hip = is_hip()
def test_few_shot_qa():
@sgl.function
@@ -537,7 +540,7 @@ def test_hellaswag_select():
accuracy_gen = np.mean(np.array(preds_gen) == np.array(labels))
print(f"{accuracy=}, {accuracy_gen=}")
assert np.abs(accuracy_gen - accuracy) < 0.1
assert np.abs(latency_gen - latency) < 1
assert np.abs(latency_gen - latency) < 1 if not _is_hip else 2
return accuracy, latency