[AMD] CI - migrate perf test and fix stage-b-test-1-gpu-amd (#17340)
Co-authored-by: Bingxu Chen <bingxche@amd.com> Co-authored-by: bingxche <Bingxu.Chen@amd.com> Co-authored-by: michaelzhang-ai <michaelzhang.ai@users.noreply.github.com>
This commit is contained in:
co-authored by
Bingxu Chen
bingxche
michaelzhang-ai
parent
0fec8820d1
commit
04a10c9bc2
@@ -7,7 +7,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
@@ -20,6 +20,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=300, suite="stage-b-test-small-1-gpu-accuracy")
|
||||
register_amd_ci(est_time=300, suite="stage-b-test-small-1-gpu-accuracy-amd")
|
||||
|
||||
|
||||
class TestEvalAccuracyLarge(CustomTestCase):
|
||||
|
||||
@@ -7,7 +7,7 @@ import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.run_eval import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MOE_MODEL_NAME_FOR_TEST,
|
||||
@@ -20,6 +20,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=500, suite="stage-b-test-large-2-gpu-accuracy")
|
||||
register_amd_ci(est_time=500, suite="stage-b-test-large-2-gpu-accuracy-amd")
|
||||
|
||||
|
||||
class TestMoEEvalAccuracyLarge(CustomTestCase):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.srt.utils import is_hip, kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.few_shot_gsm8k import run_eval
|
||||
from sglang.test.test_utils import (
|
||||
@@ -45,7 +45,11 @@ class TestCompressedTensorsLlama3FP8(CustomTestCase):
|
||||
)
|
||||
metrics = run_eval(args)
|
||||
print(f"{metrics=}")
|
||||
self.assertGreaterEqual(metrics["accuracy"], 0.45)
|
||||
if is_hip():
|
||||
# Lower threshold for AMD because FP8 dtype differs (fp8_fnuz)
|
||||
self.assertGreaterEqual(metrics["accuracy"], 0.40)
|
||||
else:
|
||||
self.assertGreaterEqual(metrics["accuracy"], 0.45)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -12,7 +12,7 @@ import unittest
|
||||
|
||||
import openai
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.srt.utils import is_hip, kill_process_tree
|
||||
from sglang.srt.utils.hf_transformers_utils import get_tokenizer
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
@@ -855,6 +855,7 @@ class TestToolChoiceMistral(TestToolChoiceLlama32):
|
||||
# cls.tokenizer = get_tokenizer(cls.model)
|
||||
|
||||
|
||||
@unittest.skipIf(is_hip(), "Disabled for AMD")
|
||||
class TestToolChoiceLfm2(TestToolChoiceLlama32):
|
||||
"""Test tool_choice functionality with LiquidAI LFM2 model"""
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
||||
@@ -12,6 +12,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=120, suite="stage-b-test-large-1-gpu-performance")
|
||||
register_amd_ci(est_time=120, suite="stage-b-test-large-1-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchOneBatch1GPU(CustomTestCase):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_MOE_MODEL_NAME_FOR_TEST,
|
||||
@@ -12,6 +12,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=180, suite="stage-b-test-large-2-gpu-performance")
|
||||
register_amd_ci(est_time=630, suite="stage-b-test-large-2-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchOneBatch2GPU(CustomTestCase):
|
||||
|
||||
@@ -4,7 +4,8 @@ Performance tests for single GPU that need H200 (80GB) - FP8 and EAGLE tests.
|
||||
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.srt.utils import is_hip
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_DRAFT_MODEL_EAGLE,
|
||||
DEFAULT_MODEL_NAME_FOR_TEST_FP8,
|
||||
@@ -17,6 +18,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=300, suite="stage-b-test-large-1-gpu-performance")
|
||||
register_amd_ci(est_time=300, suite="stage-b-test-large-1-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchServing1GPULarge(CustomTestCase):
|
||||
@@ -38,6 +40,7 @@ class TestBenchServing1GPULarge(CustomTestCase):
|
||||
else:
|
||||
self.assertGreater(res["output_throughput"], 4300)
|
||||
|
||||
@unittest.skipIf(is_hip(), "Skip Eagle test for ROCm")
|
||||
def test_online_latency_eagle(self):
|
||||
res = run_bench_serving(
|
||||
model=DEFAULT_TARGET_MODEL_EAGLE,
|
||||
|
||||
@@ -9,7 +9,7 @@ import unittest
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
CustomTestCase,
|
||||
@@ -20,6 +20,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=1000, suite="stage-b-test-large-1-gpu-performance")
|
||||
register_amd_ci(est_time=1100, suite="stage-b-test-large-1-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchServing1GPUPart1(CustomTestCase):
|
||||
|
||||
@@ -5,7 +5,7 @@ Works on 5090 (32GB).
|
||||
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_SMALL_EMBEDDING_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST_SCORE,
|
||||
@@ -20,6 +20,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=900, suite="stage-b-test-large-1-gpu-performance")
|
||||
register_amd_ci(est_time=900, suite="stage-b-test-large-1-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchServing1GPUPart2(CustomTestCase):
|
||||
|
||||
@@ -4,7 +4,7 @@ Performance tests for 2-GPU that need large GPUs (H200 80GB) - MoE and Pipeline
|
||||
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MOE_MODEL_NAME_FOR_TEST,
|
||||
CustomTestCase,
|
||||
@@ -15,6 +15,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=600, suite="stage-b-test-large-2-gpu-performance")
|
||||
register_amd_ci(est_time=600, suite="stage-b-test-large-2-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestBenchServing2GPU(CustomTestCase):
|
||||
|
||||
@@ -4,7 +4,7 @@ VLM Performance tests that work on 5090 (32GB) - VLM offline throughput and onli
|
||||
|
||||
import unittest
|
||||
|
||||
from sglang.test.ci.ci_register import register_cuda_ci
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_SMALL_VLM_MODEL_NAME_FOR_TEST,
|
||||
CustomTestCase,
|
||||
@@ -14,6 +14,7 @@ from sglang.test.test_utils import (
|
||||
)
|
||||
|
||||
register_cuda_ci(est_time=600, suite="stage-b-test-small-1-gpu-performance")
|
||||
register_amd_ci(est_time=500, suite="stage-b-test-small-1-gpu-performance-amd")
|
||||
|
||||
|
||||
class TestVLMPerf5090(CustomTestCase):
|
||||
|
||||
@@ -23,6 +23,11 @@ PER_COMMIT_SUITES = {
|
||||
"stage-b-test-small-1-gpu-amd",
|
||||
"stage-b-test-small-1-gpu-amd-mi35x",
|
||||
"stage-b-test-large-2-gpu-amd",
|
||||
"stage-b-test-small-1-gpu-performance-amd",
|
||||
"stage-b-test-large-1-gpu-performance-amd",
|
||||
"stage-b-test-large-2-gpu-performance-amd",
|
||||
"stage-b-test-small-1-gpu-accuracy-amd",
|
||||
"stage-b-test-large-2-gpu-accuracy-amd",
|
||||
"stage-c-test-large-8-gpu-amd-mi35x",
|
||||
],
|
||||
HWBackend.CUDA: [
|
||||
|
||||
Reference in New Issue
Block a user